* drivers/net/dsa/mt7530.c:908 mt7530_set_ageing_time() error: uninitialized symbol 'age_count'.
@ 2021-11-25 14:55 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-25 14:55 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4407 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: DENG Qingfang <dqfext@gmail.com>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Vladimir Oltean <olteanv@gmail.com>
CC: Florian Fainelli <f.fainelli@gmail.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5f53fa508db098c9d372423a6dac31c8a5679cdf
commit: ea6d5c924e391872d402acac38461a5f8261e57f net: dsa: mt7530: support setting ageing time
date: 12 months ago
:::::: branch date: 21 hours ago
:::::: commit date: 12 months ago
config: ia64-randconfig-m031-20211122 (https://download.01.org/0day-ci/archive/20211125/202111252238.BmosAAYv-lkp(a)intel.com/config)
compiler: ia64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/net/dsa/mt7530.c:908 mt7530_set_ageing_time() error: uninitialized symbol 'age_count'.
drivers/net/dsa/mt7530.c:908 mt7530_set_ageing_time() error: uninitialized symbol 'age_unit'.
Old smatch warnings:
drivers/net/dsa/mt7530.c:469 mt7530_pad_clk_setup() error: uninitialized symbol 'ncpo1'.
vim +/age_count +908 drivers/net/dsa/mt7530.c
b8f126a8d54318b Sean Wang 2017-04-07 872
ea6d5c924e39187 DENG Qingfang 2020-12-08 873 static int
ea6d5c924e39187 DENG Qingfang 2020-12-08 874 mt7530_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
ea6d5c924e39187 DENG Qingfang 2020-12-08 875 {
ea6d5c924e39187 DENG Qingfang 2020-12-08 876 struct mt7530_priv *priv = ds->priv;
ea6d5c924e39187 DENG Qingfang 2020-12-08 877 unsigned int secs = msecs / 1000;
ea6d5c924e39187 DENG Qingfang 2020-12-08 878 unsigned int tmp_age_count;
ea6d5c924e39187 DENG Qingfang 2020-12-08 879 unsigned int error = -1;
ea6d5c924e39187 DENG Qingfang 2020-12-08 880 unsigned int age_count;
ea6d5c924e39187 DENG Qingfang 2020-12-08 881 unsigned int age_unit;
ea6d5c924e39187 DENG Qingfang 2020-12-08 882
ea6d5c924e39187 DENG Qingfang 2020-12-08 883 /* Applied timer is (AGE_CNT + 1) * (AGE_UNIT + 1) seconds */
ea6d5c924e39187 DENG Qingfang 2020-12-08 884 if (secs < 1 || secs > (AGE_CNT_MAX + 1) * (AGE_UNIT_MAX + 1))
ea6d5c924e39187 DENG Qingfang 2020-12-08 885 return -ERANGE;
ea6d5c924e39187 DENG Qingfang 2020-12-08 886
ea6d5c924e39187 DENG Qingfang 2020-12-08 887 /* iterate through all possible age_count to find the closest pair */
ea6d5c924e39187 DENG Qingfang 2020-12-08 888 for (tmp_age_count = 0; tmp_age_count <= AGE_CNT_MAX; ++tmp_age_count) {
ea6d5c924e39187 DENG Qingfang 2020-12-08 889 unsigned int tmp_age_unit = secs / (tmp_age_count + 1) - 1;
ea6d5c924e39187 DENG Qingfang 2020-12-08 890
ea6d5c924e39187 DENG Qingfang 2020-12-08 891 if (tmp_age_unit <= AGE_UNIT_MAX) {
ea6d5c924e39187 DENG Qingfang 2020-12-08 892 unsigned int tmp_error = secs -
ea6d5c924e39187 DENG Qingfang 2020-12-08 893 (tmp_age_count + 1) * (tmp_age_unit + 1);
ea6d5c924e39187 DENG Qingfang 2020-12-08 894
ea6d5c924e39187 DENG Qingfang 2020-12-08 895 /* found a closer pair */
ea6d5c924e39187 DENG Qingfang 2020-12-08 896 if (error > tmp_error) {
ea6d5c924e39187 DENG Qingfang 2020-12-08 897 error = tmp_error;
ea6d5c924e39187 DENG Qingfang 2020-12-08 898 age_count = tmp_age_count;
ea6d5c924e39187 DENG Qingfang 2020-12-08 899 age_unit = tmp_age_unit;
ea6d5c924e39187 DENG Qingfang 2020-12-08 900 }
ea6d5c924e39187 DENG Qingfang 2020-12-08 901
ea6d5c924e39187 DENG Qingfang 2020-12-08 902 /* found the exact match, so break the loop */
ea6d5c924e39187 DENG Qingfang 2020-12-08 903 if (!error)
ea6d5c924e39187 DENG Qingfang 2020-12-08 904 break;
ea6d5c924e39187 DENG Qingfang 2020-12-08 905 }
ea6d5c924e39187 DENG Qingfang 2020-12-08 906 }
ea6d5c924e39187 DENG Qingfang 2020-12-08 907
ea6d5c924e39187 DENG Qingfang 2020-12-08 @908 mt7530_write(priv, MT7530_AAC, AGE_CNT(age_count) | AGE_UNIT(age_unit));
ea6d5c924e39187 DENG Qingfang 2020-12-08 909
ea6d5c924e39187 DENG Qingfang 2020-12-08 910 return 0;
ea6d5c924e39187 DENG Qingfang 2020-12-08 911 }
ea6d5c924e39187 DENG Qingfang 2020-12-08 912
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* drivers/net/dsa/mt7530.c:908 mt7530_set_ageing_time() error: uninitialized symbol 'age_count'.
@ 2021-11-23 2:40 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-23 2:40 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4294 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: DENG Qingfang <dqfext@gmail.com>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Vladimir Oltean <olteanv@gmail.com>
CC: Florian Fainelli <f.fainelli@gmail.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 136057256686de39cc3a07c2e39ef6bc43003ff6
commit: ea6d5c924e391872d402acac38461a5f8261e57f net: dsa: mt7530: support setting ageing time
date: 12 months ago
:::::: branch date: 29 hours ago
:::::: commit date: 12 months ago
config: ia64-randconfig-m031-20211122 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/net/dsa/mt7530.c:908 mt7530_set_ageing_time() error: uninitialized symbol 'age_count'.
drivers/net/dsa/mt7530.c:908 mt7530_set_ageing_time() error: uninitialized symbol 'age_unit'.
Old smatch warnings:
drivers/net/dsa/mt7530.c:469 mt7530_pad_clk_setup() error: uninitialized symbol 'ncpo1'.
vim +/age_count +908 drivers/net/dsa/mt7530.c
b8f126a8d54318 Sean Wang 2017-04-07 872
ea6d5c924e3918 DENG Qingfang 2020-12-08 873 static int
ea6d5c924e3918 DENG Qingfang 2020-12-08 874 mt7530_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
ea6d5c924e3918 DENG Qingfang 2020-12-08 875 {
ea6d5c924e3918 DENG Qingfang 2020-12-08 876 struct mt7530_priv *priv = ds->priv;
ea6d5c924e3918 DENG Qingfang 2020-12-08 877 unsigned int secs = msecs / 1000;
ea6d5c924e3918 DENG Qingfang 2020-12-08 878 unsigned int tmp_age_count;
ea6d5c924e3918 DENG Qingfang 2020-12-08 879 unsigned int error = -1;
ea6d5c924e3918 DENG Qingfang 2020-12-08 880 unsigned int age_count;
ea6d5c924e3918 DENG Qingfang 2020-12-08 881 unsigned int age_unit;
ea6d5c924e3918 DENG Qingfang 2020-12-08 882
ea6d5c924e3918 DENG Qingfang 2020-12-08 883 /* Applied timer is (AGE_CNT + 1) * (AGE_UNIT + 1) seconds */
ea6d5c924e3918 DENG Qingfang 2020-12-08 884 if (secs < 1 || secs > (AGE_CNT_MAX + 1) * (AGE_UNIT_MAX + 1))
ea6d5c924e3918 DENG Qingfang 2020-12-08 885 return -ERANGE;
ea6d5c924e3918 DENG Qingfang 2020-12-08 886
ea6d5c924e3918 DENG Qingfang 2020-12-08 887 /* iterate through all possible age_count to find the closest pair */
ea6d5c924e3918 DENG Qingfang 2020-12-08 888 for (tmp_age_count = 0; tmp_age_count <= AGE_CNT_MAX; ++tmp_age_count) {
ea6d5c924e3918 DENG Qingfang 2020-12-08 889 unsigned int tmp_age_unit = secs / (tmp_age_count + 1) - 1;
ea6d5c924e3918 DENG Qingfang 2020-12-08 890
ea6d5c924e3918 DENG Qingfang 2020-12-08 891 if (tmp_age_unit <= AGE_UNIT_MAX) {
ea6d5c924e3918 DENG Qingfang 2020-12-08 892 unsigned int tmp_error = secs -
ea6d5c924e3918 DENG Qingfang 2020-12-08 893 (tmp_age_count + 1) * (tmp_age_unit + 1);
ea6d5c924e3918 DENG Qingfang 2020-12-08 894
ea6d5c924e3918 DENG Qingfang 2020-12-08 895 /* found a closer pair */
ea6d5c924e3918 DENG Qingfang 2020-12-08 896 if (error > tmp_error) {
ea6d5c924e3918 DENG Qingfang 2020-12-08 897 error = tmp_error;
ea6d5c924e3918 DENG Qingfang 2020-12-08 898 age_count = tmp_age_count;
ea6d5c924e3918 DENG Qingfang 2020-12-08 899 age_unit = tmp_age_unit;
ea6d5c924e3918 DENG Qingfang 2020-12-08 900 }
ea6d5c924e3918 DENG Qingfang 2020-12-08 901
ea6d5c924e3918 DENG Qingfang 2020-12-08 902 /* found the exact match, so break the loop */
ea6d5c924e3918 DENG Qingfang 2020-12-08 903 if (!error)
ea6d5c924e3918 DENG Qingfang 2020-12-08 904 break;
ea6d5c924e3918 DENG Qingfang 2020-12-08 905 }
ea6d5c924e3918 DENG Qingfang 2020-12-08 906 }
ea6d5c924e3918 DENG Qingfang 2020-12-08 907
ea6d5c924e3918 DENG Qingfang 2020-12-08 @908 mt7530_write(priv, MT7530_AAC, AGE_CNT(age_count) | AGE_UNIT(age_unit));
ea6d5c924e3918 DENG Qingfang 2020-12-08 909
ea6d5c924e3918 DENG Qingfang 2020-12-08 910 return 0;
ea6d5c924e3918 DENG Qingfang 2020-12-08 911 }
ea6d5c924e3918 DENG Qingfang 2020-12-08 912
---
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: 37291 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-25 14:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 14:55 drivers/net/dsa/mt7530.c:908 mt7530_set_ageing_time() error: uninitialized symbol 'age_count' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-11-23 2:40 kernel test robot
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.