Drivers: HID: fix warnings: from is u16 which never < 0
PATCH 1/1 Drivers: HID: fix warnings: from is u16 which never < 0
from is u16 which never < 0.
Signed-off-by Chen Gang <[email protected]>
--- drivers/hid/hid-icade.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/hid/hid-icade.c +1 -1
@@ -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]; }
Signature · 1 line
1.7.7.6
Jiri Kosina
AppliedQuoted 13 lines · Chen Gang
from is u16 which never < 0.
Signed-off-by Chen Gang <[email protected]>--- drivers/hid/hid-icade.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/hid/hid-icade.c +0
-0
drivers/hid/hid-icade.c static const struct icade_key icade_usage_table[30] = { · line 165
Quoted 8 lines
drivers/hid/hid-icade.c +1
-1@@ -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]; }
Applied, thanks.
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 16 lines · Jiri Kosina
Quoted 14 lines · Chen Gang
Quoted 14 lines
from is u16 which never < 0.
Signed-off-by Chen Gang <[email protected]>--- drivers/hid/hid-icade.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/hid/hid-icade.c +0
-0@@ -159,7 +159,7 @@ static const struct icade_key icade_usage_table[30] = {
Quoted 8 lines
Quoted 7 lines
drivers/hid/hid-icade.c static const struct icade_key icade_usage_table[30] = { · line 165
Quoted 7 lines
drivers/hid/hid-icade.c +1
-1static 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]; }Applied, thanks.
Thanks, too.
Signature · 7 lines
Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html