[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208192336.LgflHRsc-lkp@intel.com>
Date: Fri, 19 Aug 2022 23:22:13 +0800
From: kernel test robot <lkp@...el.com>
To: Bo Jiao <Bo.Jiao@...iatek.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Felix Fietkau <nbd@....name>,
Sujuan Chen <sujuan.chen@...iatek.com>,
Ryder Lee <ryder.lee@...iatek.com>
Subject: drivers/net/wireless/mediatek/mt76/mt7915/mmio.c:341
__mt7915_reg_addr() warn: always true condition '(addr <= 4294967295) =>
(0-u32max <= u32max)'
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c
drivers/net/wireless/mediatek/mt76/mt7915/dma.c
drivers/net/wireless/mediatek/mt76/mt7915/init.c
drivers/net/wireless/mediatek/mt76/mt7915/mac.c
drivers/net/wireless/mediatek/mt76/mt7915/main.c
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
drivers/net/wireless/mediatek/mt76/mt7915/regs.h
drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c2d0b039c5cc0112206a5b22431b577cb1c57ad
commit: cd4c314a65d3cce6486f8303e42aca04fd9f9011 mt76: mt7915: refine register definition
date: 7 months ago
config: ia64-randconfig-m031-20220814
compiler: ia64-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c:341 __mt7915_reg_addr() warn: always true condition '(addr <= 4294967295) => (0-u32max <= u32max)'
vim +341 drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
311
312 static u32 __mt7915_reg_addr(struct mt7915_dev *dev, u32 addr)
313 {
314 int i;
315
316 if (addr < 0x100000)
317 return addr;
318
319 if (!dev->reg.map) {
320 dev_err(dev->mt76.dev, "err: reg_map is null\n");
321 return addr;
322 }
323
324 for (i = 0; i < dev->reg.map_size; i++) {
325 u32 ofs;
326
327 if (addr < dev->reg.map[i].phys)
328 continue;
329
330 ofs = addr - dev->reg.map[i].phys;
331 if (ofs > dev->reg.map[i].size)
332 continue;
333
334 return dev->reg.map[i].maps + ofs;
335 }
336
337 if ((addr >= MT_INFRA_BASE && addr < MT_WFSYS0_PHY_START) ||
338 (addr >= MT_WFSYS0_PHY_START && addr < MT_WFSYS1_PHY_START) ||
339 (addr >= MT_WFSYS1_PHY_START && addr <= MT_WFSYS1_PHY_END) ||
340 (addr >= MT_CBTOP1_PHY_START && addr <= MT_CBTOP1_PHY_END) ||
> 341 (addr >= MT_CBTOP2_PHY_START && addr <= MT_CBTOP2_PHY_END))
342 return mt7915_reg_map_l1(dev, addr);
343
344 return mt7915_reg_map_l2(dev, addr);
345 }
346
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (159605 bytes)
Powered by blists - more mailing lists