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, 22 Jul 2019 10:12:05 +0000
From:   Pawel Laszczak <pawell@...ence.com>
To:     Joe Perches <joe@...ches.com>,
        "felipe.balbi@...ux.intel.com" <felipe.balbi@...ux.intel.com>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.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>,
        Jayshri Dajiram Pawar <jpawar@...ence.com>,
        Rahul Kumar <kurahul@...ence.com>,
        Anil Joy Varughese <aniljoy@...ence.com>
Subject: RE: [PATCH v10 3/6] usb:common Patch simplify
 usb_decode_set_clear_feature function.

>
>
>On Sun, 2019-07-21 at 19:32 +0100, Pawel Laszczak wrote:
>> Patch adds usb_decode_test_mode and usb_decode_device_feature functions,
>> which allow to make more readable and simplify the
>> usb_decode_set_clear_feature function.
>
><chuckle>  I need to read entire patch series before
>commenting more I guess...
>
>> Signed-off-by: Pawel Laszczak <pawell@...ence.com>
>> ---
>>  drivers/usb/common/debug.c | 89 ++++++++++++++++++--------------------
>>  1 file changed, 43 insertions(+), 46 deletions(-)
>>
>> diff --git a/drivers/usb/common/debug.c b/drivers/usb/common/debug.c
>[]
>> +static const char *usb_decode_device_feature(u16 wValue)
>
>I believe this is still unnecessary hungarian.

it's common in usb subsystem if driver refers to descriptors fields.
>
>> +{
>> +	switch (wValue) {
>> +	case USB_DEVICE_SELF_POWERED:
>> +		return "Self Powered";
>> +	case USB_DEVICE_REMOTE_WAKEUP:
>> +		return "Remote Wakeup";
>> +	case USB_DEVICE_TEST_MODE:
>> +		return "Test Mode";
>> +	case USB_DEVICE_U1_ENABLE:
>> +		return "U1 Enable";
>> +	case USB_DEVICE_U2_ENABLE:
>> +		return "U2 Enable";
>> +	case USB_DEVICE_LTM_ENABLE:
>> +		return "LTM Enable";
>> +	default:
>> +		return "UNKNOWN";
>> +	}
>> +}
>
>
But yeah, exactly like this... ;)
>

Pawell

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ