[kbuild] drivers/net/dsa/realtek/rtl8365mb.c:1391 rtl8365mb_stats_update() error: uninitialized symbol 'ret'.

2022-08-24 Thread kernel test robot
BCC: l...@intel.com
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: "Alvin Šipraga" 

Hi Alvin,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   c40e8341e3b3bb27e3a65b06b5b454626234c4f0
commit: 2511e0c87786f333c4665508f421ac99e378c719 net: dsa: realtek: fix Kconfig 
to assure consistent driver linkage
date:   4 months ago
:: branch date: 11 hours ago
:: commit date: 4 months ago
config: openrisc-randconfig-m031-20220824 
(https://download.01.org/0day-ci/archive/20220824/202208242139.0eddbkzo-...@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/net/dsa/realtek/rtl8365mb.c:1391 rtl8365mb_stats_update() error: 
uninitialized symbol 'ret'.

vim +/ret +1391 drivers/net/dsa/realtek/rtl8365mb.c

4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1348  
f5f119077b1cd6 drivers/net/dsa/realtek/rtl8365mb.c Luiz Angelo Daros de Luca 
2022-01-28  1349  static void rtl8365mb_stats_update(struct realtek_priv *priv, 
int port)
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1350  {
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1351   u64 cnt[RTL8365MB_MIB_END] = {
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1352   [RTL8365MB_MIB_ifOutOctets] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1353   [RTL8365MB_MIB_ifOutUcastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1354   [RTL8365MB_MIB_ifOutMulticastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1355   [RTL8365MB_MIB_ifOutBroadcastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1356   [RTL8365MB_MIB_ifOutDiscards] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1357   [RTL8365MB_MIB_ifInOctets] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1358   [RTL8365MB_MIB_ifInUcastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1359   [RTL8365MB_MIB_ifInMulticastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1360   [RTL8365MB_MIB_ifInBroadcastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1361   [RTL8365MB_MIB_etherStatsDropEvents] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1362   [RTL8365MB_MIB_etherStatsCollisions] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1363   [RTL8365MB_MIB_etherStatsFragments] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1364   [RTL8365MB_MIB_etherStatsJabbers] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1365   [RTL8365MB_MIB_dot3StatsFCSErrors] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1366   [RTL8365MB_MIB_dot3StatsLateCollisions] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1367   };
f5f119077b1cd6 drivers/net/dsa/realtek/rtl8365mb.c Luiz Angelo Daros de Luca 
2022-01-28  1368   struct rtl8365mb *mb = priv->chip_data;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1369   struct rtnl_link_stats64 *stats;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1370   int ret;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1371   int i;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1372  
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1373   stats = &mb->ports[port].stats;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1374  
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1375   mutex_lock(&mb->mib_lock);
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1376   for (i = 0; i < RTL8365MB_MIB_END; i++) {
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1377   struct rtl8365mb_mib_counter *c = 
&rtl8365mb_mib_counters[i];
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Š

[kbuild] drivers/net/dsa/realtek/rtl8365mb.c:1391 rtl8365mb_stats_update() error: uninitialized symbol 'ret'.

2022-08-24 Thread kernel test robot
BCC: l...@intel.com
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: "Alvin Šipraga" 

Hi Alvin,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   c40e8341e3b3bb27e3a65b06b5b454626234c4f0
commit: 2511e0c87786f333c4665508f421ac99e378c719 net: dsa: realtek: fix Kconfig 
to assure consistent driver linkage
date:   4 months ago
:: branch date: 10 hours ago
:: commit date: 4 months ago
config: openrisc-randconfig-m031-20220824 
(https://download.01.org/0day-ci/archive/20220824/202208242050.9wfsnrta-...@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/net/dsa/realtek/rtl8365mb.c:1391 rtl8365mb_stats_update() error: 
uninitialized symbol 'ret'.

vim +/ret +1391 drivers/net/dsa/realtek/rtl8365mb.c

4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1348  
f5f119077b1cd6 drivers/net/dsa/realtek/rtl8365mb.c Luiz Angelo Daros de Luca 
2022-01-28  1349  static void rtl8365mb_stats_update(struct realtek_priv *priv, 
int port)
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1350  {
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1351   u64 cnt[RTL8365MB_MIB_END] = {
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1352   [RTL8365MB_MIB_ifOutOctets] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1353   [RTL8365MB_MIB_ifOutUcastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1354   [RTL8365MB_MIB_ifOutMulticastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1355   [RTL8365MB_MIB_ifOutBroadcastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1356   [RTL8365MB_MIB_ifOutDiscards] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1357   [RTL8365MB_MIB_ifInOctets] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1358   [RTL8365MB_MIB_ifInUcastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1359   [RTL8365MB_MIB_ifInMulticastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1360   [RTL8365MB_MIB_ifInBroadcastPkts] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1361   [RTL8365MB_MIB_etherStatsDropEvents] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1362   [RTL8365MB_MIB_etherStatsCollisions] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1363   [RTL8365MB_MIB_etherStatsFragments] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1364   [RTL8365MB_MIB_etherStatsJabbers] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1365   [RTL8365MB_MIB_dot3StatsFCSErrors] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1366   [RTL8365MB_MIB_dot3StatsLateCollisions] = 1,
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1367   };
f5f119077b1cd6 drivers/net/dsa/realtek/rtl8365mb.c Luiz Angelo Daros de Luca 
2022-01-28  1368   struct rtl8365mb *mb = priv->chip_data;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1369   struct rtnl_link_stats64 *stats;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1370   int ret;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1371   int i;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1372  
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1373   stats = &mb->ports[port].stats;
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1374  
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1375   mutex_lock(&mb->mib_lock);
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1376   for (i = 0; i < RTL8365MB_MIB_END; i++) {
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Šipraga 
2021-10-18  1377   struct rtl8365mb_mib_counter *c = 
&rtl8365mb_mib_counters[i];
4af2950c50c863 drivers/net/dsa/rtl8365mb.c Alvin Š