Re: [PATCH 1/4] usb-serial: Move USB_TOKEN_IN into a helper function

2020-03-16 Thread Jason Andryuk
On Mon, Mar 16, 2020 at 7:40 AM Gerd Hoffmann wrote: > > Hi, > > > +if (len > s->recv_used) > > +len = s->recv_used; > > scripts/checkpatch.pl flags a codestyle error here. > > > -if (len > s->recv_used) > > -len = s->recv_used; > > Which is strictly speaking not

Re: [PATCH 1/4] usb-serial: Move USB_TOKEN_IN into a helper function

2020-03-16 Thread Gerd Hoffmann
Hi, > +if (len > s->recv_used) > +len = s->recv_used; scripts/checkpatch.pl flags a codestyle error here. > -if (len > s->recv_used) > -len = s->recv_used; Which is strictly speaking not your fault as you are just moving around existing code. It's common pract

Re: [PATCH 1/4] usb-serial: Move USB_TOKEN_IN into a helper function

2020-03-13 Thread Samuel Thibault
Jason Andryuk, le jeu. 12 mars 2020 08:55:20 -0400, a ecrit: > We'll be adding a loop, so move the code into a helper function. breaks > are replaced with returns. > > Signed-off-by: Jason Andryuk Reviewed-by: Samuel Thibault > --- > hw/usb/dev-serial.c | 77 +

[PATCH 1/4] usb-serial: Move USB_TOKEN_IN into a helper function

2020-03-12 Thread Jason Andryuk
We'll be adding a loop, so move the code into a helper function. breaks are replaced with returns. Signed-off-by: Jason Andryuk --- hw/usb/dev-serial.c | 77 + 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/hw/usb/dev-serial.c b/hw/us