Re: [PATCH v2] drivers: net: Replace acpi_bus_get_device()

From: kernel test robot
Date: Wed Feb 02 2022 - 05:46:59 EST


Hi "Rafael,

I love your patch! Yet something to improve:

[auto build test ERROR on net/master]
[also build test ERROR on net-next/master horms-ipvs/master linus/master v5.17-rc2 next-20220202]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Rafael-J-Wysocki/drivers-net-Replace-acpi_bus_get_device/20220202-035902
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 881cc731df6af99a21622e9be25a23b81adcd10b
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20220202/202202021810.82z7OPTR-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6b1e844b69f15bb7dffaf9365cd2b355d2eb7579)
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/0day-ci/linux/commit/1d2a29e30eb391a02f25f551e6f4242e32f5b01f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rafael-J-Wysocki/drivers-net-Replace-acpi_bus_get_device/20220202-035902
git checkout 1d2a29e30eb391a02f25f551e6f4242e32f5b01f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/media/cec/platform/seco/ drivers/net/ethernet/cavium/thunder/ drivers/net/wireless/ath/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1409:24: error: use of undeclared identifier 'bgx'
struct device *dev = &bgx->pdev->dev;
^
1 error generated.


vim +/bgx +1409 drivers/net/ethernet/cavium/thunder/thunder_bgx.c

46b903a01c053d0 David Daney 2015-08-10 1403
46b903a01c053d0 David Daney 2015-08-10 1404 /* Currently only sets the MAC address. */
46b903a01c053d0 David Daney 2015-08-10 1405 static acpi_status bgx_acpi_register_phy(acpi_handle handle,
46b903a01c053d0 David Daney 2015-08-10 1406 u32 lvl, void *context, void **rv)
46b903a01c053d0 David Daney 2015-08-10 1407 {
1d2a29e30eb391a Rafael J. Wysocki 2022-02-01 1408 struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
1d82efaca87ecf5 Robert Richter 2016-02-11 @1409 struct device *dev = &bgx->pdev->dev;
1d2a29e30eb391a Rafael J. Wysocki 2022-02-01 1410 struct bgx *bgx = context;
46b903a01c053d0 David Daney 2015-08-10 1411
1d2a29e30eb391a Rafael J. Wysocki 2022-02-01 1412 if (!adev)
46b903a01c053d0 David Daney 2015-08-10 1413 goto out;
46b903a01c053d0 David Daney 2015-08-10 1414
7aa4865506a26c6 Vadim Lomovtsev 2017-01-12 1415 acpi_get_mac_address(dev, adev, bgx->lmac[bgx->acpi_lmac_idx].mac);
46b903a01c053d0 David Daney 2015-08-10 1416
7aa4865506a26c6 Vadim Lomovtsev 2017-01-12 1417 SET_NETDEV_DEV(&bgx->lmac[bgx->acpi_lmac_idx].netdev, dev);
46b903a01c053d0 David Daney 2015-08-10 1418
7aa4865506a26c6 Vadim Lomovtsev 2017-01-12 1419 bgx->lmac[bgx->acpi_lmac_idx].lmacid = bgx->acpi_lmac_idx;
7aa4865506a26c6 Vadim Lomovtsev 2017-01-12 1420 bgx->acpi_lmac_idx++; /* move to next LMAC */
46b903a01c053d0 David Daney 2015-08-10 1421 out:
46b903a01c053d0 David Daney 2015-08-10 1422 return AE_OK;
46b903a01c053d0 David Daney 2015-08-10 1423 }
46b903a01c053d0 David Daney 2015-08-10 1424

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx