* [PATCH] drm/radeon: change function signature to pass full range
@ 2018-04-12 19:33 Mathieu Malaterre
2018-04-13 8:04 ` Huang Rui
0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Malaterre @ 2018-04-12 19:33 UTC (permalink / raw)
To: Alex Deucher
Cc: Mathieu Malaterre, Christian König, David (ChunMing) Zhou,
David Airlie, amd-gfx, dri-devel, linux-kernel
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 <malat@debian.org>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/radeon: change function signature to pass full range
@ 2018-04-13 8:04 ` Huang Rui
0 siblings, 0 replies; 6+ messages in thread
From: Huang Rui @ 2018-04-13 8:04 UTC (permalink / raw)
To: Mathieu Malaterre
Cc: Alex Deucher, David (ChunMing) Zhou, linux-kernel, dri-devel,
David Airlie, amd-gfx, Christian König
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 <malat@debian.org>
Reviewed-by: Huang Rui <ray.huang@amd.com>
> ---
> 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-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/radeon: change function signature to pass full range
@ 2018-04-13 8:04 ` Huang Rui
0 siblings, 0 replies; 6+ messages in thread
From: Huang Rui @ 2018-04-13 8:04 UTC (permalink / raw)
To: Mathieu Malaterre
Cc: David (ChunMing) Zhou, David Airlie,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Alex Deucher,
Christian König
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 <malat@debian.org>
Reviewed-by: Huang Rui <ray.huang@amd.com>
> ---
> 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-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/radeon: change function signature to pass full range
2018-04-13 8:04 ` Huang Rui
(?)
@ 2018-09-17 10:19 ` Mathieu Malaterre
2018-09-17 21:45 ` Alex Deucher
-1 siblings, 1 reply; 6+ messages in thread
From: Mathieu Malaterre @ 2018-09-17 10:19 UTC (permalink / raw)
To: ray.huang-5C7GfCeVMHo
Cc: David (ChunMing) Zhou, David Airlie, LKML,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, dri-devel,
Alex Deucher, Christian König
[-- Attachment #1.1: Type: text/plain, Size: 2028 bytes --]
On Fri, Apr 13, 2018 at 9:59 AM Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org> 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 <malat-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
>
> Reviewed-by: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
>
>
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-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
[-- Attachment #1.2: Type: text/html, Size: 3085 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/radeon: change function signature to pass full range
@ 2018-09-17 21:45 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2018-09-17 21:45 UTC (permalink / raw)
To: Mathieu Malaterre
Cc: Huang Rui, Chunming Zhou, Dave Airlie, LKML, amd-gfx list,
Maling list - DRI developers, Deucher, Alexander,
Christian Koenig
On Mon, Sep 17, 2018 at 4:29 PM Mathieu Malaterre <malat@debian.org> wrote:
>
>
>
> On Fri, Apr 13, 2018 at 9:59 AM Huang Rui <ray.huang@amd.com> 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 <malat@debian.org>
>>
>> Reviewed-by: Huang Rui <ray.huang@amd.com>
>>
>
> 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-gfx@lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/radeon: change function signature to pass full range
@ 2018-09-17 21:45 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2018-09-17 21:45 UTC (permalink / raw)
To: Mathieu Malaterre
Cc: Chunming Zhou, Dave Airlie, LKML, Maling list - DRI developers,
Huang Rui, amd-gfx list, Deucher, Alexander, Christian Koenig
On Mon, Sep 17, 2018 at 4:29 PM Mathieu Malaterre <malat@debian.org> wrote:
>
>
>
> On Fri, Apr 13, 2018 at 9:59 AM Huang Rui <ray.huang@amd.com> 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 <malat@debian.org>
>>
>> Reviewed-by: Huang Rui <ray.huang@amd.com>
>>
>
> 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-gfx@lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-09-17 21:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-12 19:33 [PATCH] drm/radeon: change function signature to pass full range Mathieu Malaterre
2018-04-13 8:04 ` Huang Rui
2018-04-13 8:04 ` Huang Rui
2018-09-17 10:19 ` Mathieu Malaterre
2018-09-17 21:45 ` Alex Deucher
2018-09-17 21:45 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.