lkml.org 
[lkml]   [2017]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 07/10] net: dsa: lan9303: Added basic offloading of unicast traffic
Hi Egil,

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

url: https://github.com/0day-ci/linux/commits/Egil-Hjelmeland/net-dsa-lan9303-unicast-offload-fdb-mdb-STP/20170727-074246
config: x86_64-randconfig-x000-201730 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

drivers/net//dsa/lan9303-core.c: In function 'lan9303_port_stp_state_set':
>> drivers/net//dsa/lan9303-core.c:945:16: warning: 'portstate' may be used uninitialized in this function [-Wmaybe-uninitialized]
int portmask, portstate;
^~~~~~~~~

vim +/portstate +945 drivers/net//dsa/lan9303-core.c

941
942 static void lan9303_port_stp_state_set(struct dsa_switch *ds, int port,
943 u8 state)
944 {
> 945 int portmask, portstate;
946 struct lan9303 *chip = ds->priv;
947
948 dev_dbg(chip->dev, "%s(port %d, state %d)\n",
949 __func__, port, state);
950 if (!chip->is_bridged)
951 return;
952
953 switch (state) {
954 case BR_STATE_DISABLED:
955 portstate = LAN9303_SWE_PORT_STATE_DISABLED_PORT0;
956 break;
957 case BR_STATE_BLOCKING:
958 case BR_STATE_LISTENING:
959 portstate = LAN9303_SWE_PORT_STATE_BLOCKING_PORT0;
960 break;
961 case BR_STATE_LEARNING:
962 portstate = LAN9303_SWE_PORT_STATE_LEARNING_PORT0;
963 break;
964 case BR_STATE_FORWARDING:
965 portstate = LAN9303_SWE_PORT_STATE_FORWARDING_PORT0;
966 break;
967 default:
968 dev_err(chip->dev, "%s(port %d, state %d)\n",
969 __func__, port, state);
970 }
971 portmask = 0x3 << (port * 2);
972 portstate <<= (port * 2);
973 lan9303_write_switch_reg_mask(chip, LAN9303_SWE_PORT_STATE,
974 portstate, portmask);
975 }
976

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2017-07-27 02:18    [W:0.228 / U:6.868 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site