public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Juan Yescas <jyescas@google.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-unstable 333/334] include/linux/mmzone.h:1816:8: warning: left shift count is negative
Date: Fri, 9 May 2025 15:48:55 +0800	[thread overview]
Message-ID: <202505091548.FuKO4b4v-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   930c125f685d7e8eef566fcd563390b76a28d824
commit: 16994f2b09a22523885d371caa59f17999686805 [333/334] mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order
config: powerpc64-randconfig-003-20250509 (https://download.01.org/0day-ci/archive/20250509/202505091548.FuKO4b4v-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/202505091548.FuKO4b4v-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505091548.FuKO4b4v-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/vdso/const.h:5,
                    from include/linux/const.h:4,
                    from include/linux/bits.h:5,
                    from include/linux/ratelimit_types.h:5,
                    from include/linux/printk.h:9,
                    from include/asm-generic/bug.h:22,
                    from arch/powerpc/include/asm/bug.h:116,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:6,
                    from mm/sparse.c:5:
   mm/sparse.c: In function 'usemap_size':
>> include/linux/mmzone.h:1816:8: warning: left shift count is negative [-Wshift-count-negative]
    1816 |  ((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS)
         |        ^~
   include/uapi/linux/const.h:51:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP'
      51 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
         |                                        ^
   mm/sparse.c:301:9: note: in expansion of macro 'BITS_TO_LONGS'
     301 |  return BITS_TO_LONGS(SECTION_BLOCKFLAGS_BITS) * sizeof(unsigned long);
         |         ^~~~~~~~~~~~~
   mm/sparse.c:301:23: note: in expansion of macro 'SECTION_BLOCKFLAGS_BITS'
     301 |  return BITS_TO_LONGS(SECTION_BLOCKFLAGS_BITS) * sizeof(unsigned long);
         |                       ^~~~~~~~~~~~~~~~~~~~~~~


vim +1816 include/linux/mmzone.h

d41dee369bff3b Andy Whitcroft 2005-06-23  1814  
835c134ec4dd75 Mel Gorman     2007-10-16  1815  #define SECTION_BLOCKFLAGS_BITS \
d9c2340052278d Mel Gorman     2007-10-16 @1816  	((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS)
835c134ec4dd75 Mel Gorman     2007-10-16  1817  

:::::: The code at line 1816 was first introduced by commit
:::::: d9c2340052278d8eb2ffb16b0484f8f794def4de Do not depend on MAX_ORDER when grouping pages by mobility

:::::: TO: Mel Gorman <mel@csn.ul.ie>
:::::: CC: Linus Torvalds <torvalds@woody.linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


             reply	other threads:[~2025-05-09  7:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09  7:48 kernel test robot [this message]
2025-05-09 20:43 ` [akpm-mm:mm-unstable 333/334] include/linux/mmzone.h:1816:8: warning: left shift count is negative Juan Yescas
2025-05-12  1:10   ` Philip Li
2025-05-12 19:06     ` Juan Yescas

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=202505091548.FuKO4b4v-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=jyescas@google.com \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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