[jimc:dd-shrink-go 48/59] lib/dynamic_debug.c:297:48: error: 'struct _ddebug' has no member named 'filename'; did you mean '_filename'?

kernel test robot <[email protected]> Tue, 04 Aug 2026 14:38:47 +0200
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
Hi Jim,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://github.com/jimc/linux.git dd-shrink-go
head:   7bb5af008fa5bfb055e0dd2b34a688b094890c76
commit: cfa6f73e601bea4f41eb0a637c9baa23eefd545e [48/59] dyndbg: prep to isolate 3 repetetive fields
config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260804/[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/20260804/[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 >>):

   In file included from include/asm-generic/bug.h:31,
                    from arch/x86/include/asm/bug.h:195,
                    from arch/x86/include/asm/alternative.h:9,
                    from arch/x86/include/asm/barrier.h:5,
                    from include/asm-generic/bitops/generic-non-atomic.h:7,
                    from include/linux/bitops.h:28,
                    from include/linux/kernel.h:23,
                    from lib/dynamic_debug.c:16:
   lib/dynamic_debug.c: In function 'ddebug_match_desc':
>> lib/dynamic_debug.c:297:48: error: 'struct _ddebug' has no member named 'filename'; did you mean '_filename'?
     297 |                                            dp->filename ? dp->filename : "?",
         |                                                ^~~~~~~~
   include/linux/printk.h:483:33: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:705:17: note: in expansion of macro 'printk'
     705 |                 printk(fmt, ##__VA_ARGS__);                             \
         |                 ^~~~~~
   include/linux/printk.h:719:9: note: in expansion of macro 'printk_ratelimited'
     719 |         printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~
   lib/dynamic_debug.c:296:25: note: in expansion of macro 'pr_err_ratelimited'
     296 |                         pr_err_ratelimited("ddebug: NULL format string at %s:%s:%u\n",
         |                         ^~~~~~~~~~~~~~~~~~
   lib/dynamic_debug.c:297:63: error: 'struct _ddebug' has no member named 'filename'; did you mean '_filename'?
     297 |                                            dp->filename ? dp->filename : "?",
         |                                                               ^~~~~~~~
   include/linux/printk.h:483:33: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:705:17: note: in expansion of macro 'printk'
     705 |                 printk(fmt, ##__VA_ARGS__);                             \
         |                 ^~~~~~
   include/linux/printk.h:719:9: note: in expansion of macro 'printk_ratelimited'
     719 |         printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~
   lib/dynamic_debug.c:296:25: note: in expansion of macro 'pr_err_ratelimited'
     296 |                         pr_err_ratelimited("ddebug: NULL format string at %s:%s:%u\n",
         |                         ^~~~~~~~~~~~~~~~~~
>> lib/dynamic_debug.c:298:48: error: 'struct _ddebug' has no member named 'function'; did you mean '_function'?
     298 |                                            dp->function ? dp->function : "?",
         |                                                ^~~~~~~~
   include/linux/printk.h:483:33: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:705:17: note: in expansion of macro 'printk'
     705 |                 printk(fmt, ##__VA_ARGS__);                             \
         |                 ^~~~~~
   include/linux/printk.h:719:9: note: in expansion of macro 'printk_ratelimited'
     719 |         printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~
   lib/dynamic_debug.c:296:25: note: in expansion of macro 'pr_err_ratelimited'
     296 |                         pr_err_ratelimited("ddebug: NULL format string at %s:%s:%u\n",
         |                         ^~~~~~~~~~~~~~~~~~
   lib/dynamic_debug.c:298:63: error: 'struct _ddebug' has no member named 'function'; did you mean '_function'?
     298 |                                            dp->function ? dp->function : "?",
         |                                                               ^~~~~~~~
   include/linux/printk.h:483:33: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/printk.h:705:17: note: in expansion of macro 'printk'
     705 |                 printk(fmt, ##__VA_ARGS__);                             \
         |                 ^~~~~~
   include/linux/printk.h:719:9: note: in expansion of macro 'printk_ratelimited'
     719 |         printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~
   lib/dynamic_debug.c:296:25: note: in expansion of macro 'pr_err_ratelimited'
     296 |                         pr_err_ratelimited("ddebug: NULL format string at %s:%s:%u\n",
         |                         ^~~~~~~~~~~~~~~~~~


vim +297 lib/dynamic_debug.c

cfa6f73e601bea Jim Cromie  2023-09-15  265  
e9d376f0fa66bd Jason Baron 2009-02-05  266  /*
85f7f6c0edb841 Jim Cromie  2011-12-19  267   * Search the tables for _ddebug's which match the given `query' and
85f7f6c0edb841 Jim Cromie  2011-12-19  268   * apply the `flags' and `mask' to them.  Returns number of matching
85f7f6c0edb841 Jim Cromie  2011-12-19  269   * callsites, normally the same as number of changes.  If verbose,
85f7f6c0edb841 Jim Cromie  2011-12-19  270   * logs the changes.  Takes ddebug_lock.
e9d376f0fa66bd Jason Baron 2009-02-05  271   */
83998bfdcf2e5f Jim Cromie  2025-11-18  272  static bool ddebug_match_desc(const struct ddebug_query *query,
83998bfdcf2e5f Jim Cromie  2025-11-18  273  			      struct _ddebug *dp,
a99144b08bf397 Jim Cromie  2025-11-18  274  			      struct _ddebug_info *di,
a99144b08bf397 Jim Cromie  2025-11-18  275  			      int selected_class)
83998bfdcf2e5f Jim Cromie  2025-11-18  276  {
a99144b08bf397 Jim Cromie  2025-11-18  277  	struct ddebug_class_map *site_map;
83998bfdcf2e5f Jim Cromie  2025-11-18  278  
83998bfdcf2e5f Jim Cromie  2025-11-18  279  	/* match against the source filename */
83998bfdcf2e5f Jim Cromie  2025-11-18  280  	if (query->filename &&
cfa6f73e601bea Jim Cromie  2023-09-15  281  	    !match_wildcard(query->filename, desc_filename(dp)) &&
83998bfdcf2e5f Jim Cromie  2025-11-18  282  	    !match_wildcard(query->filename,
cfa6f73e601bea Jim Cromie  2023-09-15  283  			    kbasename(desc_filename(dp))) &&
83998bfdcf2e5f Jim Cromie  2025-11-18  284  	    !match_wildcard(query->filename,
cfa6f73e601bea Jim Cromie  2023-09-15  285  			    trim_prefix(desc_filename(dp))))
83998bfdcf2e5f Jim Cromie  2025-11-18  286  		return false;
83998bfdcf2e5f Jim Cromie  2025-11-18  287  
83998bfdcf2e5f Jim Cromie  2025-11-18  288  	/* match against the function */
83998bfdcf2e5f Jim Cromie  2025-11-18  289  	if (query->function &&
cfa6f73e601bea Jim Cromie  2023-09-15  290  	    !match_wildcard(query->function, desc_function(dp)))
83998bfdcf2e5f Jim Cromie  2025-11-18  291  		return false;
83998bfdcf2e5f Jim Cromie  2025-11-18  292  
83998bfdcf2e5f Jim Cromie  2025-11-18  293  	/* match against the format */
83998bfdcf2e5f Jim Cromie  2025-11-18  294  	if (query->format) {
83998bfdcf2e5f Jim Cromie  2025-11-18  295  		if (!dp->format) {
e653e17e49b60c Jim Cromie  2026-08-03  296  			pr_err_ratelimited("ddebug: NULL format string at %s:%s:%u\n",
83998bfdcf2e5f Jim Cromie  2025-11-18 @297  					   dp->filename ? dp->filename : "?",
83998bfdcf2e5f Jim Cromie  2025-11-18 @298  					   dp->function ? dp->function : "?",
83998bfdcf2e5f Jim Cromie  2025-11-18  299  					   dp->lineno);
83998bfdcf2e5f Jim Cromie  2025-11-18  300  			return false;
83998bfdcf2e5f Jim Cromie  2025-11-18  301  		}
83998bfdcf2e5f Jim Cromie  2025-11-18  302  		if (*query->format == '^') {
83998bfdcf2e5f Jim Cromie  2025-11-18  303  			char *p;
83998bfdcf2e5f Jim Cromie  2025-11-18  304  			/* anchored search. match must be at beginning */
83998bfdcf2e5f Jim Cromie  2025-11-18  305  			p = strstr(dp->format, query->format + 1);
83998bfdcf2e5f Jim Cromie  2025-11-18  306  			if (p != dp->format)
83998bfdcf2e5f Jim Cromie  2025-11-18  307  				return false;
83998bfdcf2e5f Jim Cromie  2025-11-18  308  		} else if (!strstr(dp->format, query->format)) {
83998bfdcf2e5f Jim Cromie  2025-11-18  309  			return false;
83998bfdcf2e5f Jim Cromie  2025-11-18  310  		}
83998bfdcf2e5f Jim Cromie  2025-11-18  311  	}
83998bfdcf2e5f Jim Cromie  2025-11-18  312  
83998bfdcf2e5f Jim Cromie  2025-11-18  313  	/* match against the line number range */
83998bfdcf2e5f Jim Cromie  2025-11-18  314  	if (query->first_lineno &&
83998bfdcf2e5f Jim Cromie  2025-11-18  315  	    dp->lineno < query->first_lineno)
83998bfdcf2e5f Jim Cromie  2025-11-18  316  		return false;
83998bfdcf2e5f Jim Cromie  2025-11-18  317  	if (query->last_lineno &&
83998bfdcf2e5f Jim Cromie  2025-11-18  318  	    dp->lineno > query->last_lineno)
83998bfdcf2e5f Jim Cromie  2025-11-18  319  		return false;
83998bfdcf2e5f Jim Cromie  2025-11-18  320  
a99144b08bf397 Jim Cromie  2025-11-18  321  	/*
a99144b08bf397 Jim Cromie  2025-11-18  322  	 * above are all satisfied, so we can make final decisions:
a99144b08bf397 Jim Cromie  2025-11-18  323  	 * 1- class FOO or implied class __DEFAULT__
a99144b08bf397 Jim Cromie  2025-11-18  324  	 * 2- site.is_classed or not
a99144b08bf397 Jim Cromie  2025-11-18  325  	 */
a99144b08bf397 Jim Cromie  2025-11-18  326  	if (query->class_string) {
a99144b08bf397 Jim Cromie  2025-11-18  327  		/* class FOO given, exact match required */
a99144b08bf397 Jim Cromie  2025-11-18  328  		return (dp->class_id == selected_class);
a99144b08bf397 Jim Cromie  2025-11-18  329  	}
a99144b08bf397 Jim Cromie  2025-11-18  330  	/* query class __DEFAULT__ by omission. */
a99144b08bf397 Jim Cromie  2025-11-18  331  	if (dp->class_id == _DPRINTK_CLASS_DFLT) {
a99144b08bf397 Jim Cromie  2025-11-18  332  		/* un-classed site */
83998bfdcf2e5f Jim Cromie  2025-11-18  333  		return true;
83998bfdcf2e5f Jim Cromie  2025-11-18  334  	}
a99144b08bf397 Jim Cromie  2025-11-18  335  	/* site is class'd */
a99144b08bf397 Jim Cromie  2025-11-18  336  	site_map = ddebug_find_map_by_class_id(di, dp->class_id);
a99144b08bf397 Jim Cromie  2025-11-18  337  	if (!site_map) {
904a768d78c408 Jim Cromie  2026-03-12  338  		pr_warn_ratelimited("unknown class_id %d, check %s's CLASSMAP definitions\n",
904a768d78c408 Jim Cromie  2026-03-12  339  			  dp->class_id, di->mod_name);
a99144b08bf397 Jim Cromie  2025-11-18  340  		return false;
a99144b08bf397 Jim Cromie  2025-11-18  341  	}
a99144b08bf397 Jim Cromie  2025-11-18  342  	/* module(-param) decides protection */
a99144b08bf397 Jim Cromie  2025-11-18  343  	return !ddebug_class_wants_protection(site_map);
a99144b08bf397 Jim Cromie  2025-11-18  344  }
83998bfdcf2e5f Jim Cromie  2025-11-18  345  

:::::: The code at line 297 was first introduced by commit
:::::: 83998bfdcf2e5f0513ad68f0e0f5b328fe0937b5 dyndbg: factor ddebug_match_desc out from ddebug_change

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

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