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: <20130617204922.GM5008@mwanda>
Date:	Mon, 17 Jun 2013 23:49:22 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Lorenz Haspel <lorenz@...gers.com>, devel@...uxdriverproject.org,
	gregkh@...uxfoundation.org, puff65537@...sheeslibrary.com,
	viro@...iv.linux.org.uk, michael.banken@...he.stud.uni-erlangen.de,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	linux-kernel@...informatik.uni-erlangen.de
Subject: Re: [PATCH 4/4 v2] silicom: checkpatch: errors caused by macros

On Mon, Jun 17, 2013 at 12:42:12PM -0700, Joe Perches wrote:
> On Mon, 2013-06-17 at 21:20 +0200, Lorenz Haspel wrote:
> > fixed checkpatch error:
> > added parenthesis around complex macro.
> > 
> > Macro with return was only used once in the code,
> > so I expandet it in-place.
> []
> > diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
> []
> > -#define lock_bpctl()					\
> > -if (down_interruptible(&bpctl_sema)) {			\
> > -	return -ERESTARTSYS;				\
> > -}							\
> > -
> >  #define unlock_bpctl()					\
> >  	up(&bpctl_sema);
> 
> Symmetry please.
> 
> Most likely, this unlock_bpctl macro is only used once too.
> I suggest removing it as well.
> 

Joe is right, of course, but this could be fixed in a later patch.

regards,
dan carpenter
--
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