Re: [PATCH net-next 10/28] net: fman: Move struct dev to mac_device

From: kernel test robot
Date: Sat Jun 18 2022 - 00:14:03 EST


Hi Sean,

I love your patch! Perhaps something to improve:

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

url: https://github.com/intel-lab-lkp/linux/commits/Sean-Anderson/net-dpaa-Convert-to-phylink/20220618-044003
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4875d94c69d5a4836c4225b51429d277c297aae8
config: m68k-randconfig-r036-20220617 (https://download.01.org/0day-ci/archive/20220618/202206181156.p7gQheg2-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 11.3.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/155c8f9a09b3f95f4804d306c2465ebc82fe608f
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Sean-Anderson/net-dpaa-Convert-to-phylink/20220618-044003
git checkout 155c8f9a09b3f95f4804d306c2465ebc82fe608f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/freescale/fman/

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

All warnings (new ones prefixed by >>):

drivers/net/ethernet/freescale/fman/mac.c: In function 'mac_exception':
>> drivers/net/ethernet/freescale/fman/mac.c:50:34: warning: variable 'priv' set but not used [-Wunused-but-set-variable]
50 | struct mac_priv_s *priv;
| ^~~~
drivers/net/ethernet/freescale/fman/mac.c: In function 'tgec_initialization':
drivers/net/ethernet/freescale/fman/mac.c:271:34: warning: variable 'priv' set but not used [-Wunused-but-set-variable]
271 | struct mac_priv_s *priv;
| ^~~~
drivers/net/ethernet/freescale/fman/mac.c: In function 'dtsec_initialization':
drivers/net/ethernet/freescale/fman/mac.c:333:34: warning: variable 'priv' set but not used [-Wunused-but-set-variable]
333 | struct mac_priv_s *priv;
| ^~~~


vim +/priv +50 drivers/net/ethernet/freescale/fman/mac.c

3933961682a30a Igal Liberman 2015-12-21 46
3933961682a30a Igal Liberman 2015-12-21 47 static void mac_exception(void *handle, enum fman_mac_exceptions ex)
3933961682a30a Igal Liberman 2015-12-21 48 {
3933961682a30a Igal Liberman 2015-12-21 49 struct mac_device *mac_dev;
3933961682a30a Igal Liberman 2015-12-21 @50 struct mac_priv_s *priv;
3933961682a30a Igal Liberman 2015-12-21 51
3933961682a30a Igal Liberman 2015-12-21 52 mac_dev = handle;
3933961682a30a Igal Liberman 2015-12-21 53 priv = mac_dev->priv;
3933961682a30a Igal Liberman 2015-12-21 54
3933961682a30a Igal Liberman 2015-12-21 55 if (ex == FM_MAC_EX_10G_RX_FIFO_OVFL) {
3933961682a30a Igal Liberman 2015-12-21 56 /* don't flag RX FIFO after the first */
3933961682a30a Igal Liberman 2015-12-21 57 mac_dev->set_exception(mac_dev->fman_mac,
3933961682a30a Igal Liberman 2015-12-21 58 FM_MAC_EX_10G_RX_FIFO_OVFL, false);
155c8f9a09b3f9 Sean Anderson 2022-06-17 59 dev_err(mac_dev->dev, "10G MAC got RX FIFO Error = %x\n", ex);
3933961682a30a Igal Liberman 2015-12-21 60 }
3933961682a30a Igal Liberman 2015-12-21 61
155c8f9a09b3f9 Sean Anderson 2022-06-17 62 dev_dbg(mac_dev->dev, "%s:%s() -> %d\n", KBUILD_BASENAME ".c",
3933961682a30a Igal Liberman 2015-12-21 63 __func__, ex);
3933961682a30a Igal Liberman 2015-12-21 64 }
3933961682a30a Igal Liberman 2015-12-21 65

--
0-DAY CI Kernel Test Service
https://01.org/lkp