* [PATCH] mfd: rsmu: split core code into separate module
@ 2024-05-29 9:48 Arnd Bergmann
2024-05-31 16:08 ` (subset) " Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2024-05-29 9:48 UTC (permalink / raw)
To: Lee Jones, Min Li
Cc: Arnd Bergmann, Charles Keepax, Okan Sahin, Andy Shevchenko, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Linking a file into two modules can have unintended side-effects
and produces a W=1 warning:
scripts/Makefile.build:236: drivers/mfd/Makefile: rsmu_core.o is added to multiple modules: rsmu-i2c rsmu-spi
Make this one a separate module instead.
Fixes: a1867f85e06e ("mfd: Add Renesas Synchronization Management Unit (SMU) support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mfd/Makefile | 6 ++----
drivers/mfd/rsmu_core.c | 2 ++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index c66f07edcd0e..db1ba39de3b5 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -280,7 +280,5 @@ obj-$(CONFIG_MFD_INTEL_M10_BMC_PMCI) += intel-m10-bmc-pmci.o
obj-$(CONFIG_MFD_ATC260X) += atc260x-core.o
obj-$(CONFIG_MFD_ATC260X_I2C) += atc260x-i2c.o
-rsmu-i2c-objs := rsmu_core.o rsmu_i2c.o
-rsmu-spi-objs := rsmu_core.o rsmu_spi.o
-obj-$(CONFIG_MFD_RSMU_I2C) += rsmu-i2c.o
-obj-$(CONFIG_MFD_RSMU_SPI) += rsmu-spi.o
+obj-$(CONFIG_MFD_RSMU_I2C) += rsmu_i2c.o rsmu_core.o
+obj-$(CONFIG_MFD_RSMU_SPI) += rsmu_spi.o rsmu_core.o
diff --git a/drivers/mfd/rsmu_core.c b/drivers/mfd/rsmu_core.c
index 29437fd0bd5b..fd04a6e5dfa3 100644
--- a/drivers/mfd/rsmu_core.c
+++ b/drivers/mfd/rsmu_core.c
@@ -78,11 +78,13 @@ int rsmu_core_init(struct rsmu_ddata *rsmu)
return ret;
}
+EXPORT_SYMBOL_GPL(rsmu_core_init);
void rsmu_core_exit(struct rsmu_ddata *rsmu)
{
mutex_destroy(&rsmu->lock);
}
+EXPORT_SYMBOL_GPL(rsmu_core_exit);
MODULE_DESCRIPTION("Renesas SMU core driver");
MODULE_LICENSE("GPL");
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: (subset) [PATCH] mfd: rsmu: split core code into separate module
2024-05-29 9:48 [PATCH] mfd: rsmu: split core code into separate module Arnd Bergmann
@ 2024-05-31 16:08 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2024-05-31 16:08 UTC (permalink / raw)
To: Lee Jones, Min Li, Arnd Bergmann
Cc: Arnd Bergmann, Charles Keepax, Okan Sahin, Andy Shevchenko, linux-kernel
On Wed, 29 May 2024 11:48:47 +0200, Arnd Bergmann wrote:
> Linking a file into two modules can have unintended side-effects
> and produces a W=1 warning:
>
> scripts/Makefile.build:236: drivers/mfd/Makefile: rsmu_core.o is added to multiple modules: rsmu-i2c rsmu-spi
>
> Make this one a separate module instead.
>
> [...]
Applied, thanks!
[1/1] mfd: rsmu: split core code into separate module
commit: d84bcadf16b103f4a3970f70034e9eb8d53878b1
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-31 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-29 9:48 [PATCH] mfd: rsmu: split core code into separate module Arnd Bergmann
2024-05-31 16:08 ` (subset) " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®