All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Drivers: HID: fix warnings: from is u16 which never < 0
@ 2013-04-07  4:55 Chen Gang
  2013-04-24 14:33 ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2013-04-07  4:55 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-input


  from is u16 which never < 0.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 drivers/hid/hid-icade.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/hid-icade.c b/drivers/hid/hid-icade.c
index 09dcc04..76b5a75 100644
--- a/drivers/hid/hid-icade.c
+++ b/drivers/hid/hid-icade.c
@@ -159,7 +159,7 @@ static const struct icade_key icade_usage_table[30] = {
 
 static const struct icade_key *icade_find_translation(u16 from)
 {
-	if (from < 0 || from > ICADE_MAX_USAGE)
+	if (from > ICADE_MAX_USAGE)
 		return NULL;
 	return &icade_usage_table[from];
 }
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-25  1:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-07  4:55 [PATCH] Drivers: HID: fix warnings: from is u16 which never < 0 Chen Gang
2013-04-24 14:33 ` Jiri Kosina
2013-04-25  1:21   ` Chen Gang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.