From: Tero Saarni <tero.saarni@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: input tree build warnings
Date: Sat, 13 Jun 2009 00:54:50 +0300 [thread overview]
Message-ID: <1244843690.3224.10.camel@hp> (raw)
In-Reply-To: <20090612170536.109df1d8.sfr@canb.auug.org.au>
On Fri, 2009-06-12 at 17:05 +1000, Stephen Rothwell wrote:
> Hi Dmitry,
>
> Today's linux-next build (x86_64 allmodconfig) produced these warnings:
>
> drivers/input/evdev.c: In function 'evdev_do_ioctl':
> drivers/input/evdev.c:632: warning: comparison of distinct pointer types lacks a cast
> drivers/input/evdev.c:660: warning: comparison of distinct pointer types lacks a cast
>
> Introduced by commit 61c7bfcdf5acee06f58b246d6615989134719d19 ("Input:
> synaptics - add support for reporting x/y resolution").
My mistake, thanks for the heads up!
Input: fix warning: comparison of distinct pointer types
Signed-off-by: Tero Saarni <tero.saarni@gmail.com>
---
drivers/input/evdev.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 7e46b96..7e8d218 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -628,8 +628,9 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
abs.flat = dev->absflat[t];
abs.resolution = dev->absres[t];
- if (copy_to_user(p, &abs,
- min(_IOC_SIZE(cmd), sizeof(struct input_absinfo))))
+ if (copy_to_user(p, &abs, min_t(size_t,
+ _IOC_SIZE(cmd),
+ sizeof(struct input_absinfo))))
return -EFAULT;
return 0;
@@ -656,8 +657,9 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
t = _IOC_NR(cmd) & ABS_MAX;
- if (copy_from_user(&abs, p,
- min(_IOC_SIZE(cmd), sizeof(struct input_absinfo))))
+ if (copy_from_user(&abs, p, min_t(size_t,
+ _IOC_SIZE(cmd),
+ sizeof(struct input_absinfo))))
return -EFAULT;
/*
--
1.6.0.4
next prev parent reply other threads:[~2009-06-12 21:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-12 7:05 linux-next: input tree build warnings Stephen Rothwell
2009-06-12 21:54 ` Tero Saarni [this message]
2009-06-20 6:06 ` Dmitry Torokhov
2009-06-20 7:17 ` Stephen Rothwell
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=1244843690.3224.10.camel@hp \
--to=tero.saarni@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).