public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: jiaweiwei.xiyou@gmail.com
Cc: linux-kernel@vger.kernel.org, greg@kroah.com, akpm@linux-foundation.org
Subject: Re: [PATCH]Clean up CodingStyle for scripts/kconfig/gconf.c
Date: Wed, 23 Mar 2011 15:32:53 +0800	[thread overview]
Message-ID: <4D89A225.1060701@cn.fujitsu.com> (raw)
In-Reply-To: <20110323070017.GA3731@gmail.com>


>>> Hi us,
>>>    	Clean up CodingStyle for scripts/kconfig/gconf.c.
>>> 
>> 
>> What makes you think this is a bad style? Does Documentation/CodingStyle say
>> so? Does checkpatch.pl make a complain? Do you really think this improves
>> readability? I don't think so, and actually it makes the code worse.
> But we all write '#include <***>'. I have never seen '#  include <***>'.

Then let's see:

$ find -name '*.c' -exec grep -H '^# .*include' {} \;
./drivers/char/mem.c:# include <linux/efi.h>
./drivers/char/random.c:# include <linux/irq.h>
./drivers/scsi/nsp32.c:# include "nsp32_debug.c"
./drivers/video/epson1355fb.c:#  include <mach/hardware.h>

You can look into those cases, and then you should be able to figure out
why.

>> 
>> Run checkpatch.pl on this file, and you'll see lots of errors and warnings,
>> but pure codingstyle cleanup is rarely worth anything, so better don't do
>> that.
> I am sorry, I have not got your meaning clearly.

Codingstyle cleanups aren't worth your time, and it would be better for you
and for the kernel project as a whole if you can find something more valuable
to work on.

>> 
>>> Thanks.
>>> Best Regards.
>>> Harry Wei.
>>> 
>>> Signed-off-by: Harry Wei <harryxiyou@gmail.com>
>>> ---
>>>  scripts/kconfig/gconf.c |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>> 
>>> diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
>>> index 4558961..56da945 100644
>>> --- a/scripts/kconfig/gconf.c
>>> +++ b/scripts/kconfig/gconf.c
>>> @@ -7,7 +7,7 @@
>>>   */
>>>  
>>>  #ifdef HAVE_CONFIG_H
>>> -#  include <config.h>
>>> +#include <config.h>
>>>  #endif
>>>  
>>>  #include "lkc.h"

  reply	other threads:[~2011-03-23  7:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 14:38 [PATCH]Clean up CodingStyle for scripts/kconfig/gconf.c Harry Wei
2011-03-23  1:28 ` Li Zefan
2011-03-23  7:00   ` Harry Wei
2011-03-23  7:32     ` Li Zefan [this message]
     [not found]       ` <AANLkTik9tv7Qroin6TucgK5HnY8JOhUuTg8uk4PugC0c@mail.gmail.com>
2011-03-23 12:27         ` Harry Wei
2011-03-23  7:32   ` Michal Marek

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=4D89A225.1060701@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=jiaweiwei.xiyou@gmail.com \
    --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