lkml.org 
[lkml]   [2011]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH/RESEND 3/5 v4] usb: Configure endpoint according to gadget speed.
Date
> >+	/* find descriptors */
> >+ for (d_spd = next_ep_desc(speed_desc); d_spd;
> >+ d_spd = next_ep_desc(d_spd+1)) {
>
> this might look better if you would something like the list_for_each()
> macro.

The function next_ep_desc() goes over the endpoint descriptors (struct
usb_descriptor_header). It's not a list so I don't see how the
list_for_each() macro can be used here. Am I missing something?

> > /**
> >+ * config_ep_by_speed() - configures the given endpoint
> >+ * according to gadget speed.
> >+ * @g: pointer to the gadget
> >+ * @f: usb function
> >+ * @_ep: the endpoint to configure
> >+ *
> >+ * Return: error code, 0 on success
> >+ *
> >+ * This function chooses the right descriptors for a given
> >+ * endpoint according to gadget speed and saves in in the
> >+ * endpoint desc field. If the endpoint already has a descriptor
> >+ * assigned to it - overwrites it with currently corresponding
> >+ * descriptor. The endpoint maxpacket field is updated according
> >+ * to the choosen descriptor.
> >+ * Note: the supplied function should hold all the descriptors
> >+ * for supported speeds
> >+ */
>
> You have the same comment (including the same typo) here and in the .c.
> Please use only on (in the .c file) as they will go async.

Thanks for noticing that!
What do you mean by "they will go async"? Is there some sort of automation
that updates the comments for functions from c files to the headers? I'm not
familiar with such...


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






\
 
 \ /
  Last update: 2011-04-13 11:57    [W:0.040 / U:5.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site