]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: remove always false comparison in 'amdgpu_atombios_i2c_process_i2c_ch'
authoryu kuai <yukuai3@huawei.com>
Mon, 4 Nov 2019 13:27:25 +0000 (21:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Nov 2019 20:29:44 +0000 (15:29 -0500)
commit1305e5154b3879ca7c760b525a8742e6483b17ed
tree251ea35a383a11c383c719f4c54b2d4e5c7b190b
parenteffd5875cbe6648ed0ed4a8e5613f87538af1240
drm/amdgpu: remove always false comparison in 'amdgpu_atombios_i2c_process_i2c_ch'

Fixes gcc '-Wtype-limits' warning:

drivers/gpu/drm/amd/amdgpu/atombios_i2c.c: In function
‘amdgpu_atombios_i2c_process_i2c_ch’:
drivers/gpu/drm/amd/amdgpu/atombios_i2c.c:79:11: warning: comparison is
always false due to limited range of data type [-Wtype-limits]

'num' is 'u8', so it will never be greater than 'TOM_MAX_HW_I2C_READ',
which is defined as 255. Therefore, the comparison can be removed.

Fixes: 04fa22d8efd0 ("drm/amdgpu: add core driver (v4)")
Signed-off-by: yu kuai <yukuai3@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/atombios_i2c.c