LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Remove MODULE_ALIAS() calls that take undefined macro
@ 2019-05-06 17:28 Masahiro Yamada
  2019-05-06 17:39 ` Daniel Lezcano
  2019-05-08 11:37 ` Lee Jones
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-05-06 17:28 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Stephen Rothwell, Alexey Gladkov, Masahiro Yamada, linux-kernel,
	Thomas Gleixner, Tony Lindgren, Lee Jones, Aaro Koskinen,
	linux-omap, Russell King, linux-arm-kernel, Daniel Lezcano

These files do not define (USBHS_)DRIVER_NAME. Yet, they can be
successfully compiled because they are never built as a module by
anyone, i.e, the MODULE_ALIAS() calls are always no-op.

A problem showed up when a patch "moduleparam: Save information about
built-in modules in separate file" is applied. With this new feature,
MODULE_*() are populated even if the callers are built-in.

To avoid the build errors, the lines referencing to the undefined
macro must be removed.

The complete fix is to remove all MODULE_* and #include <linux/module.h>
like many "make ... explicitly non-modular" commits did.

For now, I am touching the offending lines.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

I will insert this commit before
"moduleparam: Save information about built-in modules in separate file"


 arch/arm/plat-omap/dma.c          | 1 -
 drivers/clocksource/timer-ti-dm.c | 1 -
 drivers/mfd/omap-usb-tll.c        | 1 -
 3 files changed, 3 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index d4012d6..5ca4c5f 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1449,7 +1449,6 @@ static void __exit omap_system_dma_exit(void)
 
 MODULE_DESCRIPTION("OMAP SYSTEM DMA DRIVER");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:" DRIVER_NAME);
 MODULE_AUTHOR("Texas Instruments Inc");
 
 /*
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 3352da6..2b7cee81 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -998,5 +998,4 @@ module_platform_driver(omap_dm_timer_driver);
 
 MODULE_DESCRIPTION("OMAP Dual-Mode Timer Driver");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:" DRIVER_NAME);
 MODULE_AUTHOR("Texas Instruments Inc");
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index 446713d..93177d8 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -459,7 +459,6 @@ EXPORT_SYMBOL_GPL(omap_tll_disable);
 
 MODULE_AUTHOR("Keshava Munegowda <keshava_mgowda@ti.com>");
 MODULE_AUTHOR("Roger Quadros <rogerq@ti.com>");
-MODULE_ALIAS("platform:" USBHS_DRIVER_NAME);
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("usb tll driver for TI OMAP EHCI and OHCI controllers");
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove MODULE_ALIAS() calls that take undefined macro
  2019-05-06 17:28 [PATCH] Remove MODULE_ALIAS() calls that take undefined macro Masahiro Yamada
@ 2019-05-06 17:39 ` Daniel Lezcano
  2019-05-06 21:11   ` Tony Lindgren
  2019-05-08 11:37 ` Lee Jones
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Lezcano @ 2019-05-06 17:39 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: Stephen Rothwell, Alexey Gladkov, linux-kernel, Thomas Gleixner,
	Tony Lindgren, Lee Jones, Aaro Koskinen, linux-omap,
	Russell King, linux-arm-kernel

On 06/05/2019 19:28, Masahiro Yamada wrote:
> These files do not define (USBHS_)DRIVER_NAME. Yet, they can be
> successfully compiled because they are never built as a module by
> anyone, i.e, the MODULE_ALIAS() calls are always no-op.
> 
> A problem showed up when a patch "moduleparam: Save information about
> built-in modules in separate file" is applied. With this new feature,
> MODULE_*() are populated even if the callers are built-in.
> 
> To avoid the build errors, the lines referencing to the undefined
> macro must be removed.
> 
> The complete fix is to remove all MODULE_* and #include <linux/module.h>
> like many "make ... explicitly non-modular" commits did.
> 
> For now, I am touching the offending lines.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>




-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove MODULE_ALIAS() calls that take undefined macro
  2019-05-06 17:39 ` Daniel Lezcano
@ 2019-05-06 21:11   ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2019-05-06 21:11 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Masahiro Yamada, linux-kbuild, Stephen Rothwell, Alexey Gladkov,
	linux-kernel, Thomas Gleixner, Lee Jones, Aaro Koskinen,
	linux-omap, Russell King, linux-arm-kernel

* Daniel Lezcano <daniel.lezcano@linaro.org> [190506 17:40]:
> On 06/05/2019 19:28, Masahiro Yamada wrote:
> > These files do not define (USBHS_)DRIVER_NAME. Yet, they can be
> > successfully compiled because they are never built as a module by
> > anyone, i.e, the MODULE_ALIAS() calls are always no-op.
> > 
> > A problem showed up when a patch "moduleparam: Save information about
> > built-in modules in separate file" is applied. With this new feature,
> > MODULE_*() are populated even if the callers are built-in.
> > 
> > To avoid the build errors, the lines referencing to the undefined
> > macro must be removed.
> > 
> > The complete fix is to remove all MODULE_* and #include <linux/module.h>
> > like many "make ... explicitly non-modular" commits did.
> > 
> > For now, I am touching the offending lines.
> > 
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
> 
> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Thanks, please feel free to merge together with your series:

Acked-by: Tony Lindgren <tony@atomide.com>

Or if you want me to queue it separately, please let me know.

Regards,

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove MODULE_ALIAS() calls that take undefined macro
  2019-05-06 17:28 [PATCH] Remove MODULE_ALIAS() calls that take undefined macro Masahiro Yamada
  2019-05-06 17:39 ` Daniel Lezcano
@ 2019-05-08 11:37 ` Lee Jones
  1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2019-05-08 11:37 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, Stephen Rothwell, Alexey Gladkov, linux-kernel,
	Thomas Gleixner, Tony Lindgren, Aaro Koskinen, linux-omap,
	Russell King, linux-arm-kernel, Daniel Lezcano

On Tue, 07 May 2019, Masahiro Yamada wrote:

> These files do not define (USBHS_)DRIVER_NAME. Yet, they can be
> successfully compiled because they are never built as a module by
> anyone, i.e, the MODULE_ALIAS() calls are always no-op.
> 
> A problem showed up when a patch "moduleparam: Save information about
> built-in modules in separate file" is applied. With this new feature,
> MODULE_*() are populated even if the callers are built-in.
> 
> To avoid the build errors, the lines referencing to the undefined
> macro must be removed.
> 
> The complete fix is to remove all MODULE_* and #include <linux/module.h>
> like many "make ... explicitly non-modular" commits did.
> 
> For now, I am touching the offending lines.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
> I will insert this commit before
> "moduleparam: Save information about built-in modules in separate file"
> 
> 
>  arch/arm/plat-omap/dma.c          | 1 -
>  drivers/clocksource/timer-ti-dm.c | 1 -
>  drivers/mfd/omap-usb-tll.c        | 1 -

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-08 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 17:28 [PATCH] Remove MODULE_ALIAS() calls that take undefined macro Masahiro Yamada
2019-05-06 17:39 ` Daniel Lezcano
2019-05-06 21:11   ` Tony Lindgren
2019-05-08 11:37 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).