From: kernel test robot <lkp@intel.com>
To: Ye Liu <ye.liu@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
Davidlohr Bueso <dave@stgolabs.net>,
"Paul E. McKenney" <paulmck@kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
Joel Fernandes <joelagnelf@nvidia.com>,
Boqun Feng <boqun.feng@gmail.com>,
Uladzislau Rezki <urezki@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Ye Liu <liuye@kylinos.cn>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Zqiang <qiang.zhang@linux.dev>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>
Subject: Re: [PATCH] mm: Replace (20 - PAGE_SHIFT) with common macros for pages<->MB conversion
Date: Sat, 19 Jul 2025 04:06:04 +0800 [thread overview]
Message-ID: <202507190319.0rqhQw5l-lkp@intel.com> (raw)
In-Reply-To: <20250718024134.1304745-1-ye.liu@linux.dev>
Hi Ye,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Ye-Liu/mm-Replace-20-PAGE_SHIFT-with-common-macros-for-pages-MB-conversion/20250718-104347
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250718024134.1304745-1-ye.liu%40linux.dev
patch subject: [PATCH] mm: Replace (20 - PAGE_SHIFT) with common macros for pages<->MB conversion
config: arc-randconfig-001-20250719 (https://download.01.org/0day-ci/archive/20250719/202507190319.0rqhQw5l-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 14.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250719/202507190319.0rqhQw5l-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/202507190319.0rqhQw5l-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/arc/kernel/asm-offsets.c:7:
>> include/linux/mm.h:78:9: warning: "PAGES_TO_MB" redefined
78 | #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
| ^~~~~~~~~~~
In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
from arch/arc/include/asm/irqflags.h:13,
from include/linux/irqflags.h:18,
from include/linux/spinlock.h:59,
from include/linux/sched.h:2205,
from arch/arc/kernel/asm-offsets.c:6:
arch/arc/include/asm/arcregs.h:155:9: note: this is the location of the previous definition
155 | #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
| ^~~~~~~~~~~
--
In file included from arch/arc/include/asm/cacheflush.h:18,
from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from include/linux/blkdev.h:9,
from fs/ufs/super.c:83:
>> include/linux/mm.h:78:9: warning: "PAGES_TO_MB" redefined
78 | #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
| ^~~~~~~~~~~
In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
from arch/arc/include/asm/irqflags.h:13,
from include/linux/irqflags.h:18,
from include/linux/spinlock.h:59,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:17,
from fs/ufs/super.c:70:
arch/arc/include/asm/arcregs.h:155:9: note: this is the location of the previous definition
155 | #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
| ^~~~~~~~~~~
fs/ufs/super.c: In function 'ufs_reconfigure':
fs/ufs/super.c:1246:22: warning: variable 'ufstype' set but not used [-Wunused-but-set-variable]
1246 | unsigned int ufstype;
| ^~~~~~~
--
In file included from arch/arc/kernel/asm-offsets.c:7:
>> include/linux/mm.h:78:9: warning: "PAGES_TO_MB" redefined
78 | #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
| ^~~~~~~~~~~
In file included from arch/arc/include/asm/irqflags-arcv2.h:9,
from arch/arc/include/asm/irqflags.h:13,
from include/linux/irqflags.h:18,
from include/linux/spinlock.h:59,
from include/linux/sched.h:2205,
from arch/arc/kernel/asm-offsets.c:6:
arch/arc/include/asm/arcregs.h:155:9: note: this is the location of the previous definition
155 | #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10)
| ^~~~~~~~~~~
vim +/PAGES_TO_MB +78 include/linux/mm.h
71
72 /*
73 * Convert between pages and MB
74 * 20 is the shift for 1MB (2^20 = 1MB)
75 * PAGE_SHIFT is the shift for page size (e.g., 12 for 4KB pages)
76 * So (20 - PAGE_SHIFT) converts between pages and MB
77 */
> 78 #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
79 #define MB_TO_PAGES(mb) ((mb) << (20 - PAGE_SHIFT))
80
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-07-18 20:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 2:41 Ye Liu
2025-07-18 3:21 ` Andrew Morton
2025-07-18 7:27 ` David Hildenbrand
2025-07-18 9:42 ` Dev Jain
2025-07-18 9:46 ` Dev Jain
2025-07-18 9:49 ` Lorenzo Stoakes
2025-07-18 9:57 ` Lorenzo Stoakes
2025-07-18 14:30 ` Matthew Wilcox
2025-07-18 14:32 ` Zi Yan
2025-07-18 17:47 ` Chris Li
2025-07-18 20:06 ` kernel test robot [this message]
2025-07-19 6:56 ` Lorenzo Stoakes
2025-07-19 23:38 ` Andrew Morton
2025-07-20 8:59 ` Lorenzo Stoakes
2025-07-20 18:14 ` Andrew Morton
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=202507190319.0rqhQw5l-lkp@intel.com \
--to=lkp@intel.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=boqun.feng@gmail.com \
--cc=bsegall@google.com \
--cc=dave@stgolabs.net \
--cc=david@redhat.com \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joelagnelf@nvidia.com \
--cc=josh@joshtriplett.org \
--cc=juri.lelli@redhat.com \
--cc=linux-mm@kvack.org \
--cc=liuye@kylinos.cn \
--cc=lorenzo.stoakes@oracle.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=neeraj.upadhyay@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=qiang.zhang@linux.dev \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=ye.liu@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