[<prev] [next>] [day] [month] [year] [list]
Date: Sat, 11 Nov 2023 11:51:51 +0800
From: kernel test robot <lkp@...el.com>
To: Jose Abreu <Jose.Abreu@...opsys.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c:107:23: sparse:
sparse: restricted __le32 degrades to integer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3ca112b71f35dd5d99fc4571a56b5fc6f0c15814
commit: 25e80cd05ff81e51750106f1ae12364449ec38e7 net: stmmac: Get correct timestamp values from XGMAC
date: 4 years, 3 months ago
config: i386-randconfig-062-20230914 (https://download.01.org/0day-ci/archive/20231111/202311111127.0cYR4j6Z-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231111/202311111127.0cYR4j6Z-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311111127.0cYR4j6Z-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c:107:23: sparse: sparse: restricted __le32 degrades to integer
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c:107:50: sparse: sparse: restricted __le32 degrades to integer
vim +107 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
94
95 static int dwxgmac2_rx_check_timestamp(void *desc)
96 {
97 struct dma_desc *p = (struct dma_desc *)desc;
98 unsigned int rdes3 = le32_to_cpu(p->des3);
99 bool desc_valid, ts_valid;
100
101 dma_rmb();
102
103 desc_valid = !(rdes3 & XGMAC_RDES3_OWN) && (rdes3 & XGMAC_RDES3_CTXT);
104 ts_valid = !(rdes3 & XGMAC_RDES3_TSD) && (rdes3 & XGMAC_RDES3_TSA);
105
106 if (likely(desc_valid && ts_valid)) {
> 107 if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff))
108 return -EINVAL;
109 return 0;
110 }
111
112 return -EINVAL;
113 }
114
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists