All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Geyslan G. Bem" <geyslan@gmail.com>
To: peter.senna@gmail.com
Cc: "Geyslan G. Bem" <geyslan@gmail.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH resend 4/9] usb: host: ehci.h: fix single statement macros
Date: Fri, 11 Dec 2015 18:24:47 -0300	[thread overview]
Message-ID: <1449869100-18347-5-git-send-email-geyslan@gmail.com> (raw)
In-Reply-To: <1449869100-18347-1-git-send-email-geyslan@gmail.com>

Don't use the 'do {} while (0)' wrapper in a single statement macro.

Caught by checkpatch: "WARNING: Single statement macros should not
use a do {} while (0) loop"

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
 drivers/usb/host/ehci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index cfeebd8..c86194f 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -244,9 +244,9 @@ struct ehci_hcd {			/* one per controller */
 	/* irq statistics */
 #ifdef EHCI_STATS
 	struct ehci_stats	stats;
-#	define COUNT(x) do { (x)++; } while (0)
+#	define COUNT(x) ((x)++)
 #else
-#	define COUNT(x) do {} while (0)
+#	define COUNT(x)
 #endif
 
 	/* debug files */
-- 
2.6.3


  parent reply	other threads:[~2015-12-11 21:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 21:24 [PATCH resend 0/9] usb: host: ehci.h cleanup Geyslan G. Bem
2015-12-11 21:24 ` [PATCH resend 1/9] usb: host: ehci.h: remove space before comma Geyslan G. Bem
2015-12-11 21:24 ` [PATCH resend 2/9] usb: host: ehci.h: remove space before function open parenthesis Geyslan G. Bem
2015-12-11 21:24 ` [PATCH resend 3/9] usb: host: ehci.h: remove space before open square bracket Geyslan G. Bem
2015-12-11 21:24 ` Geyslan G. Bem [this message]
2015-12-11 21:24 ` [PATCH resend 5/9] usb: host: ehci.h: remove direct use of __attribute__ keyword Geyslan G. Bem
2015-12-11 21:24 ` [PATCH resend 6/9] usb: host: ehci.h: use space after comma Geyslan G. Bem
2015-12-11 21:24 ` [PATCH resend 7/9] usb: host: ehci.h: remove macros trailing semicolon Geyslan G. Bem
2015-12-11 21:24 ` [PATCH resend 8/9] usb: host: ehci.h: move pointer operator to name side Geyslan G. Bem
2015-12-11 21:24 ` [PATCH resend 9/9] usb: host: ehci.h: move constant to right Geyslan G. Bem
     [not found] ` <CAGG-pUS=-zQ5aj8xHGa6tMLsR2Ncv0pMeMafXFcFo-Vc2Kh0+g@mail.gmail.com>
2015-12-24 16:27   ` [PATCH resend 0/9] usb: host: ehci.h cleanup Greg Kroah-Hartman
2015-12-24 16:36     ` Geyslan G. Bem

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=1449869100-18347-5-git-send-email-geyslan@gmail.com \
    --to=geyslan@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.senna@gmail.com \
    --cc=stern@rowland.harvard.edu \
    /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.