Skip to contentSkip to conversation

parisc: don't use module_init for non-modular core pdc_cons code

PATCH In review Paul Gortmaker 2 participants 4 messages Jan 22, 2014 1 message not in the archive PA-RISC architecture

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 52df8b79.riaKReY/RZZi2qvy%[email protected]

#1 lore raw

PATCH 1/1 parisc: don't use module_init for non-modular core pdc_cons code

The pdc_cons.c code is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Direct use of __initcall is discouraged, vs prioritized ones. Use of device_initcall is consistent with what __initcall maps onto, and hence does not change the init order, making the
impact of this change zero. Should someone with real hardware
for boot testing want to change it later to arch_initcall or something different, they can do that at a later date.

---

[patch will be added to init cleanup series:
http://git.kernel.org/cgit/linux/kernel/git/paulg/init.git/ ]

 arch/parisc/kernel/pdc_cons.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/parisc/kernel/pdc_cons.c +0 -0
index d5cae55195ec..10a5ae9553fd 100644
@@ -207,8 +207,7 @@ static int __init pdc_console_tty_driver_init(void)
 
 	return 0;
 }
maintainer
#2 lore raw
Quoted 8 lines · Paul Gortmaker

The pdc_cons.c code is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

I don't buy this. We've already had an argument about using MODULE_ tags in non-modular code here:

http://marc.info/?t=138947344500007

The consensus was that we'd continue to do so, so that would seem to invalidate the rationale for doing this patch set.

Without the rationale, this is churn for no gain, so I'd rather not do it.

Thanks,

James

#3 lore raw
Quoted 13 lines · James Bottomley
Quoted 8 lines · Paul Gortmaker

The pdc_cons.c code is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

I don't buy this. We've already had an argument about using MODULE_ tags in non-modular code here:

Quoted 7 lines

http://marc.info/?t=138947344500007

The consensus was that we'd continue to do so, so that would seem to invalidate the rationale for doing this patch set.

Without the rationale, this is churn for no gain, so I'd rather not do it.

Hi James,

Thanks for the link. Here is another one.

https://lkml.org/lkml/2014/1/21/434

In there I explain the rationale for doing this and what value add we get from it. Perhaps you'll say those things aren't important, and then I guess we'll have to agree to disagree then... but I hope not.

Thanks,
Paul.
--

Quoted 6 lines

Thanks,

James

maintainer
#4 lore raw
Quoted 24 lines · Paul Gortmaker
Quoted 13 lines · James Bottomley
Quoted 8 lines · Paul Gortmaker

The pdc_cons.c code is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

I don't buy this. We've already had an argument about using MODULE_ tags in non-modular code here:

Quoted 7 lines

http://marc.info/?t=138947344500007

The consensus was that we'd continue to do so, so that would seem to invalidate the rationale for doing this patch set.

Without the rationale, this is churn for no gain, so I'd rather not do it.

Hi James,

Quoted 7 lines

Thanks for the link. Here is another one.

https://lkml.org/lkml/2014/1/21/434

In there I explain the rationale for doing this and what value add we get from it. Perhaps you'll say those things aren't important, and then I guess we'll have to agree to disagree then... but I hope not.

Well, OK, so 1 is covered by the link I sent. 3 is an EDONTCARE because we don't care when the console is initialised as long as it is. Your reason 2 I'm not sure I understand. module_exit() functions are automatically discarded by the linker scripts ... if we have a problem with reference to code in them it will cause a link failure.

I'm grateful for dumping all the spurious section mismatches caused by HOTPLUG, I really am, but I'm seeing less benefit to this code churn.

James