Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1491173

Re: [PATCH 3/5] ISDN-CAPI: Adjust 17 function calls together with variable assignments

From Paul Bolle <pebolle@tiscali.nl>
Newsgroups linux.kernel
Subject Re: [PATCH 3/5] ISDN-CAPI: Adjust 17 function calls together with variable assignments
Date 2016-09-26 11:20 +0200
Message-ID <slAeR-20r-7@gated-at.bofh.it> (permalink)
References <slfDr-5Uj-5@gated-at.bofh.it> <slfDs-5Uj-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 2016-09-25 at 13:13 +0200, SF Markus Elfring wrote:
> The script "checkpatch.pl" can point out that assignments should usually
> not be performed within condition checks.
> Thus move the assignment for a variable to a separate statement
> in four functions.

Did you recycle this commit explanation? Because git diff tells me you
actually touched about eight functions.  

> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/isdn/capi/capidrv.c | 59 +++++++++++++++++++++++++++------------------
>  1 file changed, 36 insertions(+), 23 deletions(-)

So I ran checkpatch on this file, just like you did. Specifically, I
did:
    scripts/checkpatch.pl -f drivers/isdn/capi/capidrv.c | grep "assignment in if condition" | wc -l 

It tells me there are actually 18 instances of this "ERROR". Why did
you ignore one of it in this patch?


Paul Bolle

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] ISDN-CAPI: Fine-tuning for several function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-25 13:20 +0200
  [PATCH 3/5] ISDN-CAPI: Adjust 17 function calls together with  variable assignments SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-25 13:20 +0200
    Re: [PATCH 3/5] ISDN-CAPI: Adjust 17 function calls together with  variable assignments Paul Bolle <pebolle@tiscali.nl> - 2016-09-26 11:20 +0200
      Re: ISDN-CAPI: Adjust 17 function calls together with variable  assignments SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-26 14:40 +0200
  [PATCH 4/5] ISDN-CAPI: Adjust checks for null pointers in four  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-25 13:20 +0200
  [PATCH 2/5] ISDN-CAPI: Delete error messages for a failed memory  allocation in four functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-25 13:20 +0200

csiph-web