On Thursday 27 August 2009, George Spelvin wrote: > And save a bit of vertical space. Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx> again, it'd be fine as part of a janitorial #1 patch. The goal is to have patches be easily digestible, and being tiny is less critical than splitting out the "no brainer" bits vs things which need thought. > --- > drivers/usb/gadget/u_serial.c | 6 ++---- > 1 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c > index 427f9b6..57005b0 100644 > --- a/drivers/usb/gadget/u_serial.c > +++ b/drivers/usb/gadget/u_serial.c > @@ -210,10 +210,9 @@ static unsigned gs_buf_space_avail(struct gs_buf const *gb) > static unsigned > gs_buf_put(struct gs_buf *gb, const char *buf, unsigned count) > { > - unsigned len; > + unsigned len = gs_buf_space_avail(gb); > unsigned put_pos = gb->buf_put % WRITE_BUF_SIZE; > > - len = gs_buf_space_avail(gb); > if (count > len) > count = len; > > @@ -246,10 +245,9 @@ gs_buf_put(struct gs_buf *gb, const char *buf, unsigned count) > static unsigned > gs_buf_get(struct gs_buf *gb, char *buf, unsigned count) > { > - unsigned len; > + unsigned len = gs_buf_data_avail(gb); > unsigned get_pos = gb->buf_get % WRITE_BUF_SIZE; > > - len = gs_buf_data_avail(gb); > if (count > len) > count = len; > > -- > 1.6.3.3 > > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html