linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: mediatek: remove redundant MODULE_ALIAS entries
@ 2018-03-26 10:04 sean.wang
  2018-03-28  2:14 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: sean.wang @ 2018-03-26 10:04 UTC (permalink / raw)
  To: broonie, matthias.bgg
  Cc: linux-spi, linux-arm-kernel, linux-mediatek, linux-kernel, Sean Wang

From: Sean Wang <sean.wang@mediatek.com>

MODULE_ALIAS exports information to allow the module to be auto-loaded at
boot for the drivers registered using legacy platform registration.

However, currently the driver is always used by DT-only platform,
MODULE_ALIAS is redundant and should be removed properly.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/spi/spi-mt65xx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 86bf456..9fdc2e5 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -856,4 +856,3 @@ module_platform_driver(mtk_spi_driver);
 MODULE_DESCRIPTION("MTK SPI Controller driver");
 MODULE_AUTHOR("Leilk Liu <leilk.liu@mediatek.com>");
 MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("platform:mtk-spi");
-- 
2.7.4

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

* Re: [PATCH] spi: mediatek: remove redundant MODULE_ALIAS entries
  2018-03-26 10:04 [PATCH] spi: mediatek: remove redundant MODULE_ALIAS entries sean.wang
@ 2018-03-28  2:14 ` Mark Brown
  2018-03-28  3:09   ` Sean Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2018-03-28  2:14 UTC (permalink / raw)
  To: sean.wang
  Cc: matthias.bgg, linux-spi, linux-arm-kernel, linux-mediatek, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

On Mon, Mar 26, 2018 at 06:04:18PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> MODULE_ALIAS exports information to allow the module to be auto-loaded at
> boot for the drivers registered using legacy platform registration.
> 
> However, currently the driver is always used by DT-only platform,
> MODULE_ALIAS is redundant and should be removed properly.

There is no meaningful cost to having the alias there, why remove it?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] spi: mediatek: remove redundant MODULE_ALIAS entries
  2018-03-28  2:14 ` Mark Brown
@ 2018-03-28  3:09   ` Sean Wang
  2018-04-12 16:13     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Wang @ 2018-03-28  3:09 UTC (permalink / raw)
  To: Mark Brown
  Cc: matthias.bgg, linux-spi, linux-arm-kernel, linux-mediatek, linux-kernel

On Wed, 2018-03-28 at 10:14 +0800, Mark Brown wrote:
> On Mon, Mar 26, 2018 at 06:04:18PM +0800, sean.wang@mediatek.com wrote:
> > From: Sean Wang <sean.wang@mediatek.com>
> > 
> > MODULE_ALIAS exports information to allow the module to be auto-loaded at
> > boot for the drivers registered using legacy platform registration.
> > 
> > However, currently the driver is always used by DT-only platform,
> > MODULE_ALIAS is redundant and should be removed properly.
> 
> There is no meaningful cost to having the alias there, why remove it?


It's no explicitly improved to the driver, it only takes less bytes
in .secion modinfo from 644 bytes to 620 bytes in the observation with
objdump.

More importantly, it seems the driver should probably refer to another
qualified driver at the initial development, but MODULE_ALIAS is
forgetting to be removed to meet real usage for the module autoload. 

Even I was curious whether people for the driver know the actual purpose
the macro it's for.

Removing MODULE_ALIAS is just to correct the driver to where it should
be.

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

* Re: [PATCH] spi: mediatek: remove redundant MODULE_ALIAS entries
  2018-03-28  3:09   ` Sean Wang
@ 2018-04-12 16:13     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2018-04-12 16:13 UTC (permalink / raw)
  To: Sean Wang
  Cc: matthias.bgg, linux-spi, linux-arm-kernel, linux-mediatek, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

On Wed, Mar 28, 2018 at 11:09:03AM +0800, Sean Wang wrote:
> On Wed, 2018-03-28 at 10:14 +0800, Mark Brown wrote:
> > On Mon, Mar 26, 2018 at 06:04:18PM +0800, sean.wang@mediatek.com wrote:
> > > From: Sean Wang <sean.wang@mediatek.com>

> > > MODULE_ALIAS exports information to allow the module to be auto-loaded at
> > > boot for the drivers registered using legacy platform registration.

> > > However, currently the driver is always used by DT-only platform,
> > > MODULE_ALIAS is redundant and should be removed properly.

> > There is no meaningful cost to having the alias there, why remove it?

> It's no explicitly improved to the driver, it only takes less bytes
> in .secion modinfo from 644 bytes to 620 bytes in the observation with
> objdump.

OK, that's a *very* small saving though especially given the block sizes
that filesystems tend to use.

> More importantly, it seems the driver should probably refer to another
> qualified driver at the initial development, but MODULE_ALIAS is
> forgetting to be removed to meet real usage for the module autoload. 

I can't parse the above, sorry.

> Even I was curious whether people for the driver know the actual purpose
> the macro it's for.

> Removing MODULE_ALIAS is just to correct the driver to where it should
> be.

To me it's the other way around - ideally platform drivers should
remember to set up the MODULE_ALIAS, just as a joining the dots thing to
make sure that things that work when the driver is built in work when
built as a module.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2018-04-12 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26 10:04 [PATCH] spi: mediatek: remove redundant MODULE_ALIAS entries sean.wang
2018-03-28  2:14 ` Mark Brown
2018-03-28  3:09   ` Sean Wang
2018-04-12 16:13     ` Mark Brown

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).