public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* checkpatch warning of struct indentation
@ 2009-01-12 17:57 Steven Rostedt
  2009-01-12 18:09 ` Frédéric Weisbecker
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Steven Rostedt @ 2009-01-12 17:57 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: LKML, Ingo Molnar, Andrew Morton


Hi,

I'm now seeing the following warnings from checkpatch:

#325: FILE: kernel/trace/trace_stat.c:21:
+	void 			*stat;

ERROR: "foo 	*bar" should be "foo *bar"
#334: FILE: kernel/trace/trace_stat.c:27:
+	struct tracer_stat 	*ts;

ERROR: "foo		*bar" should be "foo	*bar"
#337: FILE: kernel/trace/trace_stat.c:30:
+	struct dentry		*file;

This is for:

struct tracer_stat_session {
        struct list_head        session_list;
        struct tracer_stat      *ts;
        struct list_head        stat_list;
        struct mutex            stat_mutex;
        struct dentry           *file;
};

Which looks a hell of a lot better than:

struct tracer_stat_session {
        struct list_head session_list;
        struct tracer_stat *ts;
        struct list_head stat_list;
        struct mutex stat_mutex;
        struct dentry *file;
};

We probably do not want to warn on such things.

-- Steve


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

* Re: checkpatch warning of struct indentation
  2009-01-12 17:57 checkpatch warning of struct indentation Steven Rostedt
@ 2009-01-12 18:09 ` Frédéric Weisbecker
  2009-01-12 18:35   ` Steven Rostedt
  2009-01-12 18:20 ` Ingo Molnar
  2009-01-12 18:51 ` Andy Whitcroft
  2 siblings, 1 reply; 9+ messages in thread
From: Frédéric Weisbecker @ 2009-01-12 18:09 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Andy Whitcroft, LKML, Ingo Molnar, Andrew Morton

2009/1/12 Steven Rostedt <rostedt@goodmis.org>:
>
> Hi,
>
> I'm now seeing the following warnings from checkpatch:
>
> #325: FILE: kernel/trace/trace_stat.c:21:
> +       void                    *stat;
>
> ERROR: "foo     *bar" should be "foo *bar"
> #334: FILE: kernel/trace/trace_stat.c:27:
> +       struct tracer_stat      *ts;
>
> ERROR: "foo             *bar" should be "foo    *bar"
> #337: FILE: kernel/trace/trace_stat.c:30:
> +       struct dentry           *file;


Oh my patch :-)
Yeah I had the same errors when I checked it. I ignored them because
I because I remembered checkpatch.pl didn't warn about such things before.
And it seems to warn about such statements since very recently...


> This is for:
>
> struct tracer_stat_session {
>        struct list_head        session_list;
>        struct tracer_stat      *ts;
>        struct list_head        stat_list;
>        struct mutex            stat_mutex;
>        struct dentry           *file;
> };
>
> Which looks a hell of a lot better than:
>
> struct tracer_stat_session {
>        struct list_head session_list;
>        struct tracer_stat *ts;
>        struct list_head stat_list;
>        struct mutex stat_mutex;
>        struct dentry *file;
> };
>
> We probably do not want to warn on such things.
>
> -- Steve
>
> --
> 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] 9+ messages in thread

* Re: checkpatch warning of struct indentation
  2009-01-12 17:57 checkpatch warning of struct indentation Steven Rostedt
  2009-01-12 18:09 ` Frédéric Weisbecker
@ 2009-01-12 18:20 ` Ingo Molnar
  2009-01-12 18:51 ` Andy Whitcroft
  2 siblings, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2009-01-12 18:20 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Andy Whitcroft, LKML, Andrew Morton


* Steven Rostedt <rostedt@goodmis.org> wrote:

> Hi,
> 
> I'm now seeing the following warnings from checkpatch:
> 
> #325: FILE: kernel/trace/trace_stat.c:21:
> +	void 			*stat;
> 
> ERROR: "foo 	*bar" should be "foo *bar"
> #334: FILE: kernel/trace/trace_stat.c:27:
> +	struct tracer_stat 	*ts;
> 
> ERROR: "foo		*bar" should be "foo	*bar"
> #337: FILE: kernel/trace/trace_stat.c:30:
> +	struct dentry		*file;
> 
> This is for:
> 
> struct tracer_stat_session {
>         struct list_head        session_list;
>         struct tracer_stat      *ts;
>         struct list_head        stat_list;
>         struct mutex            stat_mutex;
>         struct dentry           *file;
> };
> 
> Which looks a hell of a lot better than:
> 
> struct tracer_stat_session {
>         struct list_head session_list;
>         struct tracer_stat *ts;
>         struct list_head stat_list;
>         struct mutex stat_mutex;
>         struct dentry *file;
> };
> 
> We probably do not want to warn on such things.

yeah, those warnings look bogus.

	Ingo

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

* Re: checkpatch warning of struct indentation
  2009-01-12 18:09 ` Frédéric Weisbecker
@ 2009-01-12 18:35   ` Steven Rostedt
  2009-01-12 19:34     ` Frederic Weisbecker
  2009-01-13 14:45     ` Johannes Weiner
  0 siblings, 2 replies; 9+ messages in thread
From: Steven Rostedt @ 2009-01-12 18:35 UTC (permalink / raw)
  To: Frédéric Weisbecker
  Cc: Andy Whitcroft, LKML, Ingo Molnar, Andrew Morton


On Mon, 12 Jan 2009, Fr?d?ric Weisbecker wrote:

> 2009/1/12 Steven Rostedt <rostedt@goodmis.org>:
> >
> > Hi,
> >
> > I'm now seeing the following warnings from checkpatch:
> >
> > #325: FILE: kernel/trace/trace_stat.c:21:
> > +       void                    *stat;
> >
> > ERROR: "foo     *bar" should be "foo *bar"
> > #334: FILE: kernel/trace/trace_stat.c:27:
> > +       struct tracer_stat      *ts;
> >
> > ERROR: "foo             *bar" should be "foo    *bar"
> > #337: FILE: kernel/trace/trace_stat.c:30:
> > +       struct dentry           *file;
> 
> 
> Oh my patch :-)
> Yeah I had the same errors when I checked it. I ignored them because
> I because I remembered checkpatch.pl didn't warn about such things before.
> And it seems to warn about such statements since very recently...

Heh, I should have CC'd you on this complaint ;-)

Yeah, this is a new warning and since we do a lot of these types of
indentation, and they are marked as "ERROR", I would like to see these go 
away. Perhaps they need to test for parenthesis, so:

 int func(foo		*bar)

gets caught.


[off topic, funny English grammar]

I noticed that you said:

   And it seems to warn about such statements since very recently

This sounds strange. I know in German (and I know you are not German, but 
it's what I have most experience with) the word "seit" gets translated 
into "since" for such statements as above. A lot of Germans that I know 
make this funny sounding phrase. I would have written it like:

   And, recently, it seems to warn about such statements.

Don't take this as a criticism. I'm the last person to criticize anyone's 
grammar. For being an English speaking native, my grammar sucks ;-)
And your statement may indeed be correct grammar. It just sounds a little
funny to me.

In a lot of cases, (for Germans) "seit" can correctly be translated into
"since" but there are times that it just sounds funny.

A common phrase from Germans are:

  I've been doing this since three years.

Just an observation, carry on ;-)

-- Steve


> 
> 
> > This is for:
> >
> > struct tracer_stat_session {
> >        struct list_head        session_list;
> >        struct tracer_stat      *ts;
> >        struct list_head        stat_list;
> >        struct mutex            stat_mutex;
> >        struct dentry           *file;
> > };
> >
> > Which looks a hell of a lot better than:
> >
> > struct tracer_stat_session {
> >        struct list_head session_list;
> >        struct tracer_stat *ts;
> >        struct list_head stat_list;
> >        struct mutex stat_mutex;
> >        struct dentry *file;
> > };
> >
> > We probably do not want to warn on such things.
> >
> > -- Steve
> >
> > --
> > 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] 9+ messages in thread

* Re: checkpatch warning of struct indentation
  2009-01-12 17:57 checkpatch warning of struct indentation Steven Rostedt
  2009-01-12 18:09 ` Frédéric Weisbecker
  2009-01-12 18:20 ` Ingo Molnar
@ 2009-01-12 18:51 ` Andy Whitcroft
  2 siblings, 0 replies; 9+ messages in thread
From: Andy Whitcroft @ 2009-01-12 18:51 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Ingo Molnar, Andrew Morton

On Mon, Jan 12, 2009 at 12:57:23PM -0500, Steven Rostedt wrote:
> 
> Hi,
> 
> I'm now seeing the following warnings from checkpatch:
> 
> #325: FILE: kernel/trace/trace_stat.c:21:
> +	void 			*stat;
> 
> ERROR: "foo 	*bar" should be "foo *bar"
> #334: FILE: kernel/trace/trace_stat.c:27:
> +	struct tracer_stat 	*ts;
> 
> ERROR: "foo		*bar" should be "foo	*bar"
> #337: FILE: kernel/trace/trace_stat.c:30:
> +	struct dentry		*file;

Yes those are bogus.  They should be fixed in the latest push to akpm.
You can check that with this version:

  http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing

-apw

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

* Re: checkpatch warning of struct indentation
  2009-01-12 18:35   ` Steven Rostedt
@ 2009-01-12 19:34     ` Frederic Weisbecker
  2009-01-13 14:45     ` Johannes Weiner
  1 sibling, 0 replies; 9+ messages in thread
From: Frederic Weisbecker @ 2009-01-12 19:34 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Andy Whitcroft, LKML, Ingo Molnar, Andrew Morton

On Mon, Jan 12, 2009 at 01:35:43PM -0500, Steven Rostedt wrote:
> 
> On Mon, 12 Jan 2009, Fr?d?ric Weisbecker wrote:
> 
> > 2009/1/12 Steven Rostedt <rostedt@goodmis.org>:
> > >
> > > Hi,
> > >
> > > I'm now seeing the following warnings from checkpatch:
> > >
> > > #325: FILE: kernel/trace/trace_stat.c:21:
> > > +       void                    *stat;
> > >
> > > ERROR: "foo     *bar" should be "foo *bar"
> > > #334: FILE: kernel/trace/trace_stat.c:27:
> > > +       struct tracer_stat      *ts;
> > >
> > > ERROR: "foo             *bar" should be "foo    *bar"
> > > #337: FILE: kernel/trace/trace_stat.c:30:
> > > +       struct dentry           *file;
> > 
> > 
> > Oh my patch :-)
> > Yeah I had the same errors when I checked it. I ignored them because
> > I because I remembered checkpatch.pl didn't warn about such things before.
> > And it seems to warn about such statements since very recently...
> 
> Heh, I should have CC'd you on this complaint ;-)
> 
> Yeah, this is a new warning and since we do a lot of these types of
> indentation, and they are marked as "ERROR", I would like to see these go 
> away. Perhaps they need to test for parenthesis, so:
> 
>  int func(foo		*bar)
> 
> gets caught.
> 
> 
> [off topic, funny English grammar]
> 
> I noticed that you said:
> 
>    And it seems to warn about such statements since very recently
> 
> This sounds strange. I know in German (and I know you are not German, but 
> it's what I have most experience with) the word "seit" gets translated 
> into "since" for such statements as above. A lot of Germans that I know 
> make this funny sounding phrase. I would have written it like:
> 
>    And, recently, it seems to warn about such statements.
> 
> Don't take this as a criticism. I'm the last person to criticize anyone's 
> grammar. For being an English speaking native, my grammar sucks ;-)
> And your statement may indeed be correct grammar. It just sounds a little
> funny to me.
> 
> In a lot of cases, (for Germans) "seit" can correctly be translated into
> "since" but there are times that it just sounds funny.
> 
> A common phrase from Germans are:
> 
>   I've been doing this since three years.
> 
> Just an observation, carry on ;-)
> 
> -- Steve
> 


Hehe. Yes, I always hesitate when I have to talk about elapsed time,
especially when it is an uncertain time...
And French/German are often confused with "since" and "for" while in
french we have only "depuis" and in german: "seit"...

Thanks, I'm always glad to be corrected in my english, hoping
it will be fixed by the time... :-)
 
> > 
> > 
> > > This is for:
> > >
> > > struct tracer_stat_session {
> > >        struct list_head        session_list;
> > >        struct tracer_stat      *ts;
> > >        struct list_head        stat_list;
> > >        struct mutex            stat_mutex;
> > >        struct dentry           *file;
> > > };
> > >
> > > Which looks a hell of a lot better than:
> > >
> > > struct tracer_stat_session {
> > >        struct list_head session_list;
> > >        struct tracer_stat *ts;
> > >        struct list_head stat_list;
> > >        struct mutex stat_mutex;
> > >        struct dentry *file;
> > > };
> > >
> > > We probably do not want to warn on such things.
> > >
> > > -- Steve
> > >
> > > --
> > > 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] 9+ messages in thread

* Re: checkpatch warning of struct indentation
  2009-01-12 18:35   ` Steven Rostedt
  2009-01-12 19:34     ` Frederic Weisbecker
@ 2009-01-13 14:45     ` Johannes Weiner
  2009-01-13 14:54       ` Steven Rostedt
  1 sibling, 1 reply; 9+ messages in thread
From: Johannes Weiner @ 2009-01-13 14:45 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Frédéric Weisbecker, Andy Whitcroft, LKML, Ingo Molnar,
	Andrew Morton

On Mon, Jan 12, 2009 at 01:35:43PM -0500, Steven Rostedt wrote:

> In a lot of cases, (for Germans) "seit" can correctly be translated into
> "since" but there are times that it just sounds funny.

It can only be translated to `since' when you mean a single point in
the past and you have to use `for' when you refer to a whole period.

`since 29th august' vs. `for three years'

No?

> A common phrase from Germans are:
> 
>   I've been doing this since three years.

They slept in school :-)

	Hannes

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

* Re: checkpatch warning of struct indentation
  2009-01-13 14:45     ` Johannes Weiner
@ 2009-01-13 14:54       ` Steven Rostedt
  2009-01-13 15:23         ` Johannes Weiner
  0 siblings, 1 reply; 9+ messages in thread
From: Steven Rostedt @ 2009-01-13 14:54 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Frédéric Weisbecker, Andy Whitcroft, LKML, Ingo Molnar,
	Andrew Morton


On Tue, 13 Jan 2009, Johannes Weiner wrote:

> On Mon, Jan 12, 2009 at 01:35:43PM -0500, Steven Rostedt wrote:
> 
> > In a lot of cases, (for Germans) "seit" can correctly be translated into
> > "since" but there are times that it just sounds funny.
> 
> It can only be translated to `since' when you mean a single point in
> the past and you have to use `for' when you refer to a whole period.
> 
> `since 29th august' vs. `for three years'
> 
> No?

Yeah that could be it. I have no idea, since I'm only a native speaker
and I slept in most of my English classes ;-)

> 
> > A common phrase from Germans are:
> > 
> >   I've been doing this since three years.
> 
> They slept in school :-)

Perhaps they asked, "May I lend an English grammar book?" when they meant 
to say "May I borrow an English grammar book?" :-)

-- Steve


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

* Re: checkpatch warning of struct indentation
  2009-01-13 14:54       ` Steven Rostedt
@ 2009-01-13 15:23         ` Johannes Weiner
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Weiner @ 2009-01-13 15:23 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Frédéric Weisbecker, Andy Whitcroft, LKML, Ingo Molnar,
	Andrew Morton

On Tue, Jan 13, 2009 at 09:54:13AM -0500, Steven Rostedt wrote:
> > > A common phrase from Germans are:
> > > 
> > >   I've been doing this since three years.
> > 
> > They slept in school :-)
> 
> Perhaps they asked, "May I lend an English grammar book?" when they meant 
> to say "May I borrow an English grammar book?" :-)

More likely they asked `may I become an English grammar book'.

German `etw. bekommen' translates to `to get sth'

> -- Steve

	Hannes


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

end of thread, other threads:[~2009-01-13 15:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 17:57 checkpatch warning of struct indentation Steven Rostedt
2009-01-12 18:09 ` Frédéric Weisbecker
2009-01-12 18:35   ` Steven Rostedt
2009-01-12 19:34     ` Frederic Weisbecker
2009-01-13 14:45     ` Johannes Weiner
2009-01-13 14:54       ` Steven Rostedt
2009-01-13 15:23         ` Johannes Weiner
2009-01-12 18:20 ` Ingo Molnar
2009-01-12 18:51 ` Andy Whitcroft

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