diff mbox series

staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c

Message ID 20210130034507.2115280-1-ilya.lipnitskiy@gmail.com (mailing list archive)
State New
Headers show
Series staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.c | expand

Commit Message

Ilya Lipnitskiy Jan. 30, 2021, 3:45 a.m. UTC
Also use KBUILD_MODNAME for module name.

This driver is only used by RALINK MIPS MT7621 SoCs. Tested by building
against that target using OpenWrt with Linux 5.10.10.

Fixes the following error:
error: the following would cause module name conflict:
  drivers/dma/mediatek/mtk-hsdma.ko
  drivers/staging/mt7621-dma/mtk-hsdma.ko

Cc: stable@vger.kernel.org
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/staging/mt7621-dma/Makefile                        | 2 +-
 drivers/staging/mt7621-dma/{mtk-hsdma.c => hsdma-mt7621.c} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename drivers/staging/mt7621-dma/{mtk-hsdma.c => hsdma-mt7621.c} (99%)

Comments

Dan Carpenter Feb. 2, 2021, 6:54 a.m. UTC | #1
On Fri, Jan 29, 2021 at 07:45:07PM -0800, Ilya Lipnitskiy wrote:
> Also use KBUILD_MODNAME for module name.
> 
> This driver is only used by RALINK MIPS MT7621 SoCs. Tested by building
> against that target using OpenWrt with Linux 5.10.10.
> 
> Fixes the following error:
> error: the following would cause module name conflict:
>   drivers/dma/mediatek/mtk-hsdma.ko
>   drivers/staging/mt7621-dma/mtk-hsdma.ko
> 

The only part of this commit message that I could understand at all was
the parts which were copy and pasted from the build system...  :/
Please, write it like this:

[PATCH] staging/mt7621-dma: fix build conflict

This driver cannot be built because we have two modules with the same
name and it leads to an error:

  error: the following would cause module name conflict:
    drivers/dma/mediatek/mtk-hsdma.ko
    drivers/staging/mt7621-dma/mtk-hsdma.ko

The fix is to rename mtk-hsdma.c to hsdma-mt7621.c.  Also we can use the
KBUILD_MODNAME where appropriate instead of hard coding the name.

regards,
dan carpenter
Dan Carpenter Feb. 2, 2021, 8:31 a.m. UTC | #2
Apparently this was already merged?  Never mind then.  Once it's merged
it can't be changed.  No big stress...

regards,
dan carpenter
Greg Kroah-Hartman Feb. 2, 2021, 11:09 a.m. UTC | #3
On Tue, Feb 02, 2021 at 11:31:17AM +0300, Dan Carpenter wrote:
> Apparently this was already merged?  Never mind then.  Once it's merged
> it can't be changed.  No big stress...

Sorry, yes, already in my tree...
diff mbox series

Patch

diff --git a/drivers/staging/mt7621-dma/Makefile b/drivers/staging/mt7621-dma/Makefile
index 66da1bf10c32..23256d1286f3 100644
--- a/drivers/staging/mt7621-dma/Makefile
+++ b/drivers/staging/mt7621-dma/Makefile
@@ -1,4 +1,4 @@ 
 # SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_MTK_HSDMA) += mtk-hsdma.o
+obj-$(CONFIG_MTK_HSDMA) += hsdma-mt7621.o
 
 ccflags-y += -I$(srctree)/drivers/dma
diff --git a/drivers/staging/mt7621-dma/mtk-hsdma.c b/drivers/staging/mt7621-dma/hsdma-mt7621.c
similarity index 99%
rename from drivers/staging/mt7621-dma/mtk-hsdma.c
rename to drivers/staging/mt7621-dma/hsdma-mt7621.c
index bc4bb4374313..b0ed935de7ac 100644
--- a/drivers/staging/mt7621-dma/mtk-hsdma.c
+++ b/drivers/staging/mt7621-dma/hsdma-mt7621.c
@@ -749,7 +749,7 @@  static struct platform_driver mtk_hsdma_driver = {
 	.probe = mtk_hsdma_probe,
 	.remove = mtk_hsdma_remove,
 	.driver = {
-		.name = "hsdma-mt7621",
+		.name = KBUILD_MODNAME,
 		.of_match_table = mtk_hsdma_of_match,
 	},
 };