mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/mips/bmips/setup.c:170:23: warning: array comparison always evaluates to true
@ 2020-05-27  7:54 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-27  7:54 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: kbuild-all, clang-built-linux, linux-kernel, Masahiro Yamada

[-- Attachment #1: Type: text/plain, Size: 4749 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   444fc5cde64330661bf59944c43844e7d4c2ccd8
commit: afe956c577b2d5a3d9834e4424587c1ebcf90c4c kbuild: Enable -Wtautological-compare
date:   7 weeks ago
config: mips-randconfig-r033-20200527 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        git checkout afe956c577b2d5a3d9834e4424587c1ebcf90c4c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> arch/mips/bmips/setup.c:170:23: warning: array comparison always evaluates to true [-Wtautological-compare]
else if (__dtb_start != __dtb_end)
^
1 warning generated.

vim +170 arch/mips/bmips/setup.c

d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  155  
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  156  void __init plat_mem_setup(void)
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  157  {
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  158  	void *dtb;
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  159  	const struct bmips_quirk *q;
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  160  
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  161  	set_io_port_base(0);
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  162  	ioport_resource.start = 0;
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  163  	ioport_resource.end = ~0;
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  164  
dc7a12bdfccd94c arch/mips/bmips/setup.c   Mauro Carvalho Chehab 2019-04-14  165  	/* intended to somewhat resemble ARM; see Documentation/arm/booting.rst */
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  166  	if (fw_arg0 == 0 && fw_arg1 == 0xffffffff)
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  167  		dtb = phys_to_virt(fw_arg2);
e524c788bfc1d5e arch/mips/bmips/setup.c   Yasha Cherikovsky     2018-09-25  168  	else if (fw_passed_dtb) /* UHI interface or appended dtb */
15f37e1588920e0 arch/mips/bmips/setup.c   Jonas Gorski          2016-06-20  169  		dtb = (void *)fw_passed_dtb;
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25 @170  	else if (__dtb_start != __dtb_end)
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  171  		dtb = (void *)__dtb_start;
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  172  	else
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  173  		panic("no dtb found");
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  174  
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  175  	__dt_setup_arch(dtb);
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  176  
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  177  	for (q = bmips_quirk_list; q->quirk_fn; q++) {
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  178  		if (of_flat_dt_is_compatible(of_get_flat_dt_root(),
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  179  					     q->compatible)) {
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  180  			q->quirk_fn();
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  181  		}
4b049a6b275db68 arch/mips/bmips/setup.c   Kevin Cernekee        2014-12-25  182  	}
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  183  }
d666cd0246f78bd arch/mips/bcm3384/setup.c Kevin Cernekee        2014-10-20  184  

:::::: The code at line 170 was first introduced by commit
:::::: 4b049a6b275db68c2c028937b89abd732dcdf536 MIPS: BMIPS: Add quirks for several Broadcom platforms

:::::: TO: Kevin Cernekee <cernekee@gmail.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>

---
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: 27523 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-27  7:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27  7:54 arch/mips/bmips/setup.c:170:23: warning: array comparison always evaluates to true kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®