linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
Date: Sun, 4 Jul 2021 05:42:36 +0800	[thread overview]
Message-ID: <202107040532.wqL30yFp-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   303392fd5c160822bf778270b28ec5ea50cab2b4
commit: 1253b9b87e42ab6a3d5c2cb27af2bdd67d7e50ff clocksource: Provide kernel module to test clocksource watchdog
date:   11 days ago
config: mips-randconfig-r015-20210702 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9eb613b2de3163686b1a4bd1160f15ac56a4b083)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1253b9b87e42ab6a3d5c2cb27af2bdd67d7e50ff
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 1253b9b87e42ab6a3d5c2cb27af2bdd67d7e50ff
        # 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: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits [-Wshift-overflow]
           .mult                   = TICK_NSEC << JIFFIES_SHIFT, /* details above */
                                     ~~~~~~~~~ ^  ~~~~~~~~~~~~~
   1 warning generated.


vim +/long +47 kernel/time/clocksource-wdtest.c

    39	
    40	static struct clocksource clocksource_wdtest_jiffies = {
    41		.name			= "wdtest-jiffies",
    42		.rating			= 1, /* lowest valid rating*/
    43		.uncertainty_margin	= TICK_NSEC,
    44		.read			= wdtest_jiffies_read,
    45		.mask			= CLOCKSOURCE_MASK(32),
    46		.flags			= CLOCK_SOURCE_MUST_VERIFY,
  > 47		.mult			= TICK_NSEC << JIFFIES_SHIFT, /* details above */
    48		.shift			= JIFFIES_SHIFT,
    49		.max_cycles		= 10,
    50	};
    51	

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

             reply	other threads:[~2021-07-03 21:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-03 21:42 kernel test robot [this message]
2021-07-04 17:43 ` kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits Paul E. McKenney
2021-07-05  7:47   ` [kbuild-all] " Rong Chen
2021-07-05 15:21     ` Paul E. McKenney
2021-07-06  0:11       ` Rong Chen
2021-07-06 15:47         ` Paul E. McKenney

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=202107040532.wqL30yFp-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=paulmck@kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).