[jimc:dd-cached-prefix 65/71] lib/dynamic_debug.c:1375:58: error: 'pr_prefixes_count' undeclared; did you mean 'pr_prefixes_lock'?

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://github.com/jimc/linux.git dd-cached-prefix
head:   9c2bc97085eaafb97fb747811e19d549297d5e0a
commit: a033e345061f1753387ea54e6920ec9eb3b0c952 [65/71] dyndbg: add cached-prefixes to control file's epilogue
config: i386-randconfig-011-20260812 (https://download.01.org/0day-ci/archive/20260817/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260817/[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]/

Note: the jimc/dd-cached-prefix HEAD 9c2bc97085eaafb97fb747811e19d549297d5e0a builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   lib/dynamic_debug.c: In function 'ddebug_proc_show':
>> lib/dynamic_debug.c:1375:58: error: 'pr_prefixes_count' undeclared (first use in this function); did you mean 'pr_prefixes_lock'?
    1375 |                 seq_printf(m, "#: cached_prefixes=%u\n", pr_prefixes_count);
         |                                                          ^~~~~~~~~~~~~~~~~
         |                                                          pr_prefixes_lock
   lib/dynamic_debug.c:1375:58: note: each undeclared identifier is reported only once for each function it appears in


vim +1375 lib/dynamic_debug.c

  1355	
  1356	/*
  1357	 * Seq_ops show method.  Called several times within a read()
  1358	 * call from userspace, with ddebug_lock held.  Formats the
  1359	 * current _ddebug as a single human-readable line, with a
  1360	 * special case for the header line.
  1361	 */
  1362	static int ddebug_proc_show(struct seq_file *m, void *p)
  1363	{
  1364		struct ddebug_iter *iter = m->private;
  1365		struct _ddebug *dp = p;
  1366		struct flagsbuf flags;
  1367		char const *class;
  1368	
  1369		if (p == SEQ_START_TOKEN) {
  1370			seq_puts(m,
  1371				 "# filename:lineno [module]function flags format\n");
  1372			return 0;
  1373		}
  1374		if (p == EPILOGUE_TOKEN) {
> 1375			seq_printf(m, "#: cached_prefixes=%u\n", pr_prefixes_count);
  1376			seq_printf(m, "#: total call-counts: %lu\n",
  1377				   get_ddebug_call_count());
  1378			return 0;
  1379		}
  1380	
  1381		seq_printf(m, "%s:%u [%s]%s =%s \"",
  1382			   trim_prefix(desc_filename(dp)), dp->lineno,
  1383			   iter->table->info.mod_name, desc_function(dp),
  1384			   ddebug_describe_flags(dp->flags, &flags));
  1385		seq_escape_str(m, dp->format, ESCAPE_SPACE, "\t\r\n\"");
  1386		seq_putc(m, '"');
  1387	
  1388		if (dp->class_id != _DPRINTK_CLASS_DFLT) {
  1389			class = ddebug_class_name(&iter->table->info, dp);
  1390			if (class)
  1391				seq_printf(m, " class:%s", class);
  1392			else
  1393				seq_printf(m, " class:_UNKNOWN_ _id:%d", dp->class_id);
  1394		}
  1395		seq_putc(m, '\n');
  1396	
  1397		return 0;
  1398	}
  1399	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.