Re: [PATCH v5 1/5] gadget: Introduce the notifier functions

From: Baolin Wang
Date: Sun Nov 08 2015 - 21:02:32 EST


On 7 November 2015 at 00:56, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, Nov 06, 2015 at 07:35:10PM +0800, Baolin Wang wrote:

>> #ifdef CONFIG_HAS_DMA
>> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
>> index c14a69b..755e8bc 100644
>> --- a/include/linux/usb/gadget.h
>> +++ b/include/linux/usb/gadget.h
>> @@ -609,6 +609,8 @@ struct usb_gadget {
>> unsigned out_epnum;
>> unsigned in_epnum;
>> struct usb_otg_caps *otg_caps;
>> + struct raw_notifier_head nh;
>> + struct mutex lock;
>
> You have to document what this lock protects.

OK.

>
>
>>
>> unsigned sg_supported:1;
>> unsigned is_otg:1;
>> @@ -1183,6 +1185,22 @@ extern void usb_gadget_unmap_request(struct usb_gadget *gadget,
>>
>> /*-------------------------------------------------------------------------*/
>>
>> +/**
>> + * Register a notifiee to get notified by any attach status changes from
>> + * the usb gadget
>> + */
>
> kerneldoc does not belong in a .h file.
>

I'll remove the comments.

> And the kbuild system found lots of problems with this series, please
> fix those at the very least :(

I'm sorry for that, I'll check the patches again. Thanks for your comments.

>
> thanks,
>
> greg k-h



--
Baolin.wang
Best Regards
--
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/