From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, gregkh@suse.de
Subject: Re: [PATCH] Staging: batman-adv: Remove useless braces
Date: Tue, 26 Oct 2010 10:56:00 +0200 [thread overview]
Message-ID: <201010261056.06445.sven.eckelmann@gmx.de> (raw)
In-Reply-To: <AANLkTimiMAeonjLpnuJNpeQhtdLmp+z1uqyjVfZbFmcr@mail.gmail.com>
[-- Attachment #1: Type: Text/Plain, Size: 1666 bytes --]
On Tuesday 26 October 2010 10:04:31 Andy Shevchenko wrote:
> It's odd.
>
> I've checked it before submission:
>
> andy@fs-test:~/prj/linux-2.6(mine)$ git show
> 77099f0afe94928b5b0066a7efa5fa9f81696b54 | scripts/checkpatch.pl -
> total: 0 errors, 0 warnings, 177 lines checked
>
> Your patch has no obvious style problems and is ready for submission.
The problem seems to be that checkpatch doesn't check the generated file
(because it can't), but only the lines you changed. Those braces aren't on
lines you changed and thus they will not be checked.
But also checkpatch is sometimes a little bit "odd" when it comes to file type
detection (maybe more a user problem than a checkpatch problem)...
$ git show 77099f0afe94928b5b0066a7efa5fa9f81696b54:drivers/staging/batman-adv/vis.c| scripts/checkpatch.pl -f -
total: 0 errors, 0 warnings, 0 checks, 895 lines checked
Your patch has no obvious style problems and is ready for submission.
$ git show 77099f0afe94928b5b0066a7efa5fa9f81696b54:drivers/staging/batman-adv/vis.c > test.c
$ scripts/checkpatch.pl -f test.c
WARNING: braces {} are not necessary for any arm of this statement
#136: FILE: test.c:136:
+ if (entry->primary)
[...]
+ else {
[...]
total: 0 errors, 1 warnings, 895 lines checked
test.c has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
When you call it test instead of test.c then it wouldn't find the problem
either.
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2010-10-26 8:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 21:43 Sven Eckelmann
2010-10-26 8:04 ` Andy Shevchenko
2010-10-26 8:56 ` Sven Eckelmann [this message]
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=201010261056.06445.sven.eckelmann@gmx.de \
--to=sven.eckelmann@gmx.de \
--cc=andy.shevchenko@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®