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, 02 Sep 2013 21:25:46 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Pavel Machek <pavel@...x.de>
CC:	kernel list <linux-kernel@...r.kernel.org>, balbi@...com,
	linux-usb@...r.kernel.org
Subject: Re: Fix style in s3c-hsotg.c

Hello.

On 09/02/2013 05:58 PM, Pavel Machek wrote:

> checkpatch.pl has some valid complaints about style in s3c-hsotg.c :
> macro with if should be really enclosed in do {} while, and puts is
> going to be slightly faster.

> Here's suggested patch. I don't have the hardware, so it is completely
> untested.

> Signed-off-by: Pavel Machek, <pavel@...x.de>

> diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
> index af22f24..f8e762a 100644
> --- a/drivers/usb/gadget/s3c-hsotg.c
> +++ b/drivers/usb/gadget/s3c-hsotg.c
> @@ -2091,12 +2091,14 @@ static void kill_all_requests(struct s3c_hsotg *hsotg,
>   }
>
>   #define call_gadget(_hs, _entry) \
> +do { \
>   	if ((_hs)->gadget.speed != USB_SPEED_UNKNOWN &&	\
>   	    (_hs)->driver && (_hs)->driver->_entry) { \
>   		spin_unlock(&_hs->lock); \
>   		(_hs)->driver->_entry(&(_hs)->gadget); \
>   		spin_lock(&_hs->lock); \
>   		}

    Indentation also needs fixing on this line, maybe in another patch...

> +} while (0)

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ