public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vincent Chen <vincent.chen@sifive.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Palmer Dabbelt <palmerdabbelt@google.com>
Subject: arch/riscv/errata/sifive/errata.c:26:14: warning: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true
Date: Wed, 10 Nov 2021 11:01:02 +0800	[thread overview]
Message-ID: <202111101151.vKAVYoEr-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 800149a77c2cb8746a94457939b1ba1e37d2c14e riscv: sifive: Apply errata "cip-453" patch
date:   7 months ago
config: riscv-randconfig-c006-20211109 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f3798ad5fa845771846599f3c088016e3aef800c)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=800149a77c2cb8746a94457939b1ba1e37d2c14e
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 800149a77c2cb8746a94457939b1ba1e37d2c14e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv 

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 >>):

>> arch/riscv/errata/sifive/errata.c:26:14: warning: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
           if (arch_id != 0x8000000000000007 ||
               ~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +26 arch/riscv/errata/sifive/errata.c

    18	
    19	static bool errata_cip_453_check_func(unsigned long  arch_id, unsigned long impid)
    20	{
    21		/*
    22		 * Affected cores:
    23		 * Architecture ID: 0x8000000000000007
    24		 * Implement ID: 0x20181004 <= impid <= 0x20191105
    25		 */
  > 26		if (arch_id != 0x8000000000000007 ||
    27		    (impid < 0x20181004 || impid > 0x20191105))
    28			return false;
    29		return true;
    30	}
    31	

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

                 reply	other threads:[~2021-11-10  3:02 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=202111101151.vKAVYoEr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=palmerdabbelt@google.com \
    --cc=vincent.chen@sifive.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