mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>
Subject: arch/mips/bmips/setup.c:170:23: warning: array comparison always evaluates to true
Date: Wed, 27 May 2020 15:54:22 +0800	[thread overview]
Message-ID: <202005271517.bMrGXZRc%lkp@intel.com> (raw)

[-- 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 --]

                 reply	other threads:[~2020-05-27  7:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202005271517.bMrGXZRc%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=natechancellor@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®