From: Maurice Dawson <mauricedawson2699@gmail.com>
To: gregkh@suse.de, arun.thomas@gmail.com, reodge@gmail.com,
mithlesh@linsyssoft.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] Staging: comedi: fix macro coding style issue in adl_pci9111.c
Date: Fri, 10 Sep 2010 20:20:42 +0100 [thread overview]
Message-ID: <1284146442-2906-1-git-send-email-mauricedawson2699@gmail.com> (raw)
This is a patch that fixes up, macros with multiple statements should be enclosed in a do - while loop, coding style issue in the adl_pci9111.c file found by the checkpatch.pl tool
Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com>
---
drivers/staging/comedi/drivers/adl_pci9111.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c
index 96c4f30..18103b6 100644
--- a/drivers/staging/comedi/drivers/adl_pci9111.c
+++ b/drivers/staging/comedi/drivers/adl_pci9111.c
@@ -266,19 +266,28 @@ TODO:
outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_8254_CONTROL)
#define pci9111_8254_counter_0_set(data) \
- outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \
+ do { \
+ outb(data & 0xFF, \
+ PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \
outb((data >> 8) & 0xFF, \
- PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0)
+ PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \
+ } while (0)
#define pci9111_8254_counter_1_set(data) \
- outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1); \
+ do { \
+ outb(data & 0xFF, \
+ PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1); \
outb((data >> 8) & 0xFF, \
- PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1)
+ PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1); \
+ } while (0)
#define pci9111_8254_counter_2_set(data) \
- outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2); \
+ do { \
+ outb(data & 0xFF, \
+ PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2); \
outb((data >> 8) & 0xFF, \
- PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2)
+ PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2); \
+ } while (0)
/* Function prototypes */
--
1.7.0.4
reply other threads:[~2010-09-10 19:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1284146442-2906-1-git-send-email-mauricedawson2699@gmail.com \
--to=mauricedawson2699@gmail.com \
--cc=arun.thomas@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mithlesh@linsyssoft.com \
--cc=reodge@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®