From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:main-16k-gs-shusky-5.15 30/30] mm/page_alloc_debugfs.c:23:7: warning: GCC does not allow variable declarations in for loop initializers before C99
Date: Tue, 17 Mar 2026 22:22:54 +0800 [thread overview]
Message-ID: <202603172222.5HLydAd2-lkp@intel.com> (raw)
tree: https://android.googlesource.com/kernel/common main-16k-gs-shusky-5.15
head: 339bea17e1ccb695cddcbc39f88955c85e45d97a
commit: 51fec4ca6219da87e39a3c1b94e9c05741c46b5a [30/30] ANDROID: mm: Create dirs for the page orders in the debugfs
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260317/202603172222.5HLydAd2-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project f46a5153850c1303d687233d4adf699b01041da8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260317/202603172222.5HLydAd2-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/202603172222.5HLydAd2-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from <built-in>:3:
In file included from include/linux/compiler_types.h:80:
include/linux/compiler-clang.h:24:9: warning: '__SANITIZE_ADDRESS__' macro redefined [-Wmacro-redefined]
24 | #define __SANITIZE_ADDRESS__
| ^
<built-in>:368:9: note: previous definition is here
368 | #define __SANITIZE_ADDRESS__ 1
| ^
>> mm/page_alloc_debugfs.c:23:7: warning: GCC does not allow variable declarations in for loop initializers before C99 [-Wgcc-compat]
23 | for (int order = 0; order < NR_PAGE_ORDERS; order++) {
| ^
mm/page_alloc_debugfs.c:23:30: error: use of undeclared identifier 'NR_PAGE_ORDERS'
23 | for (int order = 0; order < NR_PAGE_ORDERS; order++) {
| ^~~~~~~~~~~~~~
2 warnings and 1 error generated.
vim +23 mm/page_alloc_debugfs.c
16
17
18 static inline void create_page_orders_subdirs(struct zone *zone, struct dentry *zonedir)
19 {
20 struct dentry *orderdir;
21 char dirname[12];
22
> 23 for (int order = 0; order < NR_PAGE_ORDERS; order++) {
24 snprintf(dirname, sizeof(dirname), "order-%d", order);
25 orderdir = debugfs_create_dir(dirname, zonedir);
26 }
27 }
28 static inline void create_zones_subdirs(struct pglist_data *pgdata, struct dentry *nodedir)
29 {
30 struct dentry *zonedir;
31 struct zone *zone;
32 struct zone *node_zones = pgdata->node_zones;
33 unsigned long flags;
34 char dirname[24];
35
36 for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; ++zone) {
37 if (!populated_zone(zone))
38 continue;
39
40 snprintf(dirname, sizeof(dirname), "zone-%s", zone->name);
41 spin_lock_irqsave(&zone->lock, flags);
42 zonedir = debugfs_create_dir(dirname, nodedir);
43 create_page_orders_subdirs(zone, zonedir);
44 spin_unlock_irqrestore(&zone->lock, flags);
45 }
46 }
47
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-03-17 14:23 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=202603172222.5HLydAd2-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--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 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.