Re: [PATCH 1/3] usb: gadget: function: f_fs: Fix doc for FUNCTIONFS_INTERFACE_REVMAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have no clue how I missed that. We can drop this patch.

On Tue, Apr 18, 2017 at 6:38 PM, Michal Nazarewicz <mina86@xxxxxxxxxx> wrote:
> On Tue, Apr 18 2017, Jerry Zhang wrote:
>> The comment for this states that it returns -ENODEV
>> when the function is inactive. Really, an inactive
>> function is treated as having no interfaces, so -EDOM
>> is returned.
>
> Uh?  Than what’s this:
>
>         if (code == FUNCTIONFS_INTERFACE_REVMAP) {
>                 struct ffs_function *func = ffs->func;
>                 ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV;
>
> ?  Are you saying that in the above func is always non-NULL?  If that’s
> the case, change the code to reflect that and give a justification of
> why you think it’s never NULL.
>
>> Signed-off-by: Jerry Zhang <zhangjerry@xxxxxxxxxx>
>> ---
>>  include/uapi/linux/usb/functionfs.h | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h
>> index b2a31a55a612..93085017513c 100644
>> --- a/include/uapi/linux/usb/functionfs.h
>> +++ b/include/uapi/linux/usb/functionfs.h
>> @@ -269,8 +269,7 @@ struct usb_functionfs_event {
>>
>>  /*
>>   * Returns reverse mapping of an interface.  Called on EP0.  If there
>> - * is no such interface returns -EDOM.  If function is not active
>> - * returns -ENODEV.
>> + * is no such interface returns -EDOM.
>>   */
>>  #define      FUNCTIONFS_INTERFACE_REVMAP     _IO('g', 128)
>
> --
> Best regards
> ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
> «If at first you don’t succeed, give up skydiving»
--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux