lkml.org 
[lkml]   [2021]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[norov:bitmap-20211125 9/11] drivers/irqchip/irq-gic.c:433:46: warning: comparison of constant '1' with boolean expression is always false
tree:   https://github.com/norov/linux bitmap-20211125
head: e3a9cfe4830141c88aa5d8a93eae3512b2ae2882
commit: 9a237acabf8c32b395723ad4a1642201573e6ed1 [9/11] lib/cpumask: introduce num_possible_cpus_{eq,gt,le}
config: arm-defconfig (https://download.01.org/0day-ci/archive/20211127/202111272225.wq15DtQK-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/norov/linux/commit/9a237acabf8c32b395723ad4a1642201573e6ed1
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov bitmap-20211125
git checkout 9a237acabf8c32b395723ad4a1642201573e6ed1
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/irqchip/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

drivers/irqchip/irq-gic.c: In function 'gic_get_cpumask':
>> drivers/irqchip/irq-gic.c:433:46: warning: comparison of constant '1' with boolean expression is always false [-Wbool-compare]
433 | if (!mask && num_possible_cpus_gt(1) > 1)
| ^


vim +/1 +433 drivers/irqchip/irq-gic.c

419
420 static u8 gic_get_cpumask(struct gic_chip_data *gic)
421 {
422 void __iomem *base = gic_data_dist_base(gic);
423 u32 mask, i;
424
425 for (i = mask = 0; i < 32; i += 4) {
426 mask = readl_relaxed(base + GIC_DIST_TARGET + i);
427 mask |= mask >> 16;
428 mask |= mask >> 8;
429 if (mask)
430 break;
431 }
432
> 433 if (!mask && num_possible_cpus_gt(1) > 1)
434 pr_crit("GIC CPU mask not found - kernel will fail to boot.\n");
435
436 return mask;
437 }
438

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2021-11-27 15:11    [W:0.085 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site