[morimoto:sound-cleanup-2026-07-16 311/311] include/trace/events/asoc.h:30:75: error: invalid use of undefined type 'struct snd_soc_card'
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://github.com/morimoto/linux sound-cleanup-2026-07-16 head: e51d2e02d8d4c974132f00eec9d2215a476084f0 commit: e51d2e02d8d4c974132f00eec9d2215a476084f0 [311/311] ASoC: move struct snd_soc_card/snd_soc_card_driver to soc-card.[hc] config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260717/[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/20260717/[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/trace/define_trace.h:132, from include/trace/events/asoc.h:280, from sound/soc/soc-core.c:43: include/trace/events/asoc.h: In function 'trace_event_get_offsets_snd_soc_dapm': >> include/trace/events/asoc.h:30:75: error: invalid use of undefined type 'struct snd_soc_card' 30 | __string( card_name, snd_soc_dapm_to_card(dapm)->name) | ^~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:59:29: note: in expansion of macro '__dynamic_array' 59 | #define __string(item, src) __dynamic_array(char, item, \ | ^~~~~~~~~~~~~~~ include/linux/fortify-string.h:208:31: note: in expansion of macro '__is_constexpr' 208 | __builtin_choose_expr(__is_constexpr(__builtin_strlen(p)), \ | ^~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:60:21: note: in expansion of macro 'strlen' 60 | strlen(__string_src(src)) + 1) \ | ^~~~~~ include/trace/events/asoc.h:30:17: note: in expansion of macro '__string' 30 | __string( card_name, snd_soc_dapm_to_card(dapm)->name) | ^~~~~~~~ >> include/trace/events/asoc.h:30:75: error: invalid use of undefined type 'struct snd_soc_card' 30 | __string( card_name, snd_soc_dapm_to_card(dapm)->name) | ^~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:59:29: note: in expansion of macro '__dynamic_array' 59 | #define __string(item, src) __dynamic_array(char, item, \ | ^~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:60:21: note: in expansion of macro 'strlen' 60 | strlen(__string_src(src)) + 1) \ | ^~~~~~ include/trace/events/asoc.h:30:17: note: in expansion of macro '__string' 30 | __string( card_name, snd_soc_dapm_to_card(dapm)->name) | ^~~~~~~~ >> include/trace/events/asoc.h:30:75: error: invalid use of undefined type 'struct snd_soc_card' 30 | __string( card_name, snd_soc_dapm_to_card(dapm)->name) | ^~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:59:29: note: in expansion of macro '__dynamic_array' 59 | #define __string(item, src) __dynamic_array(char, item, \ | ^~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:60:21: note: in expansion of macro 'strlen' 60 | strlen(__string_src(src)) + 1) \ | ^~~~~~ include/trace/events/asoc.h:30:17: note: in expansion of macro '__string' 30 | __string( card_name, snd_soc_dapm_to_card(dapm)->name) | ^~~~~~~~ include/linux/fortify-string.h:208:9: error: first argument to '__builtin_choose_expr' not a constant 208 | __builtin_choose_expr(__is_constexpr(__builtin_strlen(p)), \ | ^~~~~~~~~~~~~~~~~~~~~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:59:29: note: in expansion of macro '__dynamic_array' 59 | #define __string(item, src) __dynamic_array(char, item, \ | ^~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:60:21: note: in expansion of macro 'strlen' 60 | strlen(__string_src(src)) + 1) \ | ^~~~~~ include/trace/events/asoc.h:30:17: note: in expansion of macro '__string' 30 | __string( card_name, snd_soc_dapm_to_card(dapm)->name) | ^~~~~~~~ >> include/trace/events/asoc.h:30:75: error: invalid use of undefined type 'struct snd_soc_card' 30 | __string( card_name, snd_soc_dapm_to_card(dapm)->name) | ^~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/events/asoc.h:30:17: note: in expansion of macro '__string' 30 | __string( card_name, snd_soc_dapm_to_card(dapm)->name) | ^~~~~~~~ include/trace/events/asoc.h:31:114: error: invalid use of undefined type 'struct snd_soc_component' 31 | __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") | ^~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:59:29: note: in expansion of macro '__dynamic_array' 59 | #define __string(item, src) __dynamic_array(char, item, \ | ^~~~~~~~~~~~~~~ include/linux/fortify-string.h:208:31: note: in expansion of macro '__is_constexpr' 208 | __builtin_choose_expr(__is_constexpr(__builtin_strlen(p)), \ | ^~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:60:21: note: in expansion of macro 'strlen' 60 | strlen(__string_src(src)) + 1) \ | ^~~~~~ include/trace/events/asoc.h:31:17: note: in expansion of macro '__string' 31 | __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") | ^~~~~~~~ include/trace/events/asoc.h:31:114: error: invalid use of undefined type 'struct snd_soc_component' 31 | __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") | ^~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:59:29: note: in expansion of macro '__dynamic_array' 59 | #define __string(item, src) __dynamic_array(char, item, \ | ^~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:60:21: note: in expansion of macro 'strlen' 60 | strlen(__string_src(src)) + 1) \ | ^~~~~~ include/trace/events/asoc.h:31:17: note: in expansion of macro '__string' 31 | __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") | ^~~~~~~~ include/trace/events/asoc.h:31:114: error: invalid use of undefined type 'struct snd_soc_component' 31 | __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") | ^~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:59:29: note: in expansion of macro '__dynamic_array' 59 | #define __string(item, src) __dynamic_array(char, item, \ | ^~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:60:21: note: in expansion of macro 'strlen' 60 | strlen(__string_src(src)) + 1) \ | ^~~~~~ include/trace/events/asoc.h:31:17: note: in expansion of macro '__string' 31 | __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") | ^~~~~~~~ include/linux/fortify-string.h:208:9: error: first argument to '__builtin_choose_expr' not a constant 208 | __builtin_choose_expr(__is_constexpr(__builtin_strlen(p)), \ | ^~~~~~~~~~~~~~~~~~~~~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:59:29: note: in expansion of macro '__dynamic_array' 59 | #define __string(item, src) __dynamic_array(char, item, \ | ^~~~~~~~~~~~~~~ include/trace/stages/stage5_get_offsets.h:60:21: note: in expansion of macro 'strlen' 60 | strlen(__string_src(src)) + 1) \ | ^~~~~~ include/trace/events/asoc.h:31:17: note: in expansion of macro '__string' 31 | __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") | ^~~~~~~~ include/trace/events/asoc.h:31:114: error: invalid use of undefined type 'struct snd_soc_component' 31 | __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") | ^~ include/trace/trace_events.h:285:9: note: in definition of macro 'DECLARE_EVENT_CLASS' 285 | tstruct; \ | ^~~~~~~ include/trace/events/asoc.h:29:9: note: in expansion of macro 'TP_STRUCT__entry' 29 | TP_STRUCT__entry( | ^~~~~~~~~~~~~~~~ include/trace/events/asoc.h:31:17: note: in expansion of macro '__string' 31 | __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") | ^~~~~~~~ include/trace/events/asoc.h: In function 'trace_event_get_offsets_snd_soc_dapm_basic': include/trace/events/asoc.h:68:45: error: invalid use of undefined type 'struct snd_soc_card' -- sound/soc/sof/ipc4-topology.c: In function 'sof_ipc4_update_card_components_string': >> sound/soc/sof/ipc4-topology.c:613:17: error: invalid use of undefined type 'struct snd_soc_card' 613 | if (card->components) { | ^~ sound/soc/sof/ipc4-topology.c:614:39: error: invalid use of undefined type 'struct snd_soc_card' 614 | const char *tmp = card->components; | ^~ sound/soc/sof/ipc4-topology.c:616:32: error: invalid use of undefined type 'struct snd_soc_card' 616 | if (strstr(card->components, pt_marker)) | ^~ sound/soc/sof/ipc4-topology.c:617:78: error: invalid use of undefined type 'struct snd_soc_card' 617 | snd_soc_card_set_components(card, devm_kasprintf(card->dev, GFP_KERNEL, | ^~ sound/soc/sof/ipc4-topology.c:622:78: error: invalid use of undefined type 'struct snd_soc_card' 622 | snd_soc_card_set_components(card, devm_kasprintf(card->dev, GFP_KERNEL, | ^~ sound/soc/sof/ipc4-topology.c:630:70: error: invalid use of undefined type 'struct snd_soc_card' 630 | snd_soc_card_set_components(card, devm_kasprintf(card->dev, GFP_KERNEL, | ^~ -- sound/soc/amd/vangogh/acp5x-mach.c: In function 'acp5x_probe': sound/soc/amd/vangogh/acp5x-mach.c:479:9: error: implicit declaration of function 'snd_soc_card_set_drvdata'; did you mean 'snd_soc_card_set_priv'? [-Wimplicit-function-declaration] 479 | snd_soc_card_set_drvdata(card, machine); | ^~~~~~~~~~~~~~~~~~~~~~~~ | snd_soc_card_set_priv >> sound/soc/amd/vangogh/acp5x-mach.c:483:83: error: invalid use of undefined type 'struct snd_soc_card' 483 | return dev_err_probe(dev, ret, "Register card (%s) failed\n", card->name); | ^~ -- sound/soc/amd/yc/acp6x-mach.c: In function 'acp6x_probe': >> sound/soc/amd/yc/acp6x-mach.c:878:37: error: invalid use of undefined type 'struct snd_soc_card' 878 | card->name); | ^~ -- sound/soc/intel/boards/sof_sdw.c: In function 'create_sdw_dailink': >> sound/soc/intel/boards/sof_sdw.c:889:34: error: invalid use of undefined type 'struct snd_soc_card' 889 | struct device *dev = card->dev; | ^~ sound/soc/intel/boards/sof_sdw.c:890:63: error: invalid use of undefined type 'struct snd_soc_card' 890 | struct snd_soc_acpi_mach *mach = dev_get_platdata(card->dev); | ^~ sound/soc/intel/boards/sof_sdw.c:891:43: error: implicit declaration of function 'snd_soc_card_get_drvdata'; did you mean 'snd_soc_card_set_priv'? [-Wimplicit-function-declaration] 891 | struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); | ^~~~~~~~~~~~~~~~~~~~~~~~ | snd_soc_card_set_priv sound/soc/intel/boards/sof_sdw.c:891:43: error: initialization of 'struct asoc_sdw_mc_private *' from 'int' makes pointer from integer without a cast [-Wint-conversion] sound/soc/intel/boards/sof_sdw.c: In function 'create_sdw_dailinks': sound/soc/intel/boards/sof_sdw.c:1037:43: error: initialization of 'struct asoc_sdw_mc_private *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 1037 | struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); | ^~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/intel/boards/sof_sdw.c: In function 'create_ssp_dailinks': sound/soc/intel/boards/sof_sdw.c:1068:34: error: invalid use of undefined type 'struct snd_soc_card' 1068 | struct device *dev = card->dev; | ^~ sound/soc/intel/boards/sof_sdw.c: In function 'create_dmic_dailinks': sound/soc/intel/boards/sof_sdw.c:1104:34: error: invalid use of undefined type 'struct snd_soc_card' 1104 | struct device *dev = card->dev; | ^~ sound/soc/intel/boards/sof_sdw.c: In function 'create_hdmi_dailinks': sound/soc/intel/boards/sof_sdw.c:1135:34: error: invalid use of undefined type 'struct snd_soc_card' 1135 | struct device *dev = card->dev; | ^~ sound/soc/intel/boards/sof_sdw.c:1136:43: error: initialization of 'struct asoc_sdw_mc_private *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 1136 | struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); | ^~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/intel/boards/sof_sdw.c: In function 'create_bt_dailinks': sound/soc/intel/boards/sof_sdw.c:1177:34: error: invalid use of undefined type 'struct snd_soc_card' 1177 | struct device *dev = card->dev; | ^~ sound/soc/intel/boards/sof_sdw.c: In function 'create_echoref_dailink': sound/soc/intel/boards/sof_sdw.c:1209:34: error: invalid use of undefined type 'struct snd_soc_card' 1209 | struct device *dev = card->dev; | ^~ sound/soc/intel/boards/sof_sdw.c: In function 'sof_card_dai_links_create': sound/soc/intel/boards/sof_sdw.c:1237:34: error: invalid use of undefined type 'struct snd_soc_card' 1237 | struct device *dev = card->dev; | ^~ sound/soc/intel/boards/sof_sdw.c:1238:63: error: invalid use of undefined type 'struct snd_soc_card' 1238 | struct snd_soc_acpi_mach *mach = dev_get_platdata(card->dev); | ^~ sound/soc/intel/boards/sof_sdw.c:1240:43: error: initialization of 'struct asoc_sdw_mc_private *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 1240 | struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/device.h:15, from include/linux/acpi.h:15, from sound/soc/intel/boards/sof_sdw.c:8: sound/soc/intel/boards/sof_sdw.c: In function 'mc_probe': sound/soc/intel/boards/sof_sdw.c:1486:30: error: invalid use of undefined type 'struct snd_soc_card' 1486 | dev_info(card->dev, "Overriding quirk 0x%lx => 0x%x\n", | ^~ include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ sound/soc/intel/boards/sof_sdw.c:1486:17: note: in expansion of macro 'dev_info' 1486 | dev_info(card->dev, "Overriding quirk 0x%lx => 0x%x\n", | ^~~~~~~~ sound/soc/intel/boards/sof_sdw.c:1491:24: error: invalid use of undefined type 'struct snd_soc_card' 1491 | log_quirks(card->dev); | ^~ sound/soc/intel/boards/sof_sdw.c:1510:41: error: invalid use of undefined type 'struct snd_soc_card' 1510 | components = devm_kasprintf(card->dev, GFP_KERNEL, | ^~ sound/soc/intel/boards/sof_sdw.c:1518:49: error: invalid use of undefined type 'struct snd_soc_card' 1518 | components = devm_kasprintf(card->dev, GFP_KERNEL, | ^~ sound/soc/intel/boards/sof_sdw.c:1531:35: error: invalid use of undefined type 'struct snd_soc_card' 1531 | dev_err_probe(card->dev, ret, "snd_soc_card_register() failed %d\n", ret); | ^~ -- In file included from include/linux/device.h:15, from sound/soc/sdw_utils/soc_sdw_maxim.c:9: sound/soc/sdw_utils/soc_sdw_maxim.c: In function 'asoc_sdw_maxim_init': >> sound/soc/sdw_utils/soc_sdw_maxim.c:137:29: error: invalid use of undefined type 'struct snd_soc_card' 137 | dev_err(card->dev, "Invalid maxim_part_id %#x\n", maxim_part_id); | ^~ include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~ sound/soc/sdw_utils/soc_sdw_maxim.c:137:17: note: in expansion of macro 'dev_err' 137 | dev_err(card->dev, "Invalid maxim_part_id %#x\n", maxim_part_id); | ^~~~~~~ vim +30 include/trace/events/asoc.h a8b1d34f3ee1bc Mark Brown 2010-11-03 24 6ef46a69ec32fe Luca Ceresoli 2024-03-06 25 TP_PROTO(struct snd_soc_dapm_context *dapm, int val), 84e909303dbd3c Mark Brown 2010-11-04 26 6ef46a69ec32fe Luca Ceresoli 2024-03-06 27 TP_ARGS(dapm, val), 84e909303dbd3c Mark Brown 2010-11-04 28 84e909303dbd3c Mark Brown 2010-11-04 29 TP_STRUCT__entry( 8855eb7d29400f Kuninori Morimoto 2025-11-11 @30 __string( card_name, snd_soc_dapm_to_card(dapm)->name) 8855eb7d29400f Kuninori Morimoto 2025-11-11 31 __string( comp_name, snd_soc_dapm_to_component(dapm) ? snd_soc_dapm_to_component(dapm)->name : "(none)") 84e909303dbd3c Mark Brown 2010-11-04 32 __field( int, val) 84e909303dbd3c Mark Brown 2010-11-04 33 ), 84e909303dbd3c Mark Brown 2010-11-04 34 84e909303dbd3c Mark Brown 2010-11-04 35 TP_fast_assign( 2c92ca849fcc6e Steven Rostedt (Google 2024-05-16 36) __assign_str(card_name); 2c92ca849fcc6e Steven Rostedt (Google 2024-05-16 37) __assign_str(comp_name); 84e909303dbd3c Mark Brown 2010-11-04 38 __entry->val = val; 84e909303dbd3c Mark Brown 2010-11-04 39 ), 84e909303dbd3c Mark Brown 2010-11-04 40 6ef46a69ec32fe Luca Ceresoli 2024-03-06 41 TP_printk("card=%s component=%s val=%d", 6ef46a69ec32fe Luca Ceresoli 2024-03-06 42 __get_str(card_name), __get_str(comp_name), (int)__entry->val) 84e909303dbd3c Mark Brown 2010-11-04 43 ); 84e909303dbd3c Mark Brown 2010-11-04 44 :::::: The code at line 30 was first introduced by commit :::::: 8855eb7d29400fb7b2882da33725db2801c410e4 ASoC: asoc.h: convert to snd_soc_dapm_xxx() :::::: TO: Kuninori Morimoto <[email protected]> :::::: CC: Mark Brown <[email protected]> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki