[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1244843690.3224.10.camel@hp>
Date: Sat, 13 Jun 2009 00:54:50 +0300
From: Tero Saarni <tero.saarni@...il.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: linux-next: input tree build warnings
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists