Skip to contentSkip to conversation

powerpc/legacy_serial: fix incorrect placement of __initdata tag

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 5 messages Sep 30, 2013 – Oct 8, 2013 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/legacy_serial: fix incorrect placement of __initdata tag

__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.

---
 arch/powerpc/kernel/legacy_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/legacy_serial.c +1 -1
index 22e88dd..40bd7bd 100644
@@ -35,7 +35,7 @@ static struct legacy_serial_info {
 	phys_addr_t			taddr;
 } legacy_serial_infos[MAX_LEGACY_SERIAL_PORTS];
 
-static struct __initdata of_device_id legacy_serial_parents[] = {
+static struct of_device_id legacy_serial_parents[] __initdata = {
 	{.type = "soc",},
 	{.type = "tsi-bridge",},
 	{.type = "opb", },
Signature · 1 line
1.8.2.3
#1 lore raw
Quoted 2 lines · Bartlomiej Zolnierkiewicz

__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.

I see lots of other occurences of that in arch/powerpc. Why not send a single patch to update them all?

cheers

#2 lore raw
Quoted 6 lines · Michael Ellerman
Quoted 2 lines · Bartlomiej Zolnierkiewicz

__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.

I see lots of other occurences of that in arch/powerpc. Why not send a single patch to update them all?

The other occurences while not following the preferred kernel coding style are (probably) working OK with gcc. This particular occurence just doesn't work as it should.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

#3 lore raw
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Quoted 6 lines · Michael Ellerman
Quoted 2 lines · Bartlomiej Zolnierkiewicz

__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.

I see lots of other occurences of that in arch/powerpc. Why not send a single patch to update them all?

The other occurences while not following the preferred kernel coding style are (probably) working OK with gcc. This particular occurence just doesn't work as it should.

Why would the other occurrences work but not this one?

Regardless, why don't we just do a single patch to clean them all up to match coding style and (probably) do what they're intended.

cheers

#4 lore raw
Quoted 6 lines · Michael Ellerman
Quoted 5 lines · Bartlomiej Zolnierkiewicz
Quoted 4 lines · Michael Ellerman
Quoted 2 lines · Bartlomiej Zolnierkiewicz

__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

I see lots of other occurences of that in arch/powerpc. Why not send a single patch to update them all?

The other occurences while not following the preferred kernel coding style are (probably) working OK with gcc. This particular occurence just doesn't work as it should.

Why would the other occurrences work but not this one?

Because gcc seems to generate the correct code for things like i.e. this one:

struct of_device_id __initdata legacy_serial_parents[]

but not for ones like this:

struct __initdata of_device_id legacy_serial_parents[]

Quoted 2 lines

Regardless, why don't we just do a single patch to clean them all up to match coding style and (probably) do what they're intended.

Because:

- fixing this occurence changes runtime, fixing others won't

- there were no such request from powerpc Maintainers

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics