diff mbox series

[net-next] net: wangxun: Remove macro that is redefined

Message ID 20230315091846.17314-1-mengyuanlou@net-swift.com (mailing list archive)
State Accepted
Commit 4dd2744fae6dc705c5d2298fe0f0812d34f5b64e
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: wangxun: Remove macro that is redefined | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next, async
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers warning 4 maintainers not CCed: kuba@kernel.org edumazet@google.com pabeni@redhat.com davem@davemloft.net
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Mengyuan Lou March 15, 2023, 9:18 a.m. UTC
Remove PCI_VENDOR_ID_WANGXUN which is redefined in
drivers/pci/quirks.

Signed-off-by: mengyuanlou <mengyuanlou@net-swift.com>
---
 drivers/net/ethernet/wangxun/libwx/wx_type.h | 5 -----
 1 file changed, 5 deletions(-)

Comments

kernel test robot March 15, 2023, 9:56 p.m. UTC | #1
Hi mengyuanlou,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/mengyuanlou/net-wangxun-Remove-macro-that-is-redefined/20230315-172033
patch link:    https://lore.kernel.org/r/20230315091846.17314-1-mengyuanlou%40net-swift.com
patch subject: [PATCH net-next] net: wangxun: Remove macro that is redefined
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20230316/202303160530.zDOH600Q-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/189cd0016c7fb0ad7ae6b2bc58f2247d40885a97
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review mengyuanlou/net-wangxun-Remove-macro-that-is-redefined/20230315-172033
        git checkout 189cd0016c7fb0ad7ae6b2bc58f2247d40885a97
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash drivers/net/ethernet/wangxun/libwx/ drivers/net/ethernet/wangxun/txgbe/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303160530.zDOH600Q-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/net/ethernet/wangxun/libwx/wx_hw.c: In function 'wx_sw_init':
>> drivers/net/ethernet/wangxun/libwx/wx_hw.c:1688:29: error: 'PCI_VENDOR_ID_WANGXUN' undeclared (first use in this function); did you mean 'PCI_VENDOR_ID_SAMSUNG'?
    1688 |         if (wx->oem_svid == PCI_VENDOR_ID_WANGXUN) {
         |                             ^~~~~~~~~~~~~~~~~~~~~
         |                             PCI_VENDOR_ID_SAMSUNG
   drivers/net/ethernet/wangxun/libwx/wx_hw.c:1688:29: note: each undeclared identifier is reported only once for each function it appears in
--
   In file included from drivers/net/ethernet/wangxun/txgbe/txgbe_main.c:6:
>> include/linux/pci.h:1018:19: error: 'PCI_VENDOR_ID_WANGXUN' undeclared here (not in a function); did you mean 'PCI_VENDOR_ID_SAMSUNG'?
    1018 |         .vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
         |                   ^~~~~~~~~~~~~~
   drivers/net/ethernet/wangxun/txgbe/txgbe_main.c:31:11: note: in expansion of macro 'PCI_VDEVICE'
      31 |         { PCI_VDEVICE(WANGXUN, TXGBE_DEV_ID_SP1000), 0},
         |           ^~~~~~~~~~~


vim +1688 drivers/net/ethernet/wangxun/libwx/wx_hw.c

02338c484ab6250 Mengyuan Lou 2022-10-31  1673  
9607a3e62645c25 Jiawen Wu    2023-01-06  1674  int wx_sw_init(struct wx *wx)
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1675  {
9607a3e62645c25 Jiawen Wu    2023-01-06  1676  	struct pci_dev *pdev = wx->pdev;
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1677  	u32 ssid = 0;
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1678  	int err = 0;
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1679  
9607a3e62645c25 Jiawen Wu    2023-01-06  1680  	wx->vendor_id = pdev->vendor;
9607a3e62645c25 Jiawen Wu    2023-01-06  1681  	wx->device_id = pdev->device;
9607a3e62645c25 Jiawen Wu    2023-01-06  1682  	wx->revision_id = pdev->revision;
9607a3e62645c25 Jiawen Wu    2023-01-06  1683  	wx->oem_svid = pdev->subsystem_vendor;
9607a3e62645c25 Jiawen Wu    2023-01-06  1684  	wx->oem_ssid = pdev->subsystem_device;
9607a3e62645c25 Jiawen Wu    2023-01-06  1685  	wx->bus.device = PCI_SLOT(pdev->devfn);
9607a3e62645c25 Jiawen Wu    2023-01-06  1686  	wx->bus.func = PCI_FUNC(pdev->devfn);
9607a3e62645c25 Jiawen Wu    2023-01-06  1687  
9607a3e62645c25 Jiawen Wu    2023-01-06 @1688  	if (wx->oem_svid == PCI_VENDOR_ID_WANGXUN) {
9607a3e62645c25 Jiawen Wu    2023-01-06  1689  		wx->subsystem_vendor_id = pdev->subsystem_vendor;
9607a3e62645c25 Jiawen Wu    2023-01-06  1690  		wx->subsystem_device_id = pdev->subsystem_device;
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1691  	} else {
9607a3e62645c25 Jiawen Wu    2023-01-06  1692  		err = wx_flash_read_dword(wx, 0xfffdc, &ssid);
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1693  		if (!err)
9607a3e62645c25 Jiawen Wu    2023-01-06  1694  			wx->subsystem_device_id = swab16((u16)ssid);
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1695  
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1696  		return err;
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1697  	}
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1698  
9607a3e62645c25 Jiawen Wu    2023-01-06  1699  	wx->mac_table = kcalloc(wx->mac.num_rar_entries,
79625f45ca73ef3 Jiawen Wu    2023-01-06  1700  				sizeof(struct wx_mac_addr),
79625f45ca73ef3 Jiawen Wu    2023-01-06  1701  				GFP_KERNEL);
9607a3e62645c25 Jiawen Wu    2023-01-06  1702  	if (!wx->mac_table) {
9607a3e62645c25 Jiawen Wu    2023-01-06  1703  		wx_err(wx, "mac_table allocation failed\n");
79625f45ca73ef3 Jiawen Wu    2023-01-06  1704  		return -ENOMEM;
79625f45ca73ef3 Jiawen Wu    2023-01-06  1705  	}
79625f45ca73ef3 Jiawen Wu    2023-01-06  1706  
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1707  	return 0;
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1708  }
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1709  EXPORT_SYMBOL(wx_sw_init);
a34b3e6ed8fbf66 Jiawen Wu    2022-10-27  1710
patchwork-bot+netdevbpf@kernel.org March 18, 2023, 5:40 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 15 Mar 2023 17:18:46 +0800 you wrote:
> Remove PCI_VENDOR_ID_WANGXUN which is redefined in
> drivers/pci/quirks.
> 
> Signed-off-by: mengyuanlou <mengyuanlou@net-swift.com>
> ---
>  drivers/net/ethernet/wangxun/libwx/wx_type.h | 5 -----
>  1 file changed, 5 deletions(-)

Here is the summary with links:
  - [net-next] net: wangxun: Remove macro that is redefined
    https://git.kernel.org/netdev/net-next/c/4dd2744fae6d

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_type.h b/drivers/net/ethernet/wangxun/libwx/wx_type.h
index 2b9efd13c500..2bec5b1bc196 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_type.h
+++ b/drivers/net/ethernet/wangxun/libwx/wx_type.h
@@ -7,11 +7,6 @@ 
 #include <linux/bitfield.h>
 #include <linux/netdevice.h>
 
-/* Vendor ID */
-#ifndef PCI_VENDOR_ID_WANGXUN
-#define PCI_VENDOR_ID_WANGXUN                   0x8088
-#endif
-
 #define WX_NCSI_SUP                             0x8000
 #define WX_NCSI_MASK                            0x8000
 #define WX_WOL_SUP                              0x4000