[jimc:dd-cmap-part2 38/45] lib/dynamic_debug.c:1203:13: error: redefinition of 'ddebug_class_map_in_range'

kernel test robot <[email protected]> Wed, 05 Aug 2026 03:07:06 +0800
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://github.com/jimc/linux.git dd-cmap-part2
head:   13f3629b4d5ed9590e6f743c5514ea6d1436f964
commit: 3cc274637983ec79de1f76a40296ad6e55e2c388 [38/45] dyndbg: resolve "protection" of class'd pr_debug
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260805/[email protected]/config)
compiler: powerpc64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260805/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> lib/dynamic_debug.c:1203:13: error: redefinition of 'ddebug_class_map_in_range'
    1203 | static bool ddebug_class_map_in_range(const int class_id, const struct ddebug_class_map *map)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
   lib/dynamic_debug.c:203:13: note: previous definition of 'ddebug_class_map_in_range' with type 'bool(const int,  const struct ddebug_class_map *)' {aka '_Bool(const int,  const struct ddebug_class_map *)'}
     203 | static bool ddebug_class_map_in_range(const int class_id, const struct ddebug_class_map *map)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
>> lib/dynamic_debug.c:1211:13: error: redefinition of 'ddebug_class_user_in_range'
    1211 | static bool ddebug_class_user_in_range(const int class_id, const struct ddebug_class_user *user)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/dynamic_debug.c:209:13: note: previous definition of 'ddebug_class_user_in_range' with type 'bool(const int,  const struct ddebug_class_user *)' {aka '_Bool(const int,  const struct ddebug_class_user *)'}
     209 | static bool ddebug_class_user_in_range(const int class_id, const struct ddebug_class_user *user)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/ddebug_class_map_in_range +1203 lib/dynamic_debug.c

e9d376f0fa66bd Jason Baron 2009-02-05  1202  
d3973339379cee Jim Cromie  2025-11-18 @1203  static bool ddebug_class_map_in_range(const int class_id, const struct ddebug_class_map *map)
19ec642fbe3ebc Jim Cromie  2025-11-18  1204  {
d3973339379cee Jim Cromie  2025-11-18  1205  	if (!map)
d3973339379cee Jim Cromie  2025-11-18  1206  		return false;
19ec642fbe3ebc Jim Cromie  2025-11-18  1207  	return (class_id >= map->base &&
19ec642fbe3ebc Jim Cromie  2025-11-18  1208  		class_id < map->base + map->length);
19ec642fbe3ebc Jim Cromie  2025-11-18  1209  }
a4a2a427413e35 Jim Cromie  2022-09-04  1210  
d3973339379cee Jim Cromie  2025-11-18 @1211  static bool ddebug_class_user_in_range(const int class_id, const struct ddebug_class_user *user)
ad2bd5efcfaac4 Jim Cromie  2026-05-21  1212  {
d3973339379cee Jim Cromie  2025-11-18  1213  	if (!user)
1806908541ca6a Jim Cromie  2026-07-12  1214  		return false;
d3973339379cee Jim Cromie  2025-11-18  1215  	return ddebug_class_map_in_range(class_id - user->offset, user->map);
ad2bd5efcfaac4 Jim Cromie  2026-05-21  1216  }
b7b476699de86d Jim Cromie  2025-11-18  1217  static const char *ddebug_class_name(struct _ddebug_info *di, struct _ddebug *dp)
a4a2a427413e35 Jim Cromie  2022-09-04  1218  {
19ec642fbe3ebc Jim Cromie  2025-11-18  1219  	struct ddebug_class_map *map;
ad2bd5efcfaac4 Jim Cromie  2026-05-21  1220  	struct ddebug_class_user *cli;
19ec642fbe3ebc Jim Cromie  2025-11-18  1221  	int i;
a4a2a427413e35 Jim Cromie  2022-09-04  1222  
b7b476699de86d Jim Cromie  2025-11-18  1223  	for_subvec(i, map, di, maps)
d3973339379cee Jim Cromie  2025-11-18  1224  		if (ddebug_class_map_in_range(dp->class_id, map))
a4a2a427413e35 Jim Cromie  2022-09-04  1225  			return map->class_names[dp->class_id - map->base];
a4a2a427413e35 Jim Cromie  2022-09-04  1226  
ad2bd5efcfaac4 Jim Cromie  2026-05-21  1227  	for_subvec(i, cli, di, users)
d3973339379cee Jim Cromie  2025-11-18  1228  		if (ddebug_class_user_in_range(dp->class_id, cli))
ad2bd5efcfaac4 Jim Cromie  2026-05-21  1229  			return cli->map->class_names[dp->class_id - cli->map->base - cli->offset];
ad2bd5efcfaac4 Jim Cromie  2026-05-21  1230  
a4a2a427413e35 Jim Cromie  2022-09-04  1231  	return NULL;
a4a2a427413e35 Jim Cromie  2022-09-04  1232  }
a4a2a427413e35 Jim Cromie  2022-09-04  1233  

:::::: The code at line 1203 was first introduced by commit
:::::: d3973339379ceed1baf9dc63089791ac48f11c65 dyndbg: detect class_id reservation conflicts

:::::: TO: Jim Cromie <[email protected]>
:::::: CC: Jim Cromie <[email protected]>

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