Re: [PATCH] drm/radeon: change function signature to pass full range
On Fri, Apr 13, 2018 at 9:59 AM Huang Rui wrote: > On Thu, Apr 12, 2018 at 09:33:33PM +0200, Mathieu Malaterre wrote: > > In function ‘radeon_process_i2c_ch’ a comparison of a u8 value against > > 255 is done. Since it is always false, change the signature of this > > function to use an `int` instead, which match the type used in caller: > > `radeon_atom_hw_i2c_xfer`. > > > > Fix the following warning triggered with W=1: > > > > CC [M] drivers/gpu/drm/radeon/atombios_i2c.o > > drivers/gpu/drm/radeon/atombios_i2c.c: In function > ‘radeon_process_i2c_ch’: > > drivers/gpu/drm/radeon/atombios_i2c.c:71:11: warning: comparison is > always false due to limited range of data type [-Wtype-limits] > >if (num > ATOM_MAX_HW_I2C_READ) { > >^ > > > > Signed-off-by: Mathieu Malaterre > > Reviewed-by: Huang Rui > > Any chance to be included in the next pull request ? thanks > > --- > > drivers/gpu/drm/radeon/atombios_i2c.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c > b/drivers/gpu/drm/radeon/atombios_i2c.c > > index 4157780585a0..9022e9af11a0 100644 > > --- a/drivers/gpu/drm/radeon/atombios_i2c.c > > +++ b/drivers/gpu/drm/radeon/atombios_i2c.c > > @@ -35,7 +35,7 @@ > > > > static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan, > >u8 slave_addr, u8 flags, > > - u8 *buf, u8 num) > > + u8 *buf, int num) > > { > > struct drm_device *dev = chan->dev; > > struct radeon_device *rdev = dev->dev_private; > > -- > > 2.11.0 > > > > ___ > > amd-gfx mailing list > > amd-...@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: change function signature to pass full range
On Mon, Sep 17, 2018 at 4:29 PM Mathieu Malaterre wrote: > > > > On Fri, Apr 13, 2018 at 9:59 AM Huang Rui wrote: >> >> On Thu, Apr 12, 2018 at 09:33:33PM +0200, Mathieu Malaterre wrote: >> > In function ‘radeon_process_i2c_ch’ a comparison of a u8 value against >> > 255 is done. Since it is always false, change the signature of this >> > function to use an `int` instead, which match the type used in caller: >> > `radeon_atom_hw_i2c_xfer`. >> > >> > Fix the following warning triggered with W=1: >> > >> > CC [M] drivers/gpu/drm/radeon/atombios_i2c.o >> > drivers/gpu/drm/radeon/atombios_i2c.c: In function >> > ‘radeon_process_i2c_ch’: >> > drivers/gpu/drm/radeon/atombios_i2c.c:71:11: warning: comparison is >> > always false due to limited range of data type [-Wtype-limits] >> >if (num > ATOM_MAX_HW_I2C_READ) { >> >^ >> > >> > Signed-off-by: Mathieu Malaterre >> >> Reviewed-by: Huang Rui >> > > Any chance to be included in the next pull request ? thanks Applied. thanks for the reminder. Alex > >> >> > --- >> > drivers/gpu/drm/radeon/atombios_i2c.c | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c >> > b/drivers/gpu/drm/radeon/atombios_i2c.c >> > index 4157780585a0..9022e9af11a0 100644 >> > --- a/drivers/gpu/drm/radeon/atombios_i2c.c >> > +++ b/drivers/gpu/drm/radeon/atombios_i2c.c >> > @@ -35,7 +35,7 @@ >> > >> > static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan, >> >u8 slave_addr, u8 flags, >> > - u8 *buf, u8 num) >> > + u8 *buf, int num) >> > { >> > struct drm_device *dev = chan->dev; >> > struct radeon_device *rdev = dev->dev_private; >> > -- >> > 2.11.0 >> > >> > ___ >> > amd-gfx mailing list >> > amd-...@lists.freedesktop.org >> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > ___ > amd-gfx mailing list > amd-...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: change function signature to pass full range
On Thu, Apr 12, 2018 at 09:33:33PM +0200, Mathieu Malaterre wrote: > In function ‘radeon_process_i2c_ch’ a comparison of a u8 value against > 255 is done. Since it is always false, change the signature of this > function to use an `int` instead, which match the type used in caller: > `radeon_atom_hw_i2c_xfer`. > > Fix the following warning triggered with W=1: > > CC [M] drivers/gpu/drm/radeon/atombios_i2c.o > drivers/gpu/drm/radeon/atombios_i2c.c: In function ‘radeon_process_i2c_ch’: > drivers/gpu/drm/radeon/atombios_i2c.c:71:11: warning: comparison is always > false due to limited range of data type [-Wtype-limits] >if (num > ATOM_MAX_HW_I2C_READ) { >^ > > Signed-off-by: Mathieu Malaterre Reviewed-by: Huang Rui > --- > drivers/gpu/drm/radeon/atombios_i2c.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c > b/drivers/gpu/drm/radeon/atombios_i2c.c > index 4157780585a0..9022e9af11a0 100644 > --- a/drivers/gpu/drm/radeon/atombios_i2c.c > +++ b/drivers/gpu/drm/radeon/atombios_i2c.c > @@ -35,7 +35,7 @@ > > static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan, >u8 slave_addr, u8 flags, > - u8 *buf, u8 num) > + u8 *buf, int num) > { > struct drm_device *dev = chan->dev; > struct radeon_device *rdev = dev->dev_private; > -- > 2.11.0 > > ___ > amd-gfx mailing list > amd-...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/radeon: change function signature to pass full range
In function ‘radeon_process_i2c_ch’ a comparison of a u8 value against 255 is done. Since it is always false, change the signature of this function to use an `int` instead, which match the type used in caller: `radeon_atom_hw_i2c_xfer`. Fix the following warning triggered with W=1: CC [M] drivers/gpu/drm/radeon/atombios_i2c.o drivers/gpu/drm/radeon/atombios_i2c.c: In function ‘radeon_process_i2c_ch’: drivers/gpu/drm/radeon/atombios_i2c.c:71:11: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (num > ATOM_MAX_HW_I2C_READ) { ^ Signed-off-by: Mathieu Malaterre --- drivers/gpu/drm/radeon/atombios_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c b/drivers/gpu/drm/radeon/atombios_i2c.c index 4157780585a0..9022e9af11a0 100644 --- a/drivers/gpu/drm/radeon/atombios_i2c.c +++ b/drivers/gpu/drm/radeon/atombios_i2c.c @@ -35,7 +35,7 @@ static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan, u8 slave_addr, u8 flags, -u8 *buf, u8 num) +u8 *buf, int num) { struct drm_device *dev = chan->dev; struct radeon_device *rdev = dev->dev_private; -- 2.11.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel