From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Pavel Machek <pavel@denx.de>
Cc: kernel list <linux-kernel@vger.kernel.org>,
balbi@ti.com, linux-usb@vger.kernel.org
Subject: Re: Fix style in s3c-hsotg.c
Date: Mon, 02 Sep 2013 21:25:46 +0400 [thread overview]
Message-ID: <5224CA1A.6070004@cogentembedded.com> (raw)
In-Reply-To: <20130902135832.GA22300@amd.pavel.ucw.cz>
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@denx.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
next prev parent reply other threads:[~2013-09-02 17:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-02 13:58 Fix style in s3c-hsotg.c Pavel Machek
2013-09-02 17:25 ` Sergei Shtylyov [this message]
2013-09-17 15:42 ` Felipe Balbi
2013-09-17 22:04 ` Pavel Machek
2013-09-18 1:45 ` Felipe Balbi
2013-09-18 9:20 ` Pavel Machek
2013-09-18 14:11 ` Felipe Balbi
2013-09-25 15:39 ` Bartlomiej Zolnierkiewicz
2013-09-25 20:35 ` Felipe Balbi
2013-09-25 23:53 ` Pavel Machek
2013-09-25 21:15 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2013-09-04 1:33 Jingoo Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5224CA1A.6070004@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=balbi@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pavel@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.