diff options
author | Lorenz Haspel <lorenz@badgers.com> | 2013-06-19 04:43:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 19:13:13 -0400 |
commit | 27a9095aa00426f80660df0e5f857a06852e1496 (patch) | |
tree | e4dc78fbfba11f0f5f71ba7b08f040aa76b09307 | |
parent | bbeebeccb066b408d9e3490659e8ff417153c5ee (diff) |
silicom: checkpatch: errors caused by macros
fixed checkpatch error:
added parenthesis around complex macro.
Macro with return was only used once in the code,
so I expandet it in-place.
Signed-off-by: Lorenz Haspel <lorenz@badgers.com>
Signed-off-by: Michael Banken <michael.banken@mathe.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/silicom/bpctl_mod.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index 3919d16cb84b..4b3a1ae250c6 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c | |||
@@ -43,11 +43,6 @@ MODULE_DESCRIPTION(BP_MOD_DESCR); | |||
43 | MODULE_VERSION(BP_MOD_VER); | 43 | MODULE_VERSION(BP_MOD_VER); |
44 | spinlock_t bpvm_lock; | 44 | spinlock_t bpvm_lock; |
45 | 45 | ||
46 | #define lock_bpctl() \ | ||
47 | if (down_interruptible(&bpctl_sema)) { \ | ||
48 | return -ERESTARTSYS; \ | ||
49 | } \ | ||
50 | |||
51 | #define unlock_bpctl() \ | 46 | #define unlock_bpctl() \ |
52 | up(&bpctl_sema); | 47 | up(&bpctl_sema); |
53 | 48 | ||
@@ -5414,7 +5409,8 @@ static long device_ioctl(struct file *file, /* see include/linux/fs.h */ | |||
5414 | static bpctl_dev_t *pbpctl_dev; | 5409 | static bpctl_dev_t *pbpctl_dev; |
5415 | 5410 | ||
5416 | /* lock_kernel(); */ | 5411 | /* lock_kernel(); */ |
5417 | lock_bpctl(); | 5412 | if (down_interruptible(&bpctl_sema)) |
5413 | return -ERESTARTSYS; | ||
5418 | /* local_irq_save(flags); */ | 5414 | /* local_irq_save(flags); */ |
5419 | /* if(!spin_trylock_irqsave(&bpvm_lock)){ | 5415 | /* if(!spin_trylock_irqsave(&bpvm_lock)){ |
5420 | local_irq_restore(flags); | 5416 | local_irq_restore(flags); |
@@ -7871,7 +7867,8 @@ int bypass_proc_create_dev_sd(bpctl_dev_t *pbp_device_block) | |||
7871 | } | 7867 | } |
7872 | current_pfs->bypass_entry = procfs_dir; | 7868 | current_pfs->bypass_entry = procfs_dir; |
7873 | 7869 | ||
7874 | #define ENTRY(x) ret |= procfs_add(#x, &x##_ops, pbp_device_block) | 7870 | #define ENTRY(x) (ret |= procfs_add(#x, &x##_ops, pbp_device_block)) |
7871 | |||
7875 | ENTRY(bypass_info); | 7872 | ENTRY(bypass_info); |
7876 | if (pbp_device_block->bp_caps & SW_CTL_CAP) { | 7873 | if (pbp_device_block->bp_caps & SW_CTL_CAP) { |
7877 | /* Create set param proc's */ | 7874 | /* Create set param proc's */ |