Re: [PATCH V2 2/2] drivers: input: keyboard

From: Andy Shevchenko
Date: Fri Jan 10 2020 - 02:37:01 EST


On Fri, Jan 10, 2020 at 3:34 AM Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> On Wed, Jan 08, 2020 at 02:29:23PM +0800, fengping yu wrote:
> > From: "fengping.yu" <fengping.yu@xxxxxxxxxxxx>

...

> > +static void kpd_get_keymap_state(void __iomem *kp_base, u16 state[])
> > +{
> > + state[0] = readw(kp_base + KP_MEM1);
> > + state[1] = readw(kp_base + KP_MEM2);
> > + state[2] = readw(kp_base + KP_MEM3);
> > + state[3] = readw(kp_base + KP_MEM4);
> > + state[4] = readw(kp_base + KP_MEM5);
>
> Please use memcpy_formio() here.

Actually it's not an equivalent and may have side effects.
I already told somewhere that we lack of
mem*_*io{32,16,8}() implementation.

--
With Best Regards,
Andy Shevchenko