lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 26 May 2011 09:24:45 +0200
From:	Németh Márton <nm127@...email.hu>
To:	Greg Kroah-Hartman <gregkh@...e.de>,
	Matt Mooney <mfm@...eddisk.com>,
	Max Vozeler <max@...terhof.net>, Arnd Bergmann <arnd@...db.de>
CC:	Julia Lawall <julia@...u.dk>, usbip-devel@...ts.sourceforge.net,
	linux-usb@...r.kernel.org, devel@...verdev.osuosl.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] usbip: remove check for negative values for an unsigned value

From: Márton Németh <nm127@...email.hu>

The parameter rhport is unsigned so there is no need checking for
negative values.

This will remove the following warning message when compiling with "make W=1 ...":
  drivers/staging/usbip/vhci_sysfs.c: In function ‘valid_args’:
  drivers/staging/usbip/vhci_sysfs.c:138: warning: comparison of unsigned expression < 0 is always false

Signed-off-by: Márton Németh <nm127@...email.hu>
---
diff --git a/drivers/staging/usbip/vhci_sysfs.c b/drivers/staging/usbip/vhci_sysfs.c
index d9736f9..7b6e4a9 100644
--- a/drivers/staging/usbip/vhci_sysfs.c
+++ b/drivers/staging/usbip/vhci_sysfs.c
@@ -135,7 +135,7 @@ static DEVICE_ATTR(detach, S_IWUSR, NULL, store_detach);
 static int valid_args(__u32 rhport, enum usb_device_speed speed)
 {
 	/* check rhport */
-	if ((rhport < 0) || (rhport >= VHCI_NPORTS)) {
+	if (rhport >= VHCI_NPORTS) {
 		pr_err("port %u\n", rhport);
 		return -EINVAL;
 	}
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ