linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Komal Shah <komal_shah802003@yahoo.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
	Aaro Koskinen <aaro.koskinen@nokia.com>,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP: Add keypad driver
Date: Thu, 7 Jan 2016 12:13:17 -0800	[thread overview]
Message-ID: <20160107201316.GF12600@atomide.com> (raw)
In-Reply-To: <CAKdAkRSic46XAhuXO6fijBTWMaRJPqRNPx6MwTv=Pgoo6JL=hQ@mail.gmail.com>

Hi,

* Dmitry Torokhov <dmitry.torokhov@gmail.com> [160107 10:54]:
> On Thu, Jan 7, 2016 at 1:37 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > Hello file (standard input) matches,
> >
> > The patch ad4e09b16ad3: "[PATCH] OMAP: Add keypad driver", leads to the
> > following static checker warning:
> >
> >         drivers/input/keyboard/omap-keypad.c:158 omap_kp_tasklet()
> >         warn: 'keycodes[]' is never negative.
> 
> It looks like you are not resolving commits correctly, the original
> submission did not have this issue.
> 
> >
> > drivers/input/keyboard/omap-keypad.c
...
> >    152  #ifdef NEW_BOARD_LEARNING_MODE
> >    153                          printk(KERN_INFO "omap-keypad: key %d-%d %s\n", col,
> >    154                                 row, (new_state[col] & (1 << row)) ?
> >    155                                 "pressed" : "released");
> >    156  #else
> >    157                          key = keycodes[MATRIX_SCAN_CODE(row, col, row_shift)];
> >    158                          if (key < 0) {
> >                                     ^^^^^^^
> > Never true.  Not sure what was intended.
> 
> It looks like this check was broken by
> da1f026b532ce944d74461497dc6d8c16456466e (Keyboard: omap-keypad: use
> matrix_keypad.h). Previously the driver would expect a list of known
> keys and would scan it and return -1 if key was not found. Now we have
> 2 options:
> 
> 1. Simply remove the check
> 2. Change the condition to "if (key == KEY_RESERVED)"
> 
> I do not really have preference. Tony?

Sounds like the check is not needed if it has not been used for
past five years, so my preference is option #1 then.

Regards,

Tony

       reply	other threads:[~2016-01-07 20:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160107093751.GD27186@mwanda>
     [not found] ` <CAKdAkRSic46XAhuXO6fijBTWMaRJPqRNPx6MwTv=Pgoo6JL=hQ@mail.gmail.com>
2016-01-07 20:13   ` Tony Lindgren [this message]
2016-01-07 23:22     ` [PATCH] OMAP: Add keypad driver Dmitry Torokhov
2016-01-08  0:08       ` Koskinen, Aaro (Nokia - FI/Espoo)
2016-01-08  0:13         ` Tony Lindgren
2016-01-08  0:10       ` Tony Lindgren
2016-01-08  1:41       ` Janusz Krzysztofik
2016-01-08  6:38         ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160107201316.GF12600@atomide.com \
    --to=tony@atomide.com \
    --cc=aaro.koskinen@nokia.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkrzyszt@tis.icnet.pl \
    --cc=komal_shah802003@yahoo.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).