* [PATCH 00/14] Modify signed comparisons of unsigned variables
@ 2012-11-16 6:50 Tushar Behera
2012-11-16 6:50 ` [PATCH 11/14] HID: hiddev: Remove redundant check on unsigned variable Tushar Behera
0 siblings, 1 reply; 3+ messages in thread
From: Tushar Behera @ 2012-11-16 6:50 UTC (permalink / raw)
To: linux-kernel
Cc: patches, Mauro Carvalho Chehab, Linus Walleij, Ian Campbell,
Konrad Rzeszutek Wilk, Jeremy Fitzhardinge, Chas Williams,
Jack Steiner, Arnd Bergmann, Luciano Coelho, Jiri Kosina,
ivtv-devel, linux-media, xen-devel, netdev, virtualization,
linux-atm-general, linux-usb, linux-input, linux-wireless
The occurrences were identified through the coccinelle script at
following location.
http://www.emn.fr/z-info/coccinelle/rules/find_unsigned.cocci
Signed checks for unsigned variables are removed if it is also checked
for upper error limit. For error checks, IS_ERR_VALUE() macros is used.
Tushar Behera (14):
[media] ivtv: Remove redundant check on unsigned variable
[media] meye: Remove redundant check on unsigned variable
[media] saa7134: Remove redundant check on unsigned variable
[media] tlg2300: Remove redundant check on unsigned variable
[media] atmel-isi: Update error check for unsigned variables
pinctrl: samsung: Update error check for unsigned variables
pinctrl: SPEAr: Update error check for unsigned variables
xen: netback: Remove redundant check on unsigned variable
xen: events: Remove redundant check on unsigned variable
atm: Removed redundant check on unsigned variable
HID: hiddev: Remove redundant check on unsigned variable
gru: Remove redundant check on unsigned variable
misc: tsl2550: Remove redundant check on unsigned variable
wlcore: Remove redundant check on unsigned variable
drivers/atm/fore200e.c | 2 +-
drivers/hid/usbhid/hiddev.c | 2 +-
drivers/media/pci/ivtv/ivtv-ioctl.c | 2 +-
drivers/media/pci/meye/meye.c | 2 +-
drivers/media/pci/saa7134/saa7134-video.c | 2 +-
drivers/media/platform/soc_camera/atmel-isi.c | 2 +-
drivers/media/usb/tlg2300/pd-video.c | 2 +-
drivers/misc/sgi-gru/grukdump.c | 2 +-
drivers/misc/tsl2550.c | 4 ++--
drivers/net/wireless/ti/wlcore/debugfs.c | 2 +-
drivers/net/xen-netback/netback.c | 4 ++--
drivers/pinctrl/pinctrl-samsung.c | 2 +-
drivers/pinctrl/spear/pinctrl-plgpio.c | 2 +-
drivers/xen/events.c | 2 +-
14 files changed, 16 insertions(+), 16 deletions(-)
--
1.7.4.1
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
CC: Linus Walleij <linus.walleij@linaro.org>
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Jeremy Fitzhardinge <jeremy@goop.org>
CC: Chas Williams <chas@cmf.nrl.navy.mil>
CC: Jack Steiner <steiner@sgi.com>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Luciano Coelho <coelho@ti.com>
CC: Jiri Kosina <jkosina@suse.cz>
CC: ivtv-devel@ivtvdriver.org
CC: linux-media@vger.kernel.org
CC: xen-devel@lists.xensource.com
CC: netdev@vger.kernel.org
CC: virtualization@lists.linux-foundation.org
CC: linux-atm-general@lists.sourceforge.net
CC: linux-usb@vger.kernel.org
CC: linux-input@vger.kernel.org
CC: linux-wireless@vger.kernel.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 11/14] HID: hiddev: Remove redundant check on unsigned variable
2012-11-16 6:50 [PATCH 00/14] Modify signed comparisons of unsigned variables Tushar Behera
@ 2012-11-16 6:50 ` Tushar Behera
2012-11-16 9:27 ` Jiri Kosina
0 siblings, 1 reply; 3+ messages in thread
From: Tushar Behera @ 2012-11-16 6:50 UTC (permalink / raw)
To: linux-kernel; +Cc: patches, Jiri Kosina, linux-usb, linux-input
No need to check whether unsigned variable is less than 0.
CC: Jiri Kosina <jkosina@suse.cz>
CC: linux-usb@vger.kernel.org
CC: linux-input@vger.kernel.org
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
drivers/hid/usbhid/hiddev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 14599e2..711c965 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -625,7 +625,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break;
case HIDIOCAPPLICATION:
- if (arg < 0 || arg >= hid->maxapplication)
+ if (arg >= hid->maxapplication)
break;
for (i = 0; i < hid->maxcollection; i++)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 11/14] HID: hiddev: Remove redundant check on unsigned variable
2012-11-16 6:50 ` [PATCH 11/14] HID: hiddev: Remove redundant check on unsigned variable Tushar Behera
@ 2012-11-16 9:27 ` Jiri Kosina
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2012-11-16 9:27 UTC (permalink / raw)
To: Tushar Behera; +Cc: linux-kernel, patches, linux-usb, linux-input
On Fri, 16 Nov 2012, Tushar Behera wrote:
> No need to check whether unsigned variable is less than 0.
>
> CC: Jiri Kosina <jkosina@suse.cz>
> CC: linux-usb@vger.kernel.org
> CC: linux-input@vger.kernel.org
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
> drivers/hid/usbhid/hiddev.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
> index 14599e2..711c965 100644
> --- a/drivers/hid/usbhid/hiddev.c
> +++ b/drivers/hid/usbhid/hiddev.c
> @@ -625,7 +625,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> break;
>
> case HIDIOCAPPLICATION:
> - if (arg < 0 || arg >= hid->maxapplication)
> + if (arg >= hid->maxapplication)
> break;
>
> for (i = 0; i < hid->maxcollection; i++)
Applied, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-16 9:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-16 6:50 [PATCH 00/14] Modify signed comparisons of unsigned variables Tushar Behera
2012-11-16 6:50 ` [PATCH 11/14] HID: hiddev: Remove redundant check on unsigned variable Tushar Behera
2012-11-16 9:27 ` Jiri Kosina
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).