* [morimoto:sound-cleanup-2025-01-16-2 7/23] sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label
@ 2025-01-17 6:13 kernel test robot
2025-01-22 1:19 ` Kuninori Morimoto
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2025-01-17 6:13 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: llvm, oe-kbuild-all
tree: https://github.com/morimoto/linux sound-cleanup-2025-01-16-2
head: e3977d58d39b9fd3d4f04615aa580d4fa702aa0e
commit: 08af04b193d94a1cbda7863d699552bd674dacd2 [7/23] ASoC: audio-graph-card2: use snd_soc_ret()
config: i386-randconfig-013-20250117 (https://download.01.org/0day-ci/archive/20250117/202501171455.ZDrGYjE5-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250117/202501171455.ZDrGYjE5-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501171455.ZDrGYjE5-lkp@intel.com/
All errors (new ones prefixed by >>):
>> sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label
1013 | goto end;
| ^
sound/soc/generic/audio-graph-card2.c:1030:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
1030 | struct device_node *codec1_port __free(device_node) = of_graph_get_remote_port(ep1);
| ^
sound/soc/generic/audio-graph-card2.c:1029:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
1029 | struct device_node *codec0_port __free(device_node) = of_graph_get_remote_port(ep0);
| ^
sound/soc/generic/audio-graph-card2.c:1027:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
1027 | struct device_node *ep1 __free(device_node) = of_graph_get_next_port_endpoint(port1, NULL);
| ^
sound/soc/generic/audio-graph-card2.c:1026:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
1026 | struct device_node *ep0 __free(device_node) = of_graph_get_next_port_endpoint(port0, NULL);
| ^
1 error generated.
vim +1013 sound/soc/generic/audio-graph-card2.c
969
970 int audio_graph2_link_c2c(struct simple_util_priv *priv,
971 struct device_node *lnk,
972 struct link_info *li)
973 {
974 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
975 struct device_node *port0 = lnk;
976 struct device_node *ports __free(device_node) = port_to_ports(port0);
977 struct device_node *port1 __free(device_node) = of_graph_get_next_port(ports, port0);
978 u32 val = 0;
979 int ret = -ENOMEM;
980
981 /*
982 * codec2codec {
983 * ports {
984 * rate = <48000>;
985 * => lnk: port@0 { c2c0_ep: { ... = codec0_ep; }; };
986 * port@1 { c2c1_ep: { ... = codec1_ep; }; };
987 * };
988 * };
989 *
990 * Codec {
991 * ports {
992 * port@0 { codec0_ep: ... }; };
993 * port@1 { codec1_ep: ... }; };
994 * };
995 * };
996 */
997
998 /*
999 * Card2 can use original Codec2Codec settings if DT has.
1000 * It will use default settings if no settings on DT.
1001 * see
1002 * simple_util_init_for_codec2codec()
1003 *
1004 * Add more settings here if needed
1005 */
1006 of_property_read_u32(ports, "rate", &val);
1007 if (val) {
1008 struct device *dev = simple_priv_to_dev(priv);
1009 struct snd_soc_pcm_stream *c2c_conf;
1010
1011 c2c_conf = devm_kzalloc(dev, sizeof(*c2c_conf), GFP_KERNEL);
1012 if (!c2c_conf)
> 1013 goto end;
1014
1015 c2c_conf->formats = SNDRV_PCM_FMTBIT_S32_LE; /* update ME */
1016 c2c_conf->rates = SNDRV_PCM_RATE_8000_384000;
1017 c2c_conf->rate_min =
1018 c2c_conf->rate_max = val;
1019 c2c_conf->channels_min =
1020 c2c_conf->channels_max = 2; /* update ME */
1021
1022 dai_link->c2c_params = c2c_conf;
1023 dai_link->num_c2c_params = 1;
1024 }
1025
1026 struct device_node *ep0 __free(device_node) = of_graph_get_next_port_endpoint(port0, NULL);
1027 struct device_node *ep1 __free(device_node) = of_graph_get_next_port_endpoint(port1, NULL);
1028
1029 struct device_node *codec0_port __free(device_node) = of_graph_get_remote_port(ep0);
1030 struct device_node *codec1_port __free(device_node) = of_graph_get_remote_port(ep1);
1031
1032 /*
1033 * call Codec first.
1034 * see
1035 * __graph_parse_node() :: DAI Naming
1036 */
1037 ret = graph_parse_node(priv, GRAPH_C2C, codec1_port, li, 0);
1038 if (ret < 0)
1039 goto end;
1040
1041 /*
1042 * call CPU, and set DAI Name
1043 */
1044 ret = graph_parse_node(priv, GRAPH_C2C, codec0_port, li, 1);
1045 if (ret < 0)
1046 goto end;
1047
1048 graph_link_init(priv, lnk, codec0_port, codec1_port, li, 1);
1049 end:
1050 return graph_ret(priv, ret);
1051 }
1052 EXPORT_SYMBOL_GPL(audio_graph2_link_c2c);
1053
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [morimoto:sound-cleanup-2025-01-16-2 7/23] sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label
2025-01-17 6:13 [morimoto:sound-cleanup-2025-01-16-2 7/23] sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label kernel test robot
@ 2025-01-22 1:19 ` Kuninori Morimoto
2025-01-22 1:29 ` Nathan Chancellor
0 siblings, 1 reply; 4+ messages in thread
From: Kuninori Morimoto @ 2025-01-22 1:19 UTC (permalink / raw)
To: kernel test robot; +Cc: llvm, oe-kbuild-all
Hi kernel test team
> tree: https://github.com/morimoto/linux sound-cleanup-2025-01-16-2
> head: e3977d58d39b9fd3d4f04615aa580d4fa702aa0e
> commit: 08af04b193d94a1cbda7863d699552bd674dacd2 [7/23] ASoC: audio-graph-card2: use snd_soc_ret()
> config: i386-randconfig-013-20250117 (https://download.01.org/0day-ci/archive/20250117/202501171455.ZDrGYjE5-lkp@intel.com/config)
> compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250117/202501171455.ZDrGYjE5-lkp@intel.com/reproduce)
(snip)
> >> sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label
> 1013 | goto end;
> | ^
> sound/soc/generic/audio-graph-card2.c:1030:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> 1030 | struct device_node *codec1_port __free(device_node) = of_graph_get_remote_port(ep1);
> | ^
I couldn't reproduce this issue on clang v18.1.3 (Ubuntu 24.04.1 LTS).
Is it clang new feature (19.1.3) ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [morimoto:sound-cleanup-2025-01-16-2 7/23] sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label
2025-01-22 1:19 ` Kuninori Morimoto
@ 2025-01-22 1:29 ` Nathan Chancellor
2025-01-22 1:42 ` Kuninori Morimoto
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2025-01-22 1:29 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: kernel test robot, llvm, oe-kbuild-all
Hi Kuninori,
Not a part of the kernel test robot team but I help maintain the clang
build support so I hope I can help.
On Wed, Jan 22, 2025 at 01:19:31AM +0000, Kuninori Morimoto wrote:
> > tree: https://github.com/morimoto/linux sound-cleanup-2025-01-16-2
> > head: e3977d58d39b9fd3d4f04615aa580d4fa702aa0e
> > commit: 08af04b193d94a1cbda7863d699552bd674dacd2 [7/23] ASoC: audio-graph-card2: use snd_soc_ret()
> > config: i386-randconfig-013-20250117 (https://download.01.org/0day-ci/archive/20250117/202501171455.ZDrGYjE5-lkp@intel.com/config)
> > compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250117/202501171455.ZDrGYjE5-lkp@intel.com/reproduce)
> (snip)
> > >> sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label
> > 1013 | goto end;
> > | ^
> > sound/soc/generic/audio-graph-card2.c:1030:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> > 1030 | struct device_node *codec1_port __free(device_node) = of_graph_get_remote_port(ep1);
> > | ^
>
> I couldn't reproduce this issue on clang v18.1.3 (Ubuntu 24.04.1 LTS).
> Is it clang new feature (19.1.3) ?
Odd, this check has been around in clang for some time, I can reproduce
it with clang-14 using the configuration that the test robot used.
$ clang --version | head -1
ClangBuiltLinux clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
$ git switch -d 08af04b193d94a1cbda7863d699552bd674dacd2
HEAD is now at 08af04b193d9 ASoC: audio-graph-card2: use snd_soc_ret()
$ curl -LSso .config https://download.01.org/0day-ci/archive/20250117/202501171455.ZDrGYjE5-lkp@intel.com/config
$ make -skj"$(nproc)" ARCH=i386 LLVM=1 olddefconfig sound/soc/generic/audio-graph-card2.o
sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label
goto end;
^
sound/soc/generic/audio-graph-card2.c:1030:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
struct device_node *codec1_port __free(device_node) = of_graph_get_remote_port(ep1);
^
...
Not sure if it is something specific with this configuration that
triggers it but it should be reproducible using those steps.
Cheers,
Nathan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [morimoto:sound-cleanup-2025-01-16-2 7/23] sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label
2025-01-22 1:29 ` Nathan Chancellor
@ 2025-01-22 1:42 ` Kuninori Morimoto
0 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2025-01-22 1:42 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: kernel test robot, llvm, oe-kbuild-all
Hi Nathan
> Not a part of the kernel test robot team but I help maintain the clang
> build support so I hope I can help.
(snip)
> Odd, this check has been around in clang for some time, I can reproduce
> it with clang-14 using the configuration that the test robot used.
Thank you for helping me !
It was just my environment issue.
I could reproduce it.
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-22 1:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 6:13 [morimoto:sound-cleanup-2025-01-16-2 7/23] sound/soc/generic/audio-graph-card2.c:1013:4: error: cannot jump from this goto statement to its label kernel test robot
2025-01-22 1:19 ` Kuninori Morimoto
2025-01-22 1:29 ` Nathan Chancellor
2025-01-22 1:42 ` Kuninori Morimoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox