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

2017-04-19 Thread Jerry Zhang
I have no clue how I missed that. We can drop this patch.

On Tue, Apr 18, 2017 at 6:38 PM, Michal Nazarewicz  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 
>> ---
>>  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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2017-04-18 Thread Michal Nazarewicz
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 
> ---
>  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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2017-04-18 Thread Jerry Zhang
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.

Signed-off-by: Jerry Zhang 
---
 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.
  */
 #defineFUNCTIONFS_INTERFACE_REVMAP _IO('g', 128)
 
-- 
2.12.2.816.g281164-goog

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html