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

* Re: [PATCH] Drivers: HID: fix warnings: from is u16 which never < 0
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Kosina @ 2013-04-24 14:33 UTC (permalink / raw)
  To: Chen Gang; +Cc: linux-input

On Sun, 7 Apr 2013, Chen Gang wrote:

> 
>   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];
>  }

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH] Drivers: HID: fix warnings: from is u16 which never < 0
  2013-04-24 14:33 ` Jiri Kosina
@ 2013-04-25  1:21   ` Chen Gang
  0 siblings, 0 replies; 3+ messages in thread
From: Chen Gang @ 2013-04-25  1:21 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-input

On 2013年04月24日 22:33, Jiri Kosina wrote:
> On Sun, 7 Apr 2013, Chen Gang wrote:
> 
>> > 
>> >   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];
>> >  }
> Applied, thanks.

Thanks, too.

-- 
Chen Gang

Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[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.