Re: [PATCH] mt7530 don't make the CPU port a VLAN user port

From: kernel test robot
Date: Fri Jan 20 2023 - 18:34:40 EST


Hi Vladimir,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.2-rc4 next-20230120]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Vladimir-Oltean/mt7530-don-t-make-the-CPU-port-a-VLAN-user-port/20230121-012326
patch link: https://lore.kernel.org/r/20230120172132.rfo3kf4fmkxtw4cl%40skbuf
patch subject: [PATCH] mt7530 don't make the CPU port a VLAN user port
config: i386-randconfig-a005 (https://download.01.org/0day-ci/archive/20230121/202301210746.xjCzhDc3-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/563aaac5703ee8530858faf04f93f30785d74cf6
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Vladimir-Oltean/mt7530-don-t-make-the-CPU-port-a-VLAN-user-port/20230121-012326
git checkout 563aaac5703ee8530858faf04f93f30785d74cf6
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/dsa/

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/dsa/mt7530.c: In function 'mt7530_port_vlan_filtering':
>> drivers/net/dsa/mt7530.c:1525:26: warning: unused variable 'cpu_dp' [-Wunused-variable]
1525 | struct dsa_port *cpu_dp = dp->cpu_dp;
| ^~~~~~


vim +/cpu_dp +1525 drivers/net/dsa/mt7530.c

83163f7dca5684 Sean Wang 2017-12-15 1519
83163f7dca5684 Sean Wang 2017-12-15 1520 static int
89153ed6ebc148 Vladimir Oltean 2021-02-13 1521 mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
89153ed6ebc148 Vladimir Oltean 2021-02-13 1522 struct netlink_ext_ack *extack)
83163f7dca5684 Sean Wang 2017-12-15 1523 {
1f9a6abecf538c Frank Wunderlich 2022-06-10 1524 struct dsa_port *dp = dsa_to_port(ds, port);
1f9a6abecf538c Frank Wunderlich 2022-06-10 @1525 struct dsa_port *cpu_dp = dp->cpu_dp;
1f9a6abecf538c Frank Wunderlich 2022-06-10 1526
83163f7dca5684 Sean Wang 2017-12-15 1527 if (vlan_filtering) {
83163f7dca5684 Sean Wang 2017-12-15 1528 /* The port is being kept as VLAN-unaware port when bridge is
83163f7dca5684 Sean Wang 2017-12-15 1529 * set up with vlan_filtering not being set, Otherwise, the
83163f7dca5684 Sean Wang 2017-12-15 1530 * port and the corresponding CPU port is required the setup
83163f7dca5684 Sean Wang 2017-12-15 1531 * for becoming a VLAN-aware port.
83163f7dca5684 Sean Wang 2017-12-15 1532 */
83163f7dca5684 Sean Wang 2017-12-15 1533 mt7530_port_set_vlan_aware(ds, port);
563aaac5703ee8 Vladimir Oltean 2023-01-20 1534 // mt7530_port_set_vlan_aware(ds, cpu_dp->index);
e3ee07d14fac20 Vladimir Oltean 2019-04-28 1535 } else {
e3ee07d14fac20 Vladimir Oltean 2019-04-28 1536 mt7530_port_set_vlan_unaware(ds, port);
83163f7dca5684 Sean Wang 2017-12-15 1537 }
83163f7dca5684 Sean Wang 2017-12-15 1538
83163f7dca5684 Sean Wang 2017-12-15 1539 return 0;
83163f7dca5684 Sean Wang 2017-12-15 1540 }
83163f7dca5684 Sean Wang 2017-12-15 1541

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests