[PATCH v4 4/4] Input: charlieplex_keypad: add GPIO charlieplex keypad
Hugo Villeneuve
hugo at hugovil.com
Wed Mar 11 07:26:01 PDT 2026
Hi Andy,
On Tue, 10 Mar 2026 21:18:25 +0200
Andy Shevchenko <andriy.shevchenko at intel.com> wrote:
> On Tue, Mar 10, 2026 at 06:37:34PM +0000, Dmitry Torokhov wrote:
> > On Fri, Mar 06, 2026 at 04:21:09PM +0200, Andy Shevchenko wrote:
> > > On Thu, Mar 05, 2026 at 02:20:50PM -0500, Hugo Villeneuve wrote:
>
> ...
>
> > > > + int oline;
> > >
> > > Why signed?
> > >
> > > > + int code;
> > > > +
> > > > + for (code = 0, oline = 0; oline < keypad->nlines; oline++) {
> > >
> > > Can be like
> > >
> > > code = 0;
> > > for (unsigned int oline = 0; oline < keypad->nlines; oline++) {
> > >
> > > as iterator is not used outside the loop.
> > >
> > > > + DECLARE_BITMAP(values, MATRIX_MAX_ROWS);
> > >
> > > > + int iline;
> > >
> > > Why signed?
> >
> > Does it make any difference given practical limits on nlines?
>
> Maybe not, but might lead to interesting bugs in the future in case if used in
> some arithmetics.
I'll fix this in next version.
Hugo.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
--
Hugo Villeneuve
More information about the Linux-mediatek
mailing list