[net-next] r8169: use KBUILD_MODNAME instead of own module name definition

Message ID 6f77db90-f26e-a590-bb10-a0ee80c32294@gmail.com
State New
Headers show
Series
  • [net-next] r8169: use KBUILD_MODNAME instead of own module name definition
Related show

Commit Message

Heiner Kallweit May 15, 2021, 11:53 a.m.
Remove own module name definition and use KBUILD_MODNAME instead.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169_main.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 17, 2021, 9:10 p.m. | #1
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Sat, 15 May 2021 13:53:21 +0200 you wrote:
> Remove own module name definition and use KBUILD_MODNAME instead.

> 

> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

> ---

>  drivers/net/ethernet/realtek/r8169_main.c | 8 +++-----

>  1 file changed, 3 insertions(+), 5 deletions(-)


Here is the summary with links:
  - [net-next] r8169: use KBUILD_MODNAME instead of own module name definition
    https://git.kernel.org/netdev/net-next/c/7cb7541a8cc0

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Patch

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 2c89cde7d..1663e0486 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -34,8 +34,6 @@ 
 #include "r8169.h"
 #include "r8169_firmware.h"
 
-#define MODULENAME "r8169"
-
 #define FIRMWARE_8168D_1	"rtl_nic/rtl8168d-1.fw"
 #define FIRMWARE_8168D_2	"rtl_nic/rtl8168d-2.fw"
 #define FIRMWARE_8168E_1	"rtl_nic/rtl8168e-1.fw"
@@ -1454,7 +1452,7 @@  static void rtl8169_get_drvinfo(struct net_device *dev,
 	struct rtl8169_private *tp = netdev_priv(dev);
 	struct rtl_fw *rtl_fw = tp->rtl_fw;
 
-	strlcpy(info->driver, MODULENAME, sizeof(info->driver));
+	strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
 	strlcpy(info->bus_info, pci_name(tp->pci_dev), sizeof(info->bus_info));
 	BUILD_BUG_ON(sizeof(info->fw_version) < sizeof(rtl_fw->version));
 	if (rtl_fw)
@@ -5305,7 +5303,7 @@  static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		return -ENODEV;
 	}
 
-	rc = pcim_iomap_regions(pdev, BIT(region), MODULENAME);
+	rc = pcim_iomap_regions(pdev, BIT(region), KBUILD_MODNAME);
 	if (rc < 0) {
 		dev_err(&pdev->dev, "cannot remap MMIO, aborting\n");
 		return rc;
@@ -5440,7 +5438,7 @@  static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 }
 
 static struct pci_driver rtl8169_pci_driver = {
-	.name		= MODULENAME,
+	.name		= KBUILD_MODNAME,
 	.id_table	= rtl8169_pci_tbl,
 	.probe		= rtl_init_one,
 	.remove		= rtl_remove_one,