From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal =?UTF-8?B?U3VjaMOhbmVr?= Date: Wed, 3 Jul 2019 11:11:19 +0200 Subject: [U-Boot] [PATCH v2 3/9] usb_kdb: only process events succesfully received In-Reply-To: References: <493871942d344ca3076301a182292b08da213d29.1562090082.git.msuchanek@suse.de> Message-ID: <20190703111119.1e5be70e@naga> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, 3 Jul 2019 09:37:42 +0800 Bin Meng wrote: > Hi Michal, > > On Wed, Jul 3, 2019 at 1:57 AM Michal Suchanek wrote: > > > > On error the data buffer does not contain valid data so do not submit it > > for processing. Usually it will contain the last data recieved so the > > last pressed key will be repeated indefinitely on device failure. > > > > Signed-off-by: Michal Suchanek > > --- > > v2: fix indentation > > --- > > common/usb_kbd.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/common/usb_kbd.c b/common/usb_kbd.c > > index 020f0d4117f7..74206d2de74f 100644 > > --- a/common/usb_kbd.c > > +++ b/common/usb_kbd.c > > @@ -317,10 +317,9 @@ static inline void usb_kbd_poll_for_event(struct usb_device *dev) > > struct usb_kbd_pdata *data = dev->privptr; > > > > /* Submit a interrupt transfer request */ > > - usb_submit_int_msg(dev, data->intpipe, &data->new[0], data->intpktsize, > > - data->intinterval); > > - > > - usb_kbd_irq_worker(dev); > > + if (!usb_submit_int_msg(dev, data->intpipe, &data->new[0], > > + data->intpktsize, data->intinterval)) > > The indentation still looks incorrect. It should align to one > character after the open parenthesis. It looks correct after the function is renamed twice in following patches. > > > + usb_kbd_irq_worker(dev); Anyway, the problem I was referring to was excessive indentation of this line in previous version of the patch. Thanks Michal