lkml.org 
[lkml]   [2013]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4 v2] silicom: checkpatch: errors caused by macros
On Mon, Jun 17, 2013 at 02:03:43PM -0700, Joe Perches wrote:
> On Mon, 2013-06-17 at 23:49 +0300, Dan Carpenter wrote:
> > 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.
>
> Generally I think it's better that new submitters patches
> should go through more strict reviews and be as correct
> as possible. I think this is especially true for patches
> that are just checkpatch driven.

I totally disagree, sorry.


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