lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1371631388-27679-1-git-send-email-lorenz@badgers.com>
Date:	Wed, 19 Jun 2013 10:43:07 +0200
From:	Lorenz Haspel <lorenz@...gers.com>
To:	devel@...uxdriverproject.org
Cc:	gregkh@...uxfoundation.org, puff65537@...sheeslibrary.com,
	viro@...iv.linux.org.uk, michael.banken@...he.stud.uni-erlangen.de,
	dan.carpenter@...cle.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org,
	linux-kernel@...informatik.uni-erlangen.de,
	Lorenz Haspel <lorenz@...gers.com>
Subject: [PATCH 1/2 v2] 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@...gers.com>
Signed-off-by: Michael Banken <michael.banken@...he.stud.uni-erlangen.de>
---
v2: expanded macro in-place
---
 drivers/staging/silicom/bpctl_mod.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
index a0ea241..75672af 100644
--- a/drivers/staging/silicom/bpctl_mod.c
+++ b/drivers/staging/silicom/bpctl_mod.c
@@ -43,11 +43,6 @@ MODULE_DESCRIPTION(BP_MOD_DESCR);
 MODULE_VERSION(BP_MOD_VER);
 spinlock_t bpvm_lock;
 
-#define lock_bpctl()					\
-if (down_interruptible(&bpctl_sema)) {			\
-	return -ERESTARTSYS;				\
-}							\
-
 #define unlock_bpctl()					\
 	up(&bpctl_sema);
 
@@ -5398,7 +5393,8 @@ static long device_ioctl(struct file *file,	/* see include/linux/fs.h */
 	static bpctl_dev_t *pbpctl_dev;
 
 	/* lock_kernel(); */
-	lock_bpctl();
+	if (down_interruptible(&bpctl_sema))
+		return -ERESTARTSYS;
 	/* local_irq_save(flags); */
 	/* if(!spin_trylock_irqsave(&bpvm_lock)){
 	   local_irq_restore(flags);
@@ -7855,7 +7851,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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ