lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 8 Jul 2019 12:39:07 +0000
From:   Pawel Laszczak <pawell@...ence.com>
To:     Felipe Balbi <felipe.balbi@...ux.intel.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "hdegoede@...hat.com" <hdegoede@...hat.com>,
        "heikki.krogerus@...ux.intel.com" <heikki.krogerus@...ux.intel.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "rogerq@...com" <rogerq@...com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jbergsagel@...com" <jbergsagel@...com>,
        "nsekhar@...com" <nsekhar@...com>, "nm@...com" <nm@...com>,
        Suresh Punnoose <sureshp@...ence.com>,
        "peter.chen@....com" <peter.chen@....com>,
        Jayshri Dajiram Pawar <jpawar@...ence.com>,
        Rahul Kumar <kurahul@...ence.com>
Subject: RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver


>
>(please send it as a formal patch from now on)
I will send it. I think even today. 

>
>Hi,
>
>Pawel Laszczak <pawell@...ence.com> writes:
>> The prototype was added , but not all text was past. Sorry for that.
>>
>> Fixed version:  with your changes.
>>
>> ///// v2 corrected
>> commit 4553d48dd0500085d90c8280e28714072279c3dd (HEAD)
>> Author: Pawel Laszczak <pawell@...ence.com>
>> Date:   Mon Jul 8 12:53:47 2019 +0200
>>
>>     usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.
>>
>>     Patch introduces new function usb_dr_mode_to_string for converting dual role
>>     mod to string and removes static from usb_dr_mode_to_string definition.
>>
>>     Both changes have made to avoid duplication of code by cdns3 driver.
>
>missing Signed-off-by
>
>> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
>> index 69f1b6328532..c156817672c4 100644
>> --- a/include/linux/usb/otg.h
>> +++ b/include/linux/usb/otg.h
>> @@ -129,4 +129,20 @@ enum usb_dr_mode {
>>   */
>>  extern enum usb_dr_mode usb_get_dr_mode(struct device *dev);
>>
>> +/**
>> + * usb_get_dr_mode_from_string - Convert string to dual role mode.
>> + * @str: Pointer to the given string
>> + *
>> + * The function gets string and returns the correspondig enum usb_dr_mode.
>> + */
>
>why duplicate the documentation? Perhaps put it only in the header,
>otherwise we will need to update two locations whenever these functions
>change.

Ok, I've removed it from drviers/usb/common/common.c.

>
>> +extern enum usb_dr_mode usb_get_dr_mode_from_string(const char *str);
>> +
>> +/**
>> + * usb_dr_mode_to_string - Convert dual role mode to string.
>> + * @dr_mode: Pointer to the given dual role mode
>> + *
>> + * The function gets enum usb_dr_mode, and returns the correspondig string.
>> + */
>> +extern const char *usb_dr_mode_to_string(const enum usb_dr_mode dr_mode);
>
>Don't you need a stub for builds when CONFIG_USB_COMMON=n?
>
We don't need it. It will be enabled when USB_GADGET or USB is enabled.
It should cover all cases.  

menuconfig USB_GADGET
	tristate "USB Gadget Support"
	select USB_COMMON

config USB
	tristate "Support for Host-side USB"
	depends on USB_ARCH_HAS_HCD
	select USB_COMMON

Pawel

>--
>balbi

Powered by blists - more mailing lists