* [linux-next:master 2144/2798] drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1049:11: warning: variable 'vid' is uninitialized when used here
@ 2021-01-14 4:24 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-01-14 4:24 UTC (permalink / raw
To: Vladimir Oltean
Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
Jakub Kicinski, Ido Schimmel, Florian Fainelli, Kurt Kanzenbach
[-- Attachment #1: Type: text/plain, Size: 4839 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aa515cdce7a151dcc14b7600d33f1414c6fa32c9
commit: b7a9e0da2d1c954b7c38217a29e002528b90d174 [2144/2798] net: switchdev: remove vid_begin -> vid_end range from VLAN objects
config: x86_64-randconfig-a004-20210114 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6077d55381a6aa3e947ef7abdc36a7515c598c8a)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b7a9e0da2d1c954b7c38217a29e002528b90d174
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout b7a9e0da2d1c954b7c38217a29e002528b90d174
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1049:11: warning: variable 'vid' is uninitialized when used here [-Wuninitialized]
vid, flag_untagged,
^~~
drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1032:9: note: initialize the variable 'vid' to silence this warning
u16 vid;
^
= 0
1 warning generated.
vim +/vid +1049 drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1020
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1021 static int prestera_port_vlans_add(struct prestera_port *port,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1022 const struct switchdev_obj_port_vlan *vlan,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1023 struct switchdev_trans *trans,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1024 struct netlink_ext_ack *extack)
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1025 {
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1026 bool flag_untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1027 bool flag_pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1028 struct net_device *dev = vlan->obj.orig_dev;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1029 struct prestera_bridge_port *br_port;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1030 struct prestera_switch *sw = port->sw;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1031 struct prestera_bridge *bridge;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1032 u16 vid;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1033
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1034 if (netif_is_bridge_master(dev))
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1035 return 0;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1036
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1037 if (switchdev_trans_ph_commit(trans))
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1038 return 0;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1039
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1040 br_port = prestera_bridge_port_by_dev(sw->swdev, dev);
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1041 if (WARN_ON(!br_port))
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1042 return -EINVAL;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1043
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1044 bridge = br_port->bridge;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1045 if (!bridge->vlan_enabled)
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1046 return 0;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1047
b7a9e0da2d1c954b Vladimir Oltean 2021-01-09 1048 return prestera_bridge_port_vlan_add(port, br_port,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 @1049 vid, flag_untagged,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1050 flag_pvid, extack);
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1051 }
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1052
:::::: The code at line 1049 was first introduced by commit
:::::: e1189d9a5fbec8153dbe03f3589bc2baa96694e2 net: marvell: prestera: Add Switchdev driver implementation
:::::: TO: Vadym Kochan <vadym.kochan@plvision.eu>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35231 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [linux-next:master 2144/2798] drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1049:11: warning: variable 'vid' is uninitialized when used here
@ 2021-01-14 4:24 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-01-14 4:24 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4918 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aa515cdce7a151dcc14b7600d33f1414c6fa32c9
commit: b7a9e0da2d1c954b7c38217a29e002528b90d174 [2144/2798] net: switchdev: remove vid_begin -> vid_end range from VLAN objects
config: x86_64-randconfig-a004-20210114 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6077d55381a6aa3e947ef7abdc36a7515c598c8a)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b7a9e0da2d1c954b7c38217a29e002528b90d174
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout b7a9e0da2d1c954b7c38217a29e002528b90d174
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1049:11: warning: variable 'vid' is uninitialized when used here [-Wuninitialized]
vid, flag_untagged,
^~~
drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1032:9: note: initialize the variable 'vid' to silence this warning
u16 vid;
^
= 0
1 warning generated.
vim +/vid +1049 drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1020
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1021 static int prestera_port_vlans_add(struct prestera_port *port,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1022 const struct switchdev_obj_port_vlan *vlan,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1023 struct switchdev_trans *trans,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1024 struct netlink_ext_ack *extack)
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1025 {
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1026 bool flag_untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1027 bool flag_pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1028 struct net_device *dev = vlan->obj.orig_dev;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1029 struct prestera_bridge_port *br_port;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1030 struct prestera_switch *sw = port->sw;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1031 struct prestera_bridge *bridge;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1032 u16 vid;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1033
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1034 if (netif_is_bridge_master(dev))
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1035 return 0;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1036
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1037 if (switchdev_trans_ph_commit(trans))
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1038 return 0;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1039
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1040 br_port = prestera_bridge_port_by_dev(sw->swdev, dev);
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1041 if (WARN_ON(!br_port))
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1042 return -EINVAL;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1043
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1044 bridge = br_port->bridge;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1045 if (!bridge->vlan_enabled)
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1046 return 0;
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1047
b7a9e0da2d1c954b Vladimir Oltean 2021-01-09 1048 return prestera_bridge_port_vlan_add(port, br_port,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 @1049 vid, flag_untagged,
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1050 flag_pvid, extack);
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1051 }
e1189d9a5fbec815 Vadym Kochan 2020-09-16 1052
:::::: The code at line 1049 was first introduced by commit
:::::: e1189d9a5fbec8153dbe03f3589bc2baa96694e2 net: marvell: prestera: Add Switchdev driver implementation
:::::: TO: Vadym Kochan <vadym.kochan@plvision.eu>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35231 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-next:master 2144/2798] drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1049:11: warning: variable 'vid' is uninitialized when used here
2021-01-14 4:24 ` kernel test robot
(?)
@ 2021-01-16 8:58 ` Souptick Joarder
2021-01-16 9:03 ` Souptick Joarder
-1 siblings, 1 reply; 4+ messages in thread
From: Souptick Joarder @ 2021-01-16 8:58 UTC (permalink / raw
To: kernel test robot
Cc: Vladimir Oltean, kbuild-all, clang-built-linux,
Linux Memory Management List, Jakub Kicinski, Ido Schimmel,
Florian Fainelli, Kurt Kanzenbach
On Thu, Jan 14, 2021 at 9:54 AM kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: aa515cdce7a151dcc14b7600d33f1414c6fa32c9
> commit: b7a9e0da2d1c954b7c38217a29e002528b90d174 [2144/2798] net: switchdev: remove vid_begin -> vid_end range from VLAN objects
> config: x86_64-randconfig-a004-20210114 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6077d55381a6aa3e947ef7abdc36a7515c598c8a)
> 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
> # install x86_64 cross compiling tool for clang build
> # apt-get install binutils-x86-64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b7a9e0da2d1c954b7c38217a29e002528b90d174
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout b7a9e0da2d1c954b7c38217a29e002528b90d174
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1049:11: warning: variable 'vid' is uninitialized when used here [-Wuninitialized]
> vid, flag_untagged,
> ^~~
> drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1032:9: note: initialize the variable 'vid' to silence this warning
> u16 vid;
> ^
> = 0
> 1 warning generated.
>
>
> vim +/vid +1049 drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
>
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1020
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1021 static int prestera_port_vlans_add(struct prestera_port *port,
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1022 const struct switchdev_obj_port_vlan *vlan,
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1023 struct switchdev_trans *trans,
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1024 struct netlink_ext_ack *extack)
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1025 {
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1026 bool flag_untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1027 bool flag_pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1028 struct net_device *dev = vlan->obj.orig_dev;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1029 struct prestera_bridge_port *br_port;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1030 struct prestera_switch *sw = port->sw;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1031 struct prestera_bridge *bridge;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1032 u16 vid;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1033
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1034 if (netif_is_bridge_master(dev))
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1035 return 0;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1036
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1037 if (switchdev_trans_ph_commit(trans))
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1038 return 0;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1039
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1040 br_port = prestera_bridge_port_by_dev(sw->swdev, dev);
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1041 if (WARN_ON(!br_port))
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1042 return -EINVAL;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1043
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1044 bridge = br_port->bridge;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1045 if (!bridge->vlan_enabled)
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1046 return 0;
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1047
> b7a9e0da2d1c954b Vladimir Oltean 2021-01-09 1048 return prestera_bridge_port_vlan_add(port, br_port,
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 @1049 vid, flag_untagged,
Currently vid is passed as garbage value. Is initializing vid = 0 and
passing it to prestera_bridge_port_vlan_add()
the right thing to do ? Or do we need to pass more appropriate values ?
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1050 flag_pvid, extack);
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1051 }
> e1189d9a5fbec815 Vadym Kochan 2020-09-16 1052
>
> :::::: The code at line 1049 was first introduced by commit
> :::::: e1189d9a5fbec8153dbe03f3589bc2baa96694e2 net: marvell: prestera: Add Switchdev driver implementation
>
> :::::: TO: Vadym Kochan <vadym.kochan@plvision.eu>
> :::::: CC: David S. Miller <davem@davemloft.net>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-next:master 2144/2798] drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1049:11: warning: variable 'vid' is uninitialized when used here
2021-01-16 8:58 ` Souptick Joarder
@ 2021-01-16 9:03 ` Souptick Joarder
0 siblings, 0 replies; 4+ messages in thread
From: Souptick Joarder @ 2021-01-16 9:03 UTC (permalink / raw
To: kernel test robot
Cc: Vladimir Oltean, kbuild-all, clang-built-linux,
Linux Memory Management List, Jakub Kicinski, Ido Schimmel,
Florian Fainelli, Kurt Kanzenbach
On Sat, Jan 16, 2021 at 2:28 PM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> On Thu, Jan 14, 2021 at 9:54 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: aa515cdce7a151dcc14b7600d33f1414c6fa32c9
> > commit: b7a9e0da2d1c954b7c38217a29e002528b90d174 [2144/2798] net: switchdev: remove vid_begin -> vid_end range from VLAN objects
> > config: x86_64-randconfig-a004-20210114 (attached as .config)
> > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6077d55381a6aa3e947ef7abdc36a7515c598c8a)
> > 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
> > # install x86_64 cross compiling tool for clang build
> > # apt-get install binutils-x86-64-linux-gnu
> > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b7a9e0da2d1c954b7c38217a29e002528b90d174
> > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > git fetch --no-tags linux-next master
> > git checkout b7a9e0da2d1c954b7c38217a29e002528b90d174
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1049:11: warning: variable 'vid' is uninitialized when used here [-Wuninitialized]
> > vid, flag_untagged,
> > ^~~
> > drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1032:9: note: initialize the variable 'vid' to silence this warning
> > u16 vid;
> > ^
> > = 0
> > 1 warning generated.
> >
> >
> > vim +/vid +1049 drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
> >
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1020
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1021 static int prestera_port_vlans_add(struct prestera_port *port,
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1022 const struct switchdev_obj_port_vlan *vlan,
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1023 struct switchdev_trans *trans,
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1024 struct netlink_ext_ack *extack)
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1025 {
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1026 bool flag_untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1027 bool flag_pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1028 struct net_device *dev = vlan->obj.orig_dev;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1029 struct prestera_bridge_port *br_port;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1030 struct prestera_switch *sw = port->sw;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1031 struct prestera_bridge *bridge;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1032 u16 vid;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1033
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1034 if (netif_is_bridge_master(dev))
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1035 return 0;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1036
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1037 if (switchdev_trans_ph_commit(trans))
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1038 return 0;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1039
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1040 br_port = prestera_bridge_port_by_dev(sw->swdev, dev);
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1041 if (WARN_ON(!br_port))
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1042 return -EINVAL;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1043
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1044 bridge = br_port->bridge;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1045 if (!bridge->vlan_enabled)
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1046 return 0;
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1047
> > b7a9e0da2d1c954b Vladimir Oltean 2021-01-09 1048 return prestera_bridge_port_vlan_add(port, br_port,
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 @1049 vid, flag_untagged,
>
> Currently vid is passed as garbage value. Is initializing vid = 0 and
> passing it to prestera_bridge_port_vlan_add()
> the right thing to do ? Or do we need to pass more appropriate values ?
Please ignore this comment. Vladimir has already posted the fix.
>
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1050 flag_pvid, extack);
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1051 }
> > e1189d9a5fbec815 Vadym Kochan 2020-09-16 1052
> >
> > :::::: The code at line 1049 was first introduced by commit
> > :::::: e1189d9a5fbec8153dbe03f3589bc2baa96694e2 net: marvell: prestera: Add Switchdev driver implementation
> >
> > :::::: TO: Vadym Kochan <vadym.kochan@plvision.eu>
> > :::::: CC: David S. Miller <davem@davemloft.net>
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-16 9:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-14 4:24 [linux-next:master 2144/2798] drivers/net/ethernet/marvell/prestera/prestera_switchdev.c:1049:11: warning: variable 'vid' is uninitialized when used here kernel test robot
2021-01-14 4:24 ` kernel test robot
2021-01-16 8:58 ` Souptick Joarder
2021-01-16 9:03 ` Souptick Joarder
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.