public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]Clean up CodingStyle for scripts/kconfig/gconf.c
@ 2011-03-22 14:38 Harry Wei
  2011-03-23  1:28 ` Li Zefan
  0 siblings, 1 reply; 6+ messages in thread
From: Harry Wei @ 2011-03-22 14:38 UTC (permalink / raw)
  To: zippel, linux-kbuild, linux-kernel; +Cc: greg, joe, akpm

Hi us,
   	Clean up CodingStyle for scripts/kconfig/gconf.c.

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"
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH]Clean up CodingStyle for scripts/kconfig/gconf.c
  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   ` Michal Marek
  0 siblings, 2 replies; 6+ messages in thread
From: Li Zefan @ 2011-03-23  1:28 UTC (permalink / raw)
  To: zippel, linux-kbuild, linux-kernel, greg, joe, akpm

Harry Wei wrote:
> 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.

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.

> 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"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH]Clean up CodingStyle for scripts/kconfig/gconf.c
  2011-03-23  1:28 ` Li Zefan
@ 2011-03-23  7:00   ` Harry Wei
  2011-03-23  7:32     ` Li Zefan
  2011-03-23  7:32   ` Michal Marek
  1 sibling, 1 reply; 6+ messages in thread
From: Harry Wei @ 2011-03-23  7:00 UTC (permalink / raw)
  To: Li Zefan; +Cc: linux-kernel, greg, akpm

On Wed, Mar 23, 2011 at 09:28:48AM +0800, Li Zefan wrote:
> Harry Wei wrote:
> > 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 <***>'.
> 
> 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.
> 
> > 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"
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH]Clean up CodingStyle for scripts/kconfig/gconf.c
  2011-03-23  1:28 ` Li Zefan
  2011-03-23  7:00   ` Harry Wei
@ 2011-03-23  7:32   ` Michal Marek
  1 sibling, 0 replies; 6+ messages in thread
From: Michal Marek @ 2011-03-23  7:32 UTC (permalink / raw)
  To: Li Zefan; +Cc: zippel, linux-kbuild, linux-kernel, greg, joe, akpm

On 23.3.2011 02:28, Li Zefan wrote:
> Harry Wei wrote:
>> 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.

This include can be removed completely, there is no config.h in kconfig.

Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH]Clean up CodingStyle for scripts/kconfig/gconf.c
  2011-03-23  7:00   ` Harry Wei
@ 2011-03-23  7:32     ` Li Zefan
       [not found]       ` <AANLkTik9tv7Qroin6TucgK5HnY8JOhUuTg8uk4PugC0c@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Li Zefan @ 2011-03-23  7:32 UTC (permalink / raw)
  To: jiaweiwei.xiyou; +Cc: linux-kernel, greg, akpm


>>> 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"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH]Clean up CodingStyle for scripts/kconfig/gconf.c
       [not found]       ` <AANLkTik9tv7Qroin6TucgK5HnY8JOhUuTg8uk4PugC0c@mail.gmail.com>
@ 2011-03-23 12:27         ` Harry Wei
  0 siblings, 0 replies; 6+ messages in thread
From: Harry Wei @ 2011-03-23 12:27 UTC (permalink / raw)
  To: lizf; +Cc: linux-kernel

On Wed, Mar 23, 2011 at 04:20:00PM +0800, jiaweiwei wrote:
> On Wed, Mar 23, 2011 at 3:32 PM, Li Zefan <lizf@cn.fujitsu.com> wrote:
> 
> >
> > >>> 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>
> >
Okay, i see.
> > 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, i will try my best.

Best Regards.
Harry Wei.
> >
> > >>
> > >>> 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"
> >
> 
> 
> 
> -- 
>  do kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-23 12:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [not found]       ` <AANLkTik9tv7Qroin6TucgK5HnY8JOhUuTg8uk4PugC0c@mail.gmail.com>
2011-03-23 12:27         ` Harry Wei
2011-03-23  7:32   ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox