RE: [PATCH v13 5/8] usb:gadget: Add SuperSpeed support to the Gadget Framework

From: Tanya Brokhman
Date: Wed May 25 2011 - 09:26:10 EST


Hi Mike


> On Tue, May 24, 2011 at 06:02, Tatyana Brokhman wrote:
> > +config USB_GADGET_SUPERSPEED
> > + boolean "Gadget operating in Super Speed"
>
> perhaps better phrasing would be: Enable Super Speed support

Np. Will update.

> maybe i didnt look too closely, but it seems like very little even
> depends upon this Kconfig option in the actual source. only the
> "gadget_is_superspeed()", and that is used lightly. so i wonder how
> useful this is even having ...

No, this flag is VERY important :) If it's set the driver speed is updated to USB_SPEED_SUPER. Look at usb_composite_probe()

> > + value = min(w_length, (u16) value);
>
> i know you're just following existing style, but i wonder if these all
> shouldnt just be min_t(u16, ...)

Perhaps, but it seems to me that this change also isn't related to these patch series so I prefer to follow existing style and maybe post a follow up patch to update all.


> > + ERROR(cdev, "func_suspend() returned
> "
> > + "error %d\n", value);
>
> please dont split string literals over multiple lines

Done.

>
> > + default:
> > + break;
> > + }
>
> isnt that the default behavior already ? so these two lines are
> pointless ?

Removed.

>
> > --- a/include/linux/usb/ch9.h
> > +++ b/include/linux/usb/ch9.h
> > @@ -142,8 +142,6 @@
> > #define USB_DEVICE_LTM_ENABLE 50 /* dev may send LTM */
> > #define USB_INTRF_FUNC_SUSPEND 0 /* function suspend */
> >
> > -#define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00
> > -
> > #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL
> */
> >
> > /* Bit array elements as returned by the USB_REQ_GET_STATUS request.
> */
>
> erm, seems unrelated to this patchset ? did this sneak in by accident
> ?

You're right. It seems so...

> > +static inline int gadget_is_superspeed(struct usb_gadget *g)
> > +{
> > +#ifdef CONFIG_USB_GADGET_SUPERSPEED
> > + /* runtime test would check "g->is_superspeed" ... that might
> be
> > + * useful to work around hardware bugs, but is mostly
> pointless
> > + */
>
> multiline comments should read:
> /*
> * foo .....
> */

Done. Thanks for catching that! (checkpatch didn't for some reason...)


Best regards,
Tanya Brokhman
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/