Skip to contentSkip to conversation

drivers/bus: make uniphier-system-bus.c explicitly non-modular

PATCH In review Paul Gortmaker 2 participants 6 messages Jan 4, 2016 – Jan 5, 2016 Arm/uniphier architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/bus: make uniphier-system-bus.c explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/bus/Kconfig:config UNIPHIER_SYSTEM_BUS
drivers/bus/Kconfig: bool "UniPhier System Bus driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.

Cc Masahiro Yamada <[email protected]>
Cc Rob Herring <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Olof Johansson <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
---
 drivers/bus/uniphier-system-bus.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/bus/uniphier-system-bus.c +2 -7
index 834a2aeaf27a..6b14b8d0a1a2 100644
@@ -14,7 +14,7 @@
 
 #include <linux/io.h>
 #include <linux/log2.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
@@ -265,7 +265,6 @@ static const struct of_device_id uniphier_system_bus_match[] = {
 	{ .compatible = "socionext,uniphier-system-bus" },
 	{ /* sentinel */ }
 };
-MODULE_DEVICE_TABLE(of, uniphier_system_bus_match);
 
 static struct platform_driver uniphier_system_bus_driver = {
 	.probe		= uniphier_system_bus_probe,
@@ -274,8 +273,4 @@ static struct platform_driver uniphier_system_bus_driver = {
 		.of_match_table = uniphier_system_bus_match,
 	},
 };
-module_platform_driver(uniphier_system_bus_driver);
-
-MODULE_AUTHOR("Masahiro Yamada <[email protected]>");
-MODULE_DESCRIPTION("UniPhier System Bus driver");
-MODULE_LICENSE("GPL");
+builtin_platform_driver(uniphier_system_bus_driver);
Signature · 1 line
2.6.1
#1 lore raw

Hi Paul, Olof,

2016-01-05 4:22 GMT+09:00 Paul Gortmaker <[email protected]>:

Quoted 19 lines

The Kconfig currently controlling compilation of this code is:

drivers/bus/Kconfig:config UNIPHIER_SYSTEM_BUS
drivers/bus/Kconfig: bool "UniPhier System Bus driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.

Quoted 6 lines
Cc Masahiro Yamada <[email protected]>
Cc Rob Herring <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Olof Johansson <[email protected]>
Cc linux-arm-kernel at lists.infradead.org

This driver can be modular.

I wrote "tristate" in my original patch.

See this one:
https://patchwork.kernel.org/patch/7805091/

But when I look at linux-next, it is "bool".

Now, I realized what happened.

Olof Johansson only said "Thanks, applied to next/drivers." But, he silently modified my patch,
changing "tristate" into "bool".

Olof,

Why did you do that?

I want this driver tristate.

Signature · 2 lines
Best Regards
Masahiro Yamada
#2 lore raw

Hi Olof,

Sorry my misunderstanding.

2016-01-05 8:15 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 50 lines

Hi Paul, Olof,

2016-01-05 4:22 GMT+09:00 Paul Gortmaker <[email protected]>:

Quoted 19 lines

The Kconfig currently controlling compilation of this code is:

drivers/bus/Kconfig:config UNIPHIER_SYSTEM_BUS
drivers/bus/Kconfig: bool "UniPhier System Bus driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.

Quoted 6 lines
Cc Masahiro Yamada <[email protected]>
Cc Rob Herring <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Olof Johansson <[email protected]>
Cc linux-arm-kernel at lists.infradead.org

This driver can be modular.

I wrote "tristate" in my original patch.

See this one:
https://patchwork.kernel.org/patch/7805091/

But when I look at linux-next, it is "bool".

Now, I realized what happened.

Olof Johansson only said "Thanks, applied to next/drivers." But, he silently modified my patch,
changing "tristate" into "bool".

Quoted 6 lines

Olof,

Why did you do that?

I want this driver tristate.

My bad - Olof had applied it as it is.

It was changed from "tristate" to "bool" by

commit 326ea45aa827da6686c78b5907f9839f91ef5782

Author: Arnd Bergmann <[email protected]>
Date:   Mon Dec 28 11:05:18 2015 +0100

bus: uniphier: allow only built-in driver

I did not notice this.

Signature · 2 lines
Best Regards
Masahiro Yamada
#3 lore raw

Hi Paul,

2016-01-05 8:24 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 34 lines

Hi Olof,

Sorry my misunderstanding.

2016-01-05 8:15 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 28 lines

Hi Paul, Olof,

2016-01-05 4:22 GMT+09:00 Paul Gortmaker <[email protected]>:

Quoted 25 lines

The Kconfig currently controlling compilation of this code is:

drivers/bus/Kconfig:config UNIPHIER_SYSTEM_BUS
drivers/bus/Kconfig: bool "UniPhier System Bus driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.

Cc Masahiro Yamada <[email protected]>
Cc Rob Herring <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Olof Johansson <[email protected]>
Cc linux-arm-kernel at lists.infradead.org

I assume commit 326ea45aa827 ("bus: uniphier: allow only built-in driver") is a temporary fix.

I'd like to revive the tristate for this driver
by hook or by crook.

I've sent the following to fix the build error.
http://www.thefreedictionary.com/

I want to see how it goes.

So, please hold back yours for now.

Signature · 2 lines
Best Regards
Masahiro Yamada
#4 lore raw

2016-01-05 11:26 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 44 lines

Hi Paul,

2016-01-05 8:24 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 34 lines

Hi Olof,

Sorry my misunderstanding.

2016-01-05 8:15 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 28 lines

Hi Paul, Olof,

2016-01-05 4:22 GMT+09:00 Paul Gortmaker <[email protected]>:

Quoted 25 lines

The Kconfig currently controlling compilation of this code is:

drivers/bus/Kconfig:config UNIPHIER_SYSTEM_BUS
drivers/bus/Kconfig: bool "UniPhier System Bus driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.

Cc Masahiro Yamada <[email protected]>
Cc Rob Herring <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Olof Johansson <[email protected]>
Cc linux-arm-kernel at lists.infradead.org

I assume commit 326ea45aa827 ("bus: uniphier: allow only built-in driver") is a temporary fix.

Quoted 6 lines

I'd like to revive the tristate for this driver
by hook or by crook.

I've sent the following to fix the build error.
http://www.thefreedictionary.com/

Sorry, I mean this one:
https://patchwork.kernel.org/patch/7952361/

Signature · 2 lines
Best Regards
Masahiro Yamada
#5 lore raw
Quoted 3 lines · [Re: [PATCH] drivers/bus: make uniphier-system-bus.c explicitly non-modular]…

2016-01-05 11:26 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 2 lines

Hi Paul,

[...]

Quoted 9 lines
Quoted 9 lines

I assume commit 326ea45aa827 ("bus: uniphier: allow only built-in driver") is a temporary fix.

I'd like to revive the tristate for this driver
by hook or by crook.

Quoted 5 lines
Quoted 2 lines

I've sent the following to fix the build error.
http://www.thefreedictionary.com/

Sorry, I mean this one:
https://patchwork.kernel.org/patch/7952361/

Sure, I'll shelf it and assume it will get back to tristate.

Note however that the patch I was looking at was not 326ea. It was

commit 6c741c74092c61465af206672ba567940a23d709

Author: Daniel Kurtz <[email protected]>
Date:   Tue Dec 22 21:46:37 2015 +0800

pinctrl: mediatek: convert to arch_initcall

..and if you make it tristate again, you defeat the above change, since if you look at module.h, you will see for the =m config:

#define arch_initcall(fn) module_init(fn)

...meaning that the change in 6c741c does nothing if =m is set. I don't know if that is an issue or not, perhaps Daniel can comment.

Paul.
--

Quoted 6 lines
Signature · 3 lines
-- 
Best Regards
Masahiro Yamada