From: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
To: Mathieu Malaterre <malat-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
Cc: "David (ChunMing) Zhou"
<David1.Zhou-5C7GfCeVMHo@public.gmane.org>,
"David Airlie" <airlied-cv59FeDIM0c@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
"Alex Deucher" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH] drm/radeon: change function signature to pass full range
Date: Fri, 13 Apr 2018 16:04:38 +0800 [thread overview]
Message-ID: <20180413080437.GB10330@hr-amur2> (raw)
In-Reply-To: <20180412193333.4951-1-malat-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
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
next prev parent reply other threads:[~2018-04-13 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-12 19:33 [PATCH] drm/radeon: change function signature to pass full range Mathieu Malaterre
[not found] ` <20180412193333.4951-1-malat-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2018-04-13 8:04 ` Huang Rui [this message]
2018-09-17 10:19 ` Mathieu Malaterre
[not found] ` <CA+7wUswLVHMeCMz-9-Xtxigu8CjNDS8745G8S7J8F_7U8YXteQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-17 21:45 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180413080437.GB10330@hr-amur2 \
--to=ray.huang-5c7gfcevmho@public.gmane.org \
--cc=David1.Zhou-5C7GfCeVMHo@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=malat-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox