From: Dan Carpenter <dan.carpenter@oracle.com>
To: Lorenz Haspel <lorenz@badgers.com>
Cc: devel@linuxdriverproject.org, gregkh@linuxfoundation.org,
puff65537@bansheeslibrary.com, viro@zeniv.linux.org.uk,
michael.banken@mathe.stud.uni-erlangen.de,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
linux-kernel@i4.informatik.uni-erlangen.de
Subject: Re: [PATCH 4/5] silicom: checkpatch: trailing statements
Date: Mon, 17 Jun 2013 18:28:23 +0300 [thread overview]
Message-ID: <20130617152823.GF5008@mwanda> (raw)
In-Reply-To: <1371478817-28357-4-git-send-email-lorenz@badgers.com>
On Mon, Jun 17, 2013 at 04:20:16PM +0200, Lorenz Haspel wrote:
> fixed checkpatch error:
> trailing statements that should be on next line
>
> Signed-off-by: Michael Banken <michael.banken@mathe.stud.uni-erlangen.de>
> Signed-off-by: Lorenz Haspel <lorenz@badgers.com>
> ---
> drivers/staging/silicom/bpctl_mod.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
> index 78570dd..85aa900 100644
> --- a/drivers/staging/silicom/bpctl_mod.c
> +++ b/drivers/staging/silicom/bpctl_mod.c
> @@ -165,7 +165,9 @@ static int bp_device_event(struct notifier_block *unused,
> memcpy(&cbuf, drvinfo.bus_info, 32);
> buf = &cbuf[0];
>
> - while (*buf++ != ':') ;
> + while (*buf != ':')
> + buf++;
> + buf++;
No. This is more complicated than the original. While loops like
this are idiomatic in C. The way to fix this is just to do:
while (*buf++ != ':')
;
Same for the rest, just move the semi-colon down in every case.
regards,
dan carpenter
next prev parent reply other threads:[~2013-06-17 15:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-17 14:20 [PATCH 1/5] silicom: checkpatch: assignments in if conditions Lorenz Haspel
2013-06-17 14:20 ` [PATCH 2/5] silicom: checkpatch: fixed whitespace errors Lorenz Haspel
2013-06-17 15:20 ` Dan Carpenter
2013-06-17 15:34 ` Dan Carpenter
2013-06-17 14:20 ` [PATCH 3/5] silicom: checkpatch: explicit initialised statics Lorenz Haspel
2013-06-17 14:20 ` [PATCH 4/5] silicom: checkpatch: trailing statements Lorenz Haspel
2013-06-17 15:28 ` Dan Carpenter [this message]
2013-06-17 14:20 ` [PATCH 5/5] solicom: checkpatch: added parenthesis to macros Lorenz Haspel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130617152823.GF5008@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@i4.informatik.uni-erlangen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenz@badgers.com \
--cc=michael.banken@mathe.stud.uni-erlangen.de \
--cc=puff65537@bansheeslibrary.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.