* [xlnx:xlnx_rebase_v5.4 1563/1762] drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1962:10: warning: 'regval' may be used uninitialized in this function
@ 2021-06-16 3:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-16 3:21 UTC (permalink / raw)
To: Harini Katakam
Cc: kbuild-all, linux-arm-kernel, Michal Simek, Radhey Shyam Pandey
[-- Attachment #1: Type: text/plain, Size: 6315 bytes --]
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: d128303e4c53bcf7775c46771bf64c71596f3303
commit: d42de16ed2832785de4066fac3883d46ed3f063f [1563/1762] net: xilinx: XXV Ethernet HW timestamp fixes
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Xilinx/linux-xlnx/commit/d42de16ed2832785de4066fac3883d46ed3f063f
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.4
git checkout d42de16ed2832785de4066fac3883d46ed3f063f
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
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/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_queue_xmit':
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1077:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1077 | const struct ethhdr *eth;
| ^~~~~
drivers/net/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_ioctl':
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1962:10: warning: 'regval' may be used uninitialized in this function [-Wmaybe-uninitialized]
1962 | regval &= ~XAE_TC_INBAND1588_MASK;
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1927:6: note: 'regval' was declared here
1927 | u32 regval;
| ^~~~~~
vim +/regval +1962 drivers/net/ethernet/xilinx/xilinx_axienet_main.c
bbcf6f9bb1bc20 Saurabh Sengar 2020-02-13 1951
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1952 /* reserved for future extensions */
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1953 if (config->flags)
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1954 return -EINVAL;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1955
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1956 /* Read the current value in the MAC TX CTRL register */
d42de16ed28327 Harini Katakam 2020-09-24 1957 if (lp->axienet_config->mactype != XAXIENET_10G_25G)
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1958 regval = axienet_ior(lp, XAE_TC_OFFSET);
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1959
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1960 switch (config->tx_type) {
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1961 case HWTSTAMP_TX_OFF:
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 @1962 regval &= ~XAE_TC_INBAND1588_MASK;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1963 break;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1964 case HWTSTAMP_TX_ON:
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1965 config->tx_type = HWTSTAMP_TX_ON;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1966 regval |= XAE_TC_INBAND1588_MASK;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1967 break;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1968 case HWTSTAMP_TX_ONESTEP_SYNC:
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1969 config->tx_type = HWTSTAMP_TX_ONESTEP_SYNC;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1970 regval |= XAE_TC_INBAND1588_MASK;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1971 break;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1972 default:
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1973 return -ERANGE;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1974 }
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1975
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1976 if (lp->axienet_config->mactype != XAXIENET_10G_25G)
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1977 axienet_iow(lp, XAE_TC_OFFSET, regval);
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1978
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1979 /* Read the current value in the MAC RX RCW1 register */
d42de16ed28327 Harini Katakam 2020-09-24 1980 if (lp->axienet_config->mactype != XAXIENET_10G_25G)
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1981 regval = axienet_ior(lp, XAE_RCW1_OFFSET);
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1982
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1983 /* On RX always timestamp everything */
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1984 switch (config->rx_filter) {
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1985 case HWTSTAMP_FILTER_NONE:
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1986 regval &= ~XAE_RCW1_INBAND1588_MASK;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1987 break;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1988 default:
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1989 config->rx_filter = HWTSTAMP_FILTER_ALL;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1990 regval |= XAE_RCW1_INBAND1588_MASK;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1991 }
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1992
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1993 if (lp->axienet_config->mactype != XAXIENET_10G_25G)
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1994 axienet_iow(lp, XAE_RCW1_OFFSET, regval);
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1995
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1996 return 0;
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1997 }
7aee9da192ba57 Appana Durga Kedareswara Rao 2020-01-24 1998
:::::: The code at line 1962 was first introduced by commit
:::::: 7aee9da192ba57210897a418ada793ac5b15a851 net: axienet: Add support for 1588
:::::: TO: Appana Durga Kedareswara Rao <appana.durga.rao@xilinx.com>
:::::: CC: Michal Simek <michal.simek@xilinx.com>
---
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: 60703 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-16 3:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 3:21 [xlnx:xlnx_rebase_v5.4 1563/1762] drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1962:10: warning: 'regval' may be used uninitialized in this function kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).