summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/ohci1394.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-08-02 18:44:00 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-17 19:31:20 +0200
commit611aa19fd60fe57059d9972fa6ae29f7472a13cf (patch)
treea87f71ef393eec3e904291d1d5da1f2fdc5bb11b /drivers/ieee1394/ohci1394.c
parent4b60912e52bc6ccdf587f2b92f3435ee2678d730 (diff)
downloadop-kernel-dev-611aa19fd60fe57059d9972fa6ae29f7472a13cf.zip
op-kernel-dev-611aa19fd60fe57059d9972fa6ae29f7472a13cf.tar.gz
ieee1394: safer definition of empty macros
A deactivated macro, defined as "#define foo(bar)", will result in silent corruption if somebody forgets a semicolon after a call to foo. Replace it by "#define foo(bar) do {} while (0)" which will reveal any respective syntax errors. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/ohci1394.c')
-rw-r--r--drivers/ieee1394/ohci1394.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 330dcf7..ea14c83 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -136,7 +136,7 @@
#define DBGMSG(fmt, args...) \
printk(KERN_INFO "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args)
#else
-#define DBGMSG(fmt, args...)
+#define DBGMSG(fmt, args...) do {} while (0)
#endif
#ifdef CONFIG_IEEE1394_OHCI_DMA_DEBUG
@@ -148,8 +148,8 @@ printk(KERN_INFO "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->
--global_outstanding_dmas, ## args)
static int global_outstanding_dmas = 0;
#else
-#define OHCI_DMA_ALLOC(fmt, args...)
-#define OHCI_DMA_FREE(fmt, args...)
+#define OHCI_DMA_ALLOC(fmt, args...) do {} while (0)
+#define OHCI_DMA_FREE(fmt, args...) do {} while (0)
#endif
/* print general (card independent) information */
@@ -210,7 +210,7 @@ static inline void packet_swab(quadlet_t *data, int tcode)
}
#else
/* Don't waste cycles on same sex byte swaps */
-#define packet_swab(w,x)
+#define packet_swab(w,x) do {} while (0)
#endif /* !LITTLE_ENDIAN */
/***********************************
OpenPOWER on IntegriCloud