Re: [PATCH 2/5] of: dynamic: Refactor action prints to not use "%pOF" inside devtree_lock

From: kernel test robot
Date: Tue Aug 01 2023 - 22:50:12 EST


Hi Rob,

kernel test robot noticed the following build errors:

[auto build test ERROR on e251a4e28a27884e8bfb7fccbf53b24736f3ef87]

url: https://github.com/intel-lab-lkp/linux/commits/Rob-Herring/of-unittest-Fix-EXPECT-for-parse_phandle_with_args_map-test/20230802-055739
base: e251a4e28a27884e8bfb7fccbf53b24736f3ef87
patch link: https://lore.kernel.org/r/20230801-dt-changeset-fixes-v1-2-b5203e3fc22f%40kernel.org
patch subject: [PATCH 2/5] of: dynamic: Refactor action prints to not use "%pOF" inside devtree_lock
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20230802/202308021009.r1Hzc7YD-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230802/202308021009.r1Hzc7YD-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308021009.r1Hzc7YD-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from include/linux/printk.h:564,
from include/asm-generic/bug.h:22,
from arch/loongarch/include/asm/bug.h:59,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/loongarch/include/generated/asm/current.h:1,
from include/linux/mutex.h:14,
from include/linux/kernfs.h:11,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from drivers/of/dynamic.c:12:
drivers/of/dynamic.c: In function 'of_reconfig_notify':
>> include/linux/dynamic_debug.h:219:58: error: expected expression before 'do'
219 | #define __dynamic_func_call_cls(id, cls, fmt, func, ...) do { \
| ^~
include/linux/dynamic_debug.h:246:9: note: in expansion of macro '__dynamic_func_call_cls'
246 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:248:9: note: in expansion of macro '_dynamic_func_call_cls'
248 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:267:9: note: in expansion of macro '_dynamic_func_call'
267 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:579:9: note: in expansion of macro 'dynamic_pr_debug'
579 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/of/dynamic.c:88:13: note: in expansion of macro 'pr_debug'
88 | if (pr_debug("notify "))
| ^~~~~~~~
drivers/of/dynamic.c: In function '__of_changeset_entry_apply':
>> include/linux/dynamic_debug.h:219:58: error: expected expression before 'do'
219 | #define __dynamic_func_call_cls(id, cls, fmt, func, ...) do { \
| ^~
include/linux/dynamic_debug.h:246:9: note: in expansion of macro '__dynamic_func_call_cls'
246 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:248:9: note: in expansion of macro '_dynamic_func_call_cls'
248 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:267:9: note: in expansion of macro '_dynamic_func_call'
267 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:579:9: note: in expansion of macro 'dynamic_pr_debug'
579 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/of/dynamic.c:572:13: note: in expansion of macro 'pr_debug'
572 | if (pr_debug("changeset: applying: cset<%p> ", ce))
| ^~~~~~~~


vim +/do +219 include/linux/dynamic_debug.h

9049fc745300c5 Jason Baron 2016-08-03 207
ca90fca7f7b518 Jim Cromie 2022-09-04 208 /*
ca90fca7f7b518 Jim Cromie 2022-09-04 209 * Factory macros: ($prefix)dynamic_func_call($suffix)
ca90fca7f7b518 Jim Cromie 2022-09-04 210 *
ca90fca7f7b518 Jim Cromie 2022-09-04 211 * Lower layer (with __ prefix) gets the callsite metadata, and wraps
ca90fca7f7b518 Jim Cromie 2022-09-04 212 * the func inside a debug-branch/static-key construct. Upper layer
ca90fca7f7b518 Jim Cromie 2022-09-04 213 * (with _ prefix) does the UNIQUE_ID once, so that lower can ref the
ca90fca7f7b518 Jim Cromie 2022-09-04 214 * name/label multiple times, and tie the elements together.
ca90fca7f7b518 Jim Cromie 2022-09-04 215 * Multiple flavors:
ca90fca7f7b518 Jim Cromie 2022-09-04 216 * (|_cls): adds in _DPRINT_CLASS_DFLT as needed
ca90fca7f7b518 Jim Cromie 2022-09-04 217 * (|_no_desc): former gets callsite descriptor as 1st arg (for prdbgs)
ca90fca7f7b518 Jim Cromie 2022-09-04 218 */
ca90fca7f7b518 Jim Cromie 2022-09-04 @219 #define __dynamic_func_call_cls(id, cls, fmt, func, ...) do { \
ca90fca7f7b518 Jim Cromie 2022-09-04 220 DEFINE_DYNAMIC_DEBUG_METADATA_CLS(id, cls, fmt); \
47cdd64be4832f Rasmus Villemoes 2019-03-07 221 if (DYNAMIC_DEBUG_BRANCH(id)) \
47cdd64be4832f Rasmus Villemoes 2019-03-07 222 func(&id, ##__VA_ARGS__); \
e9d376f0fa66bd Jason Baron 2009-02-05 223 } while (0)
ca90fca7f7b518 Jim Cromie 2022-09-04 224 #define __dynamic_func_call(id, fmt, func, ...) \
ca90fca7f7b518 Jim Cromie 2022-09-04 225 __dynamic_func_call_cls(id, _DPRINTK_CLASS_DFLT, fmt, \
ca90fca7f7b518 Jim Cromie 2022-09-04 226 func, ##__VA_ARGS__)
e9d376f0fa66bd Jason Baron 2009-02-05 227

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