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  linux-hardening  linux-cve-announce  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, 30 Dec 2019 10:47:25 +0530
From:   Nagarjuna Kristam <nkristam@...dia.com>
To:     Thierry Reding <thierry.reding@...il.com>
CC:     <balbi@...nel.org>, <gregkh@...uxfoundation.org>,
        <jonathanh@...dia.com>, <mark.rutland@....com>,
        <robh+dt@...nel.org>, <kishon@...com>,
        <devicetree@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
        <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [Patch V2 03/18] phy: tegra: xusb: Add usb-role-switch support



On 29-12-2019 15:06, Thierry Reding wrote:
> On Fri, Dec 27, 2019 at 12:09:22PM +0530, Nagarjuna Kristam wrote:
>> On 19-12-2019 18:56, Thierry Reding wrote:
>>> On Wed, Dec 18, 2019 at 02:46:16PM +0530, Nagarjuna Kristam wrote:
> [...]
>>>> @@ -551,11 +556,42 @@ static const char *const modes[] = {
>>>>    	[USB_DR_MODE_OTG] = "otg",
>>>>    };
>>>> +static int tegra_xusb_role_sw_set(struct device *dev, enum usb_role role)
>>>> +{
>>>> +	dev_dbg(dev, "%s calling notifier for role is %d\n", __func__, role);
>>> I don't understand what "for role is %d" means here. I think perhaps you
>>> meant to simply say "for role %d"? Also, perhaps add parentheses after
>>> the "%s" to clarify that you're referring to a function.
>>>
>> Yes, intention is to print role, Will update as mentioned "for role %d"
> It might be better to print the name of the role here because I suspect
> very few people know the value of the role defines without looking them
> up. I thought there was already a function to return the role name for
> a given enum usb_role, but it seems like we only have name -> enum
> conversion. Might be worth adding that, but doesn't have to be as part
> of this series.
> 
> Thierry

Will add a structure to define strings for roles enums, similar to modes
usage in this driver.

-Nagarjuna

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ