All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
@ 2021-07-03 21:42 ` kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-07-03 21:42 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: clang-built-linux, kbuild-all, linux-kernel, Thomas Gleixner

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
@ 2021-07-03 21:42 ` kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2021-07-03 21:42 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2348 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 --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
  2021-07-03 21:42 ` kernel test robot
@ 2021-07-04 17:43   ` Paul E. McKenney
  -1 siblings, 0 replies; 12+ messages in thread
From: Paul E. McKenney @ 2021-07-04 17:43 UTC (permalink / raw)
  To: kernel test robot
  Cc: clang-built-linux, kbuild-all, linux-kernel, Thomas Gleixner

On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
> 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.

You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
just above the excerpt below:

/* Assume HZ > 100. */
#define JIFFIES_SHIFT   8

So this is expected behavior.

Would it help if I gave that comment some teeth, for example, as
shown at the end of this email?

> 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	

------------------------------------------------------------------------

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e1856030fa66..8f0ad6e4183c 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2573,6 +2573,7 @@ config TEST_FPU
 config TEST_CLOCKSOURCE_WATCHDOG
 	tristate "Test clocksource watchdog in kernel space"
 	depends on CLOCKSOURCE_WATCHDOG
+	depends on HZ >= 100
 	help
 	  Enable this option to create a kernel module that will trigger
 	  a test of the clocksource watchdog.  This module may be loaded

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
@ 2021-07-04 17:43   ` Paul E. McKenney
  0 siblings, 0 replies; 12+ messages in thread
From: Paul E. McKenney @ 2021-07-04 17:43 UTC (permalink / raw)
  To: kbuild-all

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

On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
> 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.

You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
just above the excerpt below:

/* Assume HZ > 100. */
#define JIFFIES_SHIFT   8

So this is expected behavior.

Would it help if I gave that comment some teeth, for example, as
shown at the end of this email?

> 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	

------------------------------------------------------------------------

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e1856030fa66..8f0ad6e4183c 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2573,6 +2573,7 @@ config TEST_FPU
 config TEST_CLOCKSOURCE_WATCHDOG
 	tristate "Test clocksource watchdog in kernel space"
 	depends on CLOCKSOURCE_WATCHDOG
+	depends on HZ >= 100
 	help
 	  Enable this option to create a kernel module that will trigger
 	  a test of the clocksource watchdog.  This module may be loaded

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [kbuild-all] Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
  2021-07-04 17:43   ` Paul E. McKenney
@ 2021-07-05  7:47     ` Rong Chen
  -1 siblings, 0 replies; 12+ messages in thread
From: Rong Chen @ 2021-07-05  7:47 UTC (permalink / raw)
  To: paulmck, kernel test robot
  Cc: clang-built-linux, kbuild-all, linux-kernel, Thomas Gleixner



On 7/5/21 1:43 AM, Paul E. McKenney wrote:
> On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
>> 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.
> You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
> just above the excerpt below:
>
> /* Assume HZ > 100. */
> #define JIFFIES_SHIFT   8
>
> So this is expected behavior.
>
> Would it help if I gave that comment some teeth, for example, as
> shown at the end of this email?

Hi Paul,

I have confirmed that the below change can avoid the warning.

Best Regards,
Rong Chen

>
> ------------------------------------------------------------------------
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index e1856030fa66..8f0ad6e4183c 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -2573,6 +2573,7 @@ config TEST_FPU
>   config TEST_CLOCKSOURCE_WATCHDOG
>   	tristate "Test clocksource watchdog in kernel space"
>   	depends on CLOCKSOURCE_WATCHDOG
> +	depends on HZ >= 100
>   	help
>   	  Enable this option to create a kernel module that will trigger
>   	  a test of the clocksource watchdog.  This module may be loaded
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
@ 2021-07-05  7:47     ` Rong Chen
  0 siblings, 0 replies; 12+ messages in thread
From: Rong Chen @ 2021-07-05  7:47 UTC (permalink / raw)
  To: kbuild-all

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



On 7/5/21 1:43 AM, Paul E. McKenney wrote:
> On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
>> 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.
> You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
> just above the excerpt below:
>
> /* Assume HZ > 100. */
> #define JIFFIES_SHIFT   8
>
> So this is expected behavior.
>
> Would it help if I gave that comment some teeth, for example, as
> shown at the end of this email?

Hi Paul,

I have confirmed that the below change can avoid the warning.

Best Regards,
Rong Chen

>
> ------------------------------------------------------------------------
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index e1856030fa66..8f0ad6e4183c 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -2573,6 +2573,7 @@ config TEST_FPU
>   config TEST_CLOCKSOURCE_WATCHDOG
>   	tristate "Test clocksource watchdog in kernel space"
>   	depends on CLOCKSOURCE_WATCHDOG
> +	depends on HZ >= 100
>   	help
>   	  Enable this option to create a kernel module that will trigger
>   	  a test of the clocksource watchdog.  This module may be loaded
> _______________________________________________
> kbuild-all mailing list -- kbuild-all(a)lists.01.org
> To unsubscribe send an email to kbuild-all-leave(a)lists.01.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [kbuild-all] Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
  2021-07-05  7:47     ` Rong Chen
@ 2021-07-05 15:21       ` Paul E. McKenney
  -1 siblings, 0 replies; 12+ messages in thread
From: Paul E. McKenney @ 2021-07-05 15:21 UTC (permalink / raw)
  To: Rong Chen
  Cc: kernel test robot, clang-built-linux, kbuild-all, linux-kernel,
	Thomas Gleixner

On Mon, Jul 05, 2021 at 03:47:09PM +0800, Rong Chen wrote:
> 
> 
> On 7/5/21 1:43 AM, Paul E. McKenney wrote:
> > On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
> > > 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.
> > You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
> > just above the excerpt below:
> > 
> > /* Assume HZ > 100. */
> > #define JIFFIES_SHIFT   8
> > 
> > So this is expected behavior.
> > 
> > Would it help if I gave that comment some teeth, for example, as
> > shown at the end of this email?
> 
> Hi Paul,
> 
> I have confirmed that the below change can avoid the warning.

Very good, and thank you!  May I add your Tested-by?

							Thanx, Paul

> Best Regards,
> Rong Chen
> 
> > 
> > ------------------------------------------------------------------------
> > 
> > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > index e1856030fa66..8f0ad6e4183c 100644
> > --- a/lib/Kconfig.debug
> > +++ b/lib/Kconfig.debug
> > @@ -2573,6 +2573,7 @@ config TEST_FPU
> >   config TEST_CLOCKSOURCE_WATCHDOG
> >   	tristate "Test clocksource watchdog in kernel space"
> >   	depends on CLOCKSOURCE_WATCHDOG
> > +	depends on HZ >= 100
> >   	help
> >   	  Enable this option to create a kernel module that will trigger
> >   	  a test of the clocksource watchdog.  This module may be loaded
> > _______________________________________________
> > kbuild-all mailing list -- kbuild-all@lists.01.org
> > To unsubscribe send an email to kbuild-all-leave@lists.01.org
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
@ 2021-07-05 15:21       ` Paul E. McKenney
  0 siblings, 0 replies; 12+ messages in thread
From: Paul E. McKenney @ 2021-07-05 15:21 UTC (permalink / raw)
  To: kbuild-all

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

On Mon, Jul 05, 2021 at 03:47:09PM +0800, Rong Chen wrote:
> 
> 
> On 7/5/21 1:43 AM, Paul E. McKenney wrote:
> > On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
> > > 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.
> > You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
> > just above the excerpt below:
> > 
> > /* Assume HZ > 100. */
> > #define JIFFIES_SHIFT   8
> > 
> > So this is expected behavior.
> > 
> > Would it help if I gave that comment some teeth, for example, as
> > shown at the end of this email?
> 
> Hi Paul,
> 
> I have confirmed that the below change can avoid the warning.

Very good, and thank you!  May I add your Tested-by?

							Thanx, Paul

> Best Regards,
> Rong Chen
> 
> > 
> > ------------------------------------------------------------------------
> > 
> > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > index e1856030fa66..8f0ad6e4183c 100644
> > --- a/lib/Kconfig.debug
> > +++ b/lib/Kconfig.debug
> > @@ -2573,6 +2573,7 @@ config TEST_FPU
> >   config TEST_CLOCKSOURCE_WATCHDOG
> >   	tristate "Test clocksource watchdog in kernel space"
> >   	depends on CLOCKSOURCE_WATCHDOG
> > +	depends on HZ >= 100
> >   	help
> >   	  Enable this option to create a kernel module that will trigger
> >   	  a test of the clocksource watchdog.  This module may be loaded
> > _______________________________________________
> > kbuild-all mailing list -- kbuild-all(a)lists.01.org
> > To unsubscribe send an email to kbuild-all-leave(a)lists.01.org
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [kbuild-all] Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
  2021-07-05 15:21       ` Paul E. McKenney
@ 2021-07-06  0:11         ` Rong Chen
  -1 siblings, 0 replies; 12+ messages in thread
From: Rong Chen @ 2021-07-06  0:11 UTC (permalink / raw)
  To: paulmck
  Cc: kernel test robot, clang-built-linux, kbuild-all, linux-kernel,
	Thomas Gleixner



On 7/5/21 11:21 PM, Paul E. McKenney wrote:
> On Mon, Jul 05, 2021 at 03:47:09PM +0800, Rong Chen wrote:
>>
>> On 7/5/21 1:43 AM, Paul E. McKenney wrote:
>>> On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
>>>> 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.
>>> You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
>>> just above the excerpt below:
>>>
>>> /* Assume HZ > 100. */
>>> #define JIFFIES_SHIFT   8
>>>
>>> So this is expected behavior.
>>>
>>> Would it help if I gave that comment some teeth, for example, as
>>> shown at the end of this email?
>> Hi Paul,
>>
>> I have confirmed that the below change can avoid the warning.
> Very good, and thank you!  May I add your Tested-by?

Yes, please.

Best Regards,
Rong Chen

>
> 							Thanx, Paul
>
>> Best Regards,
>> Rong Chen
>>
>>> ------------------------------------------------------------------------
>>>
>>> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
>>> index e1856030fa66..8f0ad6e4183c 100644
>>> --- a/lib/Kconfig.debug
>>> +++ b/lib/Kconfig.debug
>>> @@ -2573,6 +2573,7 @@ config TEST_FPU
>>>    config TEST_CLOCKSOURCE_WATCHDOG
>>>    	tristate "Test clocksource watchdog in kernel space"
>>>    	depends on CLOCKSOURCE_WATCHDOG
>>> +	depends on HZ >= 100
>>>    	help
>>>    	  Enable this option to create a kernel module that will trigger
>>>    	  a test of the clocksource watchdog.  This module may be loaded
>>> _______________________________________________
>>> kbuild-all mailing list -- kbuild-all@lists.01.org
>>> To unsubscribe send an email to kbuild-all-leave@lists.01.org


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
@ 2021-07-06  0:11         ` Rong Chen
  0 siblings, 0 replies; 12+ messages in thread
From: Rong Chen @ 2021-07-06  0:11 UTC (permalink / raw)
  To: kbuild-all

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



On 7/5/21 11:21 PM, Paul E. McKenney wrote:
> On Mon, Jul 05, 2021 at 03:47:09PM +0800, Rong Chen wrote:
>>
>> On 7/5/21 1:43 AM, Paul E. McKenney wrote:
>>> On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
>>>> 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.
>>> You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
>>> just above the excerpt below:
>>>
>>> /* Assume HZ > 100. */
>>> #define JIFFIES_SHIFT   8
>>>
>>> So this is expected behavior.
>>>
>>> Would it help if I gave that comment some teeth, for example, as
>>> shown at the end of this email?
>> Hi Paul,
>>
>> I have confirmed that the below change can avoid the warning.
> Very good, and thank you!  May I add your Tested-by?

Yes, please.

Best Regards,
Rong Chen

>
> 							Thanx, Paul
>
>> Best Regards,
>> Rong Chen
>>
>>> ------------------------------------------------------------------------
>>>
>>> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
>>> index e1856030fa66..8f0ad6e4183c 100644
>>> --- a/lib/Kconfig.debug
>>> +++ b/lib/Kconfig.debug
>>> @@ -2573,6 +2573,7 @@ config TEST_FPU
>>>    config TEST_CLOCKSOURCE_WATCHDOG
>>>    	tristate "Test clocksource watchdog in kernel space"
>>>    	depends on CLOCKSOURCE_WATCHDOG
>>> +	depends on HZ >= 100
>>>    	help
>>>    	  Enable this option to create a kernel module that will trigger
>>>    	  a test of the clocksource watchdog.  This module may be loaded
>>> _______________________________________________
>>> kbuild-all mailing list -- kbuild-all(a)lists.01.org
>>> To unsubscribe send an email to kbuild-all-leave(a)lists.01.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [kbuild-all] Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
  2021-07-06  0:11         ` Rong Chen
@ 2021-07-06 15:47           ` Paul E. McKenney
  -1 siblings, 0 replies; 12+ messages in thread
From: Paul E. McKenney @ 2021-07-06 15:47 UTC (permalink / raw)
  To: Rong Chen
  Cc: kernel test robot, clang-built-linux, kbuild-all, linux-kernel,
	Thomas Gleixner

On Tue, Jul 06, 2021 at 08:11:07AM +0800, Rong Chen wrote:
> 
> 
> On 7/5/21 11:21 PM, Paul E. McKenney wrote:
> > On Mon, Jul 05, 2021 at 03:47:09PM +0800, Rong Chen wrote:
> > > 
> > > On 7/5/21 1:43 AM, Paul E. McKenney wrote:
> > > > On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
> > > > > 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.
> > > > You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
> > > > just above the excerpt below:
> > > > 
> > > > /* Assume HZ > 100. */
> > > > #define JIFFIES_SHIFT   8
> > > > 
> > > > So this is expected behavior.
> > > > 
> > > > Would it help if I gave that comment some teeth, for example, as
> > > > shown at the end of this email?
> > > Hi Paul,
> > > 
> > > I have confirmed that the below change can avoid the warning.
> > Very good, and thank you!  May I add your Tested-by?
> 
> Yes, please.

Applied, thank you!

							Thanx, Paul

> Best Regards,
> Rong Chen
> 
> > 
> > 							Thanx, Paul
> > 
> > > Best Regards,
> > > Rong Chen
> > > 
> > > > ------------------------------------------------------------------------
> > > > 
> > > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > > > index e1856030fa66..8f0ad6e4183c 100644
> > > > --- a/lib/Kconfig.debug
> > > > +++ b/lib/Kconfig.debug
> > > > @@ -2573,6 +2573,7 @@ config TEST_FPU
> > > >    config TEST_CLOCKSOURCE_WATCHDOG
> > > >    	tristate "Test clocksource watchdog in kernel space"
> > > >    	depends on CLOCKSOURCE_WATCHDOG
> > > > +	depends on HZ >= 100
> > > >    	help
> > > >    	  Enable this option to create a kernel module that will trigger
> > > >    	  a test of the clocksource watchdog.  This module may be loaded
> > > > _______________________________________________
> > > > kbuild-all mailing list -- kbuild-all@lists.01.org
> > > > To unsubscribe send an email to kbuild-all-leave@lists.01.org
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/time/clocksource-wdtest.c:47:22: warning: signed shift result (0x27BC86B00) requires 35 bits to represent, but 'long' only has 32 bits
@ 2021-07-06 15:47           ` Paul E. McKenney
  0 siblings, 0 replies; 12+ messages in thread
From: Paul E. McKenney @ 2021-07-06 15:47 UTC (permalink / raw)
  To: kbuild-all

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

On Tue, Jul 06, 2021 at 08:11:07AM +0800, Rong Chen wrote:
> 
> 
> On 7/5/21 11:21 PM, Paul E. McKenney wrote:
> > On Mon, Jul 05, 2021 at 03:47:09PM +0800, Rong Chen wrote:
> > > 
> > > On 7/5/21 1:43 AM, Paul E. McKenney wrote:
> > > > On Sun, Jul 04, 2021 at 05:42:36AM +0800, kernel test robot wrote:
> > > > > 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.
> > > > You have CONFIG_HZ_24=y and this test module assumes HZ > 100, as noted
> > > > just above the excerpt below:
> > > > 
> > > > /* Assume HZ > 100. */
> > > > #define JIFFIES_SHIFT   8
> > > > 
> > > > So this is expected behavior.
> > > > 
> > > > Would it help if I gave that comment some teeth, for example, as
> > > > shown at the end of this email?
> > > Hi Paul,
> > > 
> > > I have confirmed that the below change can avoid the warning.
> > Very good, and thank you!  May I add your Tested-by?
> 
> Yes, please.

Applied, thank you!

							Thanx, Paul

> Best Regards,
> Rong Chen
> 
> > 
> > 							Thanx, Paul
> > 
> > > Best Regards,
> > > Rong Chen
> > > 
> > > > ------------------------------------------------------------------------
> > > > 
> > > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > > > index e1856030fa66..8f0ad6e4183c 100644
> > > > --- a/lib/Kconfig.debug
> > > > +++ b/lib/Kconfig.debug
> > > > @@ -2573,6 +2573,7 @@ config TEST_FPU
> > > >    config TEST_CLOCKSOURCE_WATCHDOG
> > > >    	tristate "Test clocksource watchdog in kernel space"
> > > >    	depends on CLOCKSOURCE_WATCHDOG
> > > > +	depends on HZ >= 100
> > > >    	help
> > > >    	  Enable this option to create a kernel module that will trigger
> > > >    	  a test of the clocksource watchdog.  This module may be loaded
> > > > _______________________________________________
> > > > kbuild-all mailing list -- kbuild-all(a)lists.01.org
> > > > To unsubscribe send an email to kbuild-all-leave(a)lists.01.org
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-07-06 15:47 UTC | newest]

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.