<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Apr 13, 2018 at 9:59 AM Huang Rui <<a href="mailto:ray.huang@amd.com">ray.huang@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Apr 12, 2018 at 09:33:33PM +0200, Mathieu Malaterre wrote:<br>
> In function ‘radeon_process_i2c_ch’ a comparison of a u8 value against<br>
> 255 is done. Since it is always false, change the signature of this<br>
> function to use an `int` instead, which match the type used in caller:<br>
> `radeon_atom_hw_i2c_xfer`.<br>
> <br>
> Fix the following warning triggered with W=1:<br>
> <br>
> CC [M] drivers/gpu/drm/radeon/atombios_i2c.o<br>
> drivers/gpu/drm/radeon/atombios_i2c.c: In function ‘radeon_process_i2c_ch’:<br>
> drivers/gpu/drm/radeon/atombios_i2c.c:71:11: warning: comparison is always false due to limited range of data type [-Wtype-limits]<br>
> if (num > ATOM_MAX_HW_I2C_READ) {<br>
> ^<br>
> <br>
> Signed-off-by: Mathieu Malaterre <<a href="mailto:malat@debian.org" target="_blank">malat@debian.org</a>><br>
<br>
Reviewed-by: Huang Rui <<a href="mailto:ray.huang@amd.com" target="_blank">ray.huang@amd.com</a>><br>
<br></blockquote><div><br></div><div>Any chance to be included in the next pull request ? thanks</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> ---<br>
> drivers/gpu/drm/radeon/atombios_i2c.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c b/drivers/gpu/drm/radeon/atombios_i2c.c<br>
> index 4157780585a0..9022e9af11a0 100644<br>
> --- a/drivers/gpu/drm/radeon/atombios_i2c.c<br>
> +++ b/drivers/gpu/drm/radeon/atombios_i2c.c<br>
> @@ -35,7 +35,7 @@<br>
> <br>
> static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan,<br>
> u8 slave_addr, u8 flags,<br>
> - u8 *buf, u8 num)<br>
> + u8 *buf, int num)<br>
> {<br>
> struct drm_device *dev = chan->dev;<br>
> struct radeon_device *rdev = dev->dev_private;<br>
> -- <br>
> 2.11.0<br>
> <br>
> _______________________________________________<br>
> amd-gfx mailing list<br>
> <a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</blockquote></div></div>