lkml.org 
[lkml]   [2013]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/5] solicom: checkpatch: added parenthesis to macros
Date
fixed checkpatch error:
added parenthesis around complex macros.

Signed-off-by: Michael Banken <michael.banken@mathe.stud.uni-erlangen.de>
Signed-off-by: Lorenz Haspel <lorenz@badgers.com>
---
drivers/staging/silicom/bpctl_mod.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
index 85aa900..9d77924 100644
--- a/drivers/staging/silicom/bpctl_mod.c
+++ b/drivers/staging/silicom/bpctl_mod.c
@@ -44,9 +44,11 @@ MODULE_VERSION(BP_MOD_VER);
spinlock_t bpvm_lock;

#define lock_bpctl() \
-if (down_interruptible(&bpctl_sema)) { \
- return -ERESTARTSYS; \
-} \
+do { \
+ if (down_interruptible(&bpctl_sema)) { \
+ return -ERESTARTSYS; \
+ } \
+} while (0)

#define unlock_bpctl() \
up(&bpctl_sema);
@@ -7881,7 +7883,8 @@ int bypass_proc_create_dev_sd(bpctl_dev_t *pbp_device_block)
}
current_pfs->bypass_entry = procfs_dir;

-#define ENTRY(x) ret |= procfs_add(#x, &x##_ops, pbp_device_block)
+#define ENTRY(x) (ret |= procfs_add(#x, &x##_ops, pbp_device_block))
+
ENTRY(bypass_info);
if (pbp_device_block->bp_caps & SW_CTL_CAP) {
/* Create set param proc's */
--
1.7.10.4


\
 
 \ /
  Last update: 2013-06-17 17:01    [W:1.263 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site