lib/debugobjects.c: move __initdata after name
Subsystems (2)
PATCH 3/4 lib/debugobjects.c: move __initdata after name
--- lib/debugobjects.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
lib/debugobjects.c +3 -3
@@ -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 ) {
Signature · 1 line
1.8.4.5
Quoted 3 lines · Fabian Frederick
Cc Josh Triplett <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Fabian Frederick <[email protected]>
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.
Quoted 37 lines
lib/debugobjects.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)lib/debugobjects.c +3
-3@@ -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 ) {Signature · 1 line
1.8.4.5
Quoted 10 lines · On Sat, 24 May 2014 14:56:35 -0700 Josh Triplett <[email protected]> wrote:
Quoted 3 lines · Fabian Frederick
Cc Josh Triplett <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Fabian Frederick <[email protected]>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 ("staticsome_type__initdatavarname") or right after the storage class ("static__initdatasome_typevarname"). Other similar qualifiers follow the same pattern.
It was another checkpatch warning asking to put __initdata after variable name...
Adding Andy and Joe to CC.
Quoted 8 lines · Fabian Frederick
Quoted 5 lines · On Sat, 24 May 2014 14:56:35 -0700 Josh Triplett <[email protected]> wrote:
Quoted 3 lines · Fabian Frederick
Cc Josh Triplett <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Fabian Frederick <[email protected]>
Quoted 7 lines
Quoted 5 lines
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 ("staticsome_type__initdatavarname") or right after the storage class ("static__initdatasome_typevarname"). Other similar qualifiers follow the same pattern.It was another checkpatch warning asking to put
__initdataafter 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