* [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
@ 2026-03-17 14:22 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-17 14:22 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-17 14:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 14:22 [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 kernel test robot
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.