* [PATCH 3/4] lib/debugobjects.c: move __initdata after name
@ 2014-05-24 13:07 Fabian Frederick
2014-05-24 21:56 ` Josh Triplett
0 siblings, 1 reply; 4+ messages in thread
From: Fabian Frederick @ 2014-05-24 13:07 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, Josh Triplett, Andrew Morton
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
lib/debugobjects.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index b628247..437a6b4 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -791,7 +791,7 @@ struct self_test {
unsigned long dummy2[3];
};
-static __initdata struct debug_obj_descr descr_type_test;
+static struct debug_obj_descr descr_type_test __initdata;
/*
* fixup_init is called when:
@@ -915,7 +915,7 @@ out:
return res;
}
-static __initdata struct debug_obj_descr descr_type_test = {
+static struct debug_obj_descr descr_type_test __initdata = {
.name = "selftest",
.fixup_init = fixup_init,
.fixup_activate = fixup_activate,
@@ -923,7 +923,7 @@ static __initdata struct debug_obj_descr descr_type_test = {
.fixup_free = fixup_free,
};
-static __initdata struct self_test obj = { .static_init = 0 };
+static struct self_test obj __initdata = { .static_init = 0 };
static void __init debug_objects_selftest(void)
{
--
1.8.4.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 3/4] lib/debugobjects.c: move __initdata after name
2014-05-24 13:07 [PATCH 3/4] lib/debugobjects.c: move __initdata after name Fabian Frederick
@ 2014-05-24 21:56 ` Josh Triplett
2014-05-25 3:13 ` Fabian Frederick
0 siblings, 1 reply; 4+ messages in thread
From: Josh Triplett @ 2014-05-24 21:56 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, Andrew Morton
On Sat, May 24, 2014 at 03:07:19PM +0200, Fabian Frederick wrote:
> Cc: Josh Triplett <josh@joshtriplett.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
No, don't make this change. A quick "git grep __initdata" shows that to
the extent it has a consistent placement, it's either right after the
type ("static some_type __initdata varname") or right after the storage
class ("static __initdata some_type varname"). Other similar qualifiers
follow the same pattern.
> lib/debugobjects.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/lib/debugobjects.c b/lib/debugobjects.c
> index b628247..437a6b4 100644
> --- a/lib/debugobjects.c
> +++ b/lib/debugobjects.c
> @@ -791,7 +791,7 @@ struct self_test {
> unsigned long dummy2[3];
> };
>
> -static __initdata struct debug_obj_descr descr_type_test;
> +static struct debug_obj_descr descr_type_test __initdata;
>
> /*
> * fixup_init is called when:
> @@ -915,7 +915,7 @@ out:
> return res;
> }
>
> -static __initdata struct debug_obj_descr descr_type_test = {
> +static struct debug_obj_descr descr_type_test __initdata = {
> .name = "selftest",
> .fixup_init = fixup_init,
> .fixup_activate = fixup_activate,
> @@ -923,7 +923,7 @@ static __initdata struct debug_obj_descr descr_type_test = {
> .fixup_free = fixup_free,
> };
>
> -static __initdata struct self_test obj = { .static_init = 0 };
> +static struct self_test obj __initdata = { .static_init = 0 };
>
> static void __init debug_objects_selftest(void)
> {
> --
> 1.8.4.5
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 3/4] lib/debugobjects.c: move __initdata after name
2014-05-24 21:56 ` Josh Triplett
@ 2014-05-25 3:13 ` Fabian Frederick
2014-05-25 3:18 ` Josh Triplett
0 siblings, 1 reply; 4+ messages in thread
From: Fabian Frederick @ 2014-05-25 3:13 UTC (permalink / raw)
To: Josh Triplett; +Cc: linux-kernel, Andrew Morton
On Sat, 24 May 2014 14:56:35 -0700
Josh Triplett <josh@joshtriplett.org> wrote:
> On Sat, May 24, 2014 at 03:07:19PM +0200, Fabian Frederick wrote:
> > Cc: Josh Triplett <josh@joshtriplett.org>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Signed-off-by: Fabian Frederick <fabf@skynet.be>
>
> No, don't make this change. A quick "git grep __initdata" shows that to
> the extent it has a consistent placement, it's either right after the
> type ("static some_type __initdata varname") or right after the storage
> class ("static __initdata some_type varname"). Other similar qualifiers
> follow the same pattern.
It was another checkpatch warning asking to put __initdata after variable name...
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 3/4] lib/debugobjects.c: move __initdata after name
2014-05-25 3:13 ` Fabian Frederick
@ 2014-05-25 3:18 ` Josh Triplett
0 siblings, 0 replies; 4+ messages in thread
From: Josh Triplett @ 2014-05-25 3:18 UTC (permalink / raw)
To: Fabian Frederick, Andy Whitcroft, Joe Perches; +Cc: linux-kernel, Andrew Morton
Adding Andy and Joe to CC.
On Sun, May 25, 2014 at 05:13:38AM +0200, Fabian Frederick wrote:
> On Sat, 24 May 2014 14:56:35 -0700
> Josh Triplett <josh@joshtriplett.org> wrote:
>
> > On Sat, May 24, 2014 at 03:07:19PM +0200, Fabian Frederick wrote:
> > > Cc: Josh Triplett <josh@joshtriplett.org>
> > > Cc: Andrew Morton <akpm@linux-foundation.org>
> > > Signed-off-by: Fabian Frederick <fabf@skynet.be>
> >
> > No, don't make this change. A quick "git grep __initdata" shows that to
> > the extent it has a consistent placement, it's either right after the
> > type ("static some_type __initdata varname") or right after the storage
> > class ("static __initdata some_type varname"). Other similar qualifiers
> > follow the same pattern.
>
> It was another checkpatch warning asking to put __initdata after variable name...
Gah. That warning should not exist. Looks like it got added in
8716de383b82f16d920513138f1691e40ef5a9e3 ("checkpatch: add test for
positional misuse of section specifiers like __initdata"). The error
for placement that GCC doesn't understand seems perfectly fine, but
checkpatch should *not* complain about "static __initdata struct foo
..."; that's perfectly understandable, and the order the majority of the
kernel uses. Please get rid of that warning, and just keep the error
for the case GCC doesn't understand.
- Josh Triplett
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-25 3:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-24 13:07 [PATCH 3/4] lib/debugobjects.c: move __initdata after name Fabian Frederick
2014-05-24 21:56 ` Josh Triplett
2014-05-25 3:13 ` Fabian Frederick
2014-05-25 3:18 ` Josh Triplett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox