[lvc-project] [PATCH 5.10 1/2] Input: adp5588-keys - Add check on return code
Fedor Pchelkin
pchelkin at ispras.ru
Thu May 22 11:13:44 MSK 2025
On Wed, 21. May 18:42, Fedor Pchelkin wrote:
> On Wed, 21. May 13:40, Denis Arefev wrote:
> > @@ -269,8 +269,14 @@ static void adp5588_report_events(struct adp5588_kpad *kpad, int ev_cnt)
> > int i, j;
> >
> > for (i = 0; i < ev_cnt; i++) {
> > - int key = adp5588_read(kpad->client, Key_EVENTA + i);
> > - int key_val = key & KEY_EV_MASK;
> > + int key, key_val, key_press;
>
>
> @@ -0,0 +1,4 @@
> +../drivers/input/keyboard/adp5588-keys.c: In function 'adp5588_report_events':
> +../drivers/input/keyboard/adp5588-keys.c:272:35: warning: variable 'key_press' set but not used [-Wunused-but-set-variable]
> + 272 | int key, key_val, key_press;
> + | ^~~~~~~~~
>
Впрочем, деталь во всех смыслах минорная.
При применении подправлю.
>
> > +
> > + key = adp5588_read(kpad->client, Key_EVENTA + i);
> > + if (key < 0)
> > + continue;
> > +
> > + key_val = key & KEY_EV_MASK;
> > + key_press = key & KEY_EV_PRESSED;
> >
> > if (key_val >= GPI_PIN_BASE && key_val <= GPI_PIN_END) {
> > for (j = 0; j < kpad->gpimapsize; j++) {
> > --
> > 2.43.0
More information about the lvc-project
mailing list