From: kernel test robot <lkp@intel.com> To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org Subject: Re: [PATCH v3 08/16] ASoC: rich-graph-card: add Codec2Codec support Date: Sun, 12 Sep 2021 14:43:55 +0800 [thread overview] Message-ID: <202109121456.E5Sy8Umo-lkp@intel.com> (raw) In-Reply-To: <87ilz9usv9.wl-kuninori.morimoto.gx@renesas.com> [-- Attachment #1: Type: text/plain, Size: 6077 bytes --] Hi Kuninori, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on asoc/for-next] [also build test WARNING on sound/for-next v5.14 next-20210910] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Add-Rich-Graph-Card-support/20210910-092924 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: i386-randconfig-r005-20210912 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/75094c7c873a758d2196b5867d930669a15d2e20 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Kuninori-Morimoto/ASoC-Add-Rich-Graph-Card-support/20210910-092924 git checkout 75094c7c873a758d2196b5867d930669a15d2e20 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): >> sound/soc/generic/rich-graph-card.c:879:6: warning: variable 'ep0' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!of_get_property(ports, "rate", &val)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/generic/rich-graph-card.c:920:14: note: uninitialized use occurs here of_node_put(ep0); ^~~ sound/soc/generic/rich-graph-card.c:879:2: note: remove the 'if' if its condition is always false if (!of_get_property(ports, "rate", &val)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/generic/rich-graph-card.c:854:25: note: initialize the variable 'ep0' to silence this warning struct device_node *ep0, *ep1; ^ = NULL >> sound/soc/generic/rich-graph-card.c:879:6: warning: variable 'ep1' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!of_get_property(ports, "rate", &val)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/generic/rich-graph-card.c:921:14: note: uninitialized use occurs here of_node_put(ep1); ^~~ sound/soc/generic/rich-graph-card.c:879:2: note: remove the 'if' if its condition is always false if (!of_get_property(ports, "rate", &val)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/generic/rich-graph-card.c:854:31: note: initialize the variable 'ep1' to silence this warning struct device_node *ep0, *ep1; ^ = NULL sound/soc/generic/rich-graph-card.c:1119:10: error: label at end of compound statement: expected statement default: ^ ; 2 warnings and 1 error generated. vim +879 sound/soc/generic/rich-graph-card.c 844 845 int rich_graph_link_c2c(struct asoc_simple_priv *priv, 846 struct device_node *lnk, 847 struct link_info *li) 848 { 849 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 850 struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); 851 struct snd_soc_pcm_stream *c2c_conf = dai_props->c2c_conf; 852 struct device_node *port0, *port1, *ports; 853 struct device_node *codec0_port, *codec1_port; 854 struct device_node *ep0, *ep1; 855 u32 val; 856 int ret = -EINVAL; 857 858 /* 859 * codec2codec { 860 * ports { 861 * rate = <48000>; 862 * => lnk: port@0 { c2c0_ep: { ... = codec0_ep; }; }; 863 * port@1 { c2c1_ep: { ... = codec1_ep; }; }; 864 * }; 865 * }; 866 * 867 * Codec { 868 * ports { 869 * port@0 { codec0_ep: ... }; }; 870 * port@1 { codec1_ep: ... }; }; 871 * }; 872 * }; 873 */ 874 of_node_get(lnk); 875 port0 = lnk; 876 ports = of_get_parent(port0); 877 port1 = of_get_next_child(ports, lnk); 878 > 879 if (!of_get_property(ports, "rate", &val)) { 880 struct device *dev = simple_priv_to_dev(priv); 881 882 dev_err(dev, "Codec2Codec needs rate settings\n"); 883 goto err; 884 } 885 886 c2c_conf->formats = SNDRV_PCM_FMTBIT_S32_LE; /* update ME */ 887 c2c_conf->rate_min = 888 c2c_conf->rate_max = val; 889 c2c_conf->channels_min = 890 c2c_conf->channels_max = 2; /* update ME */ 891 dai_link->params = c2c_conf; 892 893 ep0 = port_to_endpoint(port0); 894 ep1 = port_to_endpoint(port1); 895 896 codec0_port = of_graph_get_remote_port(ep0); 897 codec1_port = of_graph_get_remote_port(ep1); 898 899 /* 900 * call Codec first. 901 * see 902 * __graph_parse_node() :: DAI Naming 903 */ 904 ret = graph_parse_node(priv, GRAPH_C2C, codec1_port, li, 0); 905 if (ret < 0) 906 goto err; 907 908 /* 909 * call CPU, and set DAI Name 910 */ 911 ret = graph_parse_node(priv, GRAPH_C2C, codec0_port, li, 1); 912 if (ret < 0) 913 goto err; 914 915 graph_link_init(priv, codec0_port, li, 1); 916 err: 917 of_node_put(ports); 918 of_node_put(port0); 919 of_node_put(port1); 920 of_node_put(ep0); 921 of_node_put(ep1); 922 923 return ret; 924 } 925 EXPORT_SYMBOL_GPL(rich_graph_link_c2c); 926 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 40493 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com> To: kbuild-all@lists.01.org Subject: Re: [PATCH v3 08/16] ASoC: rich-graph-card: add Codec2Codec support Date: Sun, 12 Sep 2021 14:43:55 +0800 [thread overview] Message-ID: <202109121456.E5Sy8Umo-lkp@intel.com> (raw) In-Reply-To: <87ilz9usv9.wl-kuninori.morimoto.gx@renesas.com> [-- Attachment #1: Type: text/plain, Size: 6236 bytes --] Hi Kuninori, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on asoc/for-next] [also build test WARNING on sound/for-next v5.14 next-20210910] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Add-Rich-Graph-Card-support/20210910-092924 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: i386-randconfig-r005-20210912 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/75094c7c873a758d2196b5867d930669a15d2e20 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Kuninori-Morimoto/ASoC-Add-Rich-Graph-Card-support/20210910-092924 git checkout 75094c7c873a758d2196b5867d930669a15d2e20 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): >> sound/soc/generic/rich-graph-card.c:879:6: warning: variable 'ep0' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!of_get_property(ports, "rate", &val)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/generic/rich-graph-card.c:920:14: note: uninitialized use occurs here of_node_put(ep0); ^~~ sound/soc/generic/rich-graph-card.c:879:2: note: remove the 'if' if its condition is always false if (!of_get_property(ports, "rate", &val)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/generic/rich-graph-card.c:854:25: note: initialize the variable 'ep0' to silence this warning struct device_node *ep0, *ep1; ^ = NULL >> sound/soc/generic/rich-graph-card.c:879:6: warning: variable 'ep1' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!of_get_property(ports, "rate", &val)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/generic/rich-graph-card.c:921:14: note: uninitialized use occurs here of_node_put(ep1); ^~~ sound/soc/generic/rich-graph-card.c:879:2: note: remove the 'if' if its condition is always false if (!of_get_property(ports, "rate", &val)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/generic/rich-graph-card.c:854:31: note: initialize the variable 'ep1' to silence this warning struct device_node *ep0, *ep1; ^ = NULL sound/soc/generic/rich-graph-card.c:1119:10: error: label at end of compound statement: expected statement default: ^ ; 2 warnings and 1 error generated. vim +879 sound/soc/generic/rich-graph-card.c 844 845 int rich_graph_link_c2c(struct asoc_simple_priv *priv, 846 struct device_node *lnk, 847 struct link_info *li) 848 { 849 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 850 struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); 851 struct snd_soc_pcm_stream *c2c_conf = dai_props->c2c_conf; 852 struct device_node *port0, *port1, *ports; 853 struct device_node *codec0_port, *codec1_port; 854 struct device_node *ep0, *ep1; 855 u32 val; 856 int ret = -EINVAL; 857 858 /* 859 * codec2codec { 860 * ports { 861 * rate = <48000>; 862 * => lnk: port(a)0 { c2c0_ep: { ... = codec0_ep; }; }; 863 * port(a)1 { c2c1_ep: { ... = codec1_ep; }; }; 864 * }; 865 * }; 866 * 867 * Codec { 868 * ports { 869 * port(a)0 { codec0_ep: ... }; }; 870 * port(a)1 { codec1_ep: ... }; }; 871 * }; 872 * }; 873 */ 874 of_node_get(lnk); 875 port0 = lnk; 876 ports = of_get_parent(port0); 877 port1 = of_get_next_child(ports, lnk); 878 > 879 if (!of_get_property(ports, "rate", &val)) { 880 struct device *dev = simple_priv_to_dev(priv); 881 882 dev_err(dev, "Codec2Codec needs rate settings\n"); 883 goto err; 884 } 885 886 c2c_conf->formats = SNDRV_PCM_FMTBIT_S32_LE; /* update ME */ 887 c2c_conf->rate_min = 888 c2c_conf->rate_max = val; 889 c2c_conf->channels_min = 890 c2c_conf->channels_max = 2; /* update ME */ 891 dai_link->params = c2c_conf; 892 893 ep0 = port_to_endpoint(port0); 894 ep1 = port_to_endpoint(port1); 895 896 codec0_port = of_graph_get_remote_port(ep0); 897 codec1_port = of_graph_get_remote_port(ep1); 898 899 /* 900 * call Codec first. 901 * see 902 * __graph_parse_node() :: DAI Naming 903 */ 904 ret = graph_parse_node(priv, GRAPH_C2C, codec1_port, li, 0); 905 if (ret < 0) 906 goto err; 907 908 /* 909 * call CPU, and set DAI Name 910 */ 911 ret = graph_parse_node(priv, GRAPH_C2C, codec0_port, li, 1); 912 if (ret < 0) 913 goto err; 914 915 graph_link_init(priv, codec0_port, li, 1); 916 err: 917 of_node_put(ports); 918 of_node_put(port0); 919 of_node_put(port1); 920 of_node_put(ep0); 921 of_node_put(ep1); 922 923 return ret; 924 } 925 EXPORT_SYMBOL_GPL(rich_graph_link_c2c); 926 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: config.gz --] [-- Type: application/gzip, Size: 40493 bytes --]
next prev parent reply other threads:[~2021-09-12 6:44 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-10 1:20 [PATCH v3 00/16] ASoC: Add Rich Graph Card support Kuninori Morimoto 2021-09-10 1:21 ` [PATCH v3 01/16] ASoC: test-component: add Test Component YAML bindings Kuninori Morimoto 2021-10-01 20:11 ` Mark Brown 2021-09-10 1:21 ` [PATCH v3 02/16] ASoC: test-component: add Test Component for Sound debug/test Kuninori Morimoto 2021-09-10 1:21 ` [PATCH v3 03/16] ASoC: simple-card-utils: add asoc_graph_is_ports0() Kuninori Morimoto 2021-09-10 1:22 ` [PATCH v3 04/16] ASoC: simple-card-utils: add codec2codec support Kuninori Morimoto 2021-09-10 1:22 ` [PATCH v3 05/16] ASoC: add Rich Graph Card driver Kuninori Morimoto 2021-09-12 10:24 ` kernel test robot 2021-09-12 10:24 ` kernel test robot 2021-09-10 1:22 ` [PATCH v3 06/16] ASoC: rich-graph-card: add Multi CPU/Codec support Kuninori Morimoto 2021-09-10 1:22 ` [PATCH v3 07/16] ASoC: rich-graph-card: add DPCM support Kuninori Morimoto 2021-09-10 1:22 ` [PATCH v3 08/16] ASoC: rich-graph-card: add Codec2Codec support Kuninori Morimoto 2021-09-12 6:43 ` kernel test robot [this message] 2021-09-12 6:43 ` kernel test robot 2021-09-10 1:22 ` [PATCH v3 09/16] ASoC: add Rich Graph Card Yaml Document Kuninori Morimoto 2021-10-01 21:06 ` Mark Brown 2021-10-04 1:50 ` Kuninori Morimoto 2021-10-05 17:26 ` Mark Brown 2021-09-10 1:22 ` [PATCH v3 10/16] ASoC: add Rich Graph Card Custom Sample Kuninori Morimoto 2021-09-10 1:22 ` [PATCH v3 11/16] ASoC: rich-graph-card-sample.dtsi: add Sample DT for Normal (Single) Kuninori Morimoto 2021-09-10 1:22 ` [PATCH v3 12/16] ASoC: rich-graph-card-sample.dtsi: add Sample DT for Normal (Nulti) Kuninori Morimoto 2021-09-10 1:22 ` [PATCH v3 13/16] ASoC: rich-graph-card-sample.dtsi: add DPCM sample (Single) Kuninori Morimoto 2021-09-10 1:23 ` [PATCH v3 14/16] ASoC: rich-graph-card-sample.dtsi: add DPCM sample (Multi) Kuninori Morimoto 2021-09-10 1:23 ` [PATCH v3 15/16] ASoC: rich-graph-card-sample.dtsi: add Codec2Codec sample (Single) Kuninori Morimoto 2021-09-10 1:23 ` [PATCH v3 16/16] ASoC: rich-graph-card-sample.dtsi: add Codec2Codec sample (Multi) Kuninori Morimoto 2021-09-29 22:23 ` [PATCH v3 00/16] ASoC: Add Rich Graph Card support Kuninori Morimoto 2021-09-30 12:15 ` Mark Brown 2021-09-30 22:38 ` Kuninori Morimoto 2021-10-01 5:43 ` Péter Ujfalusi 2021-10-01 6:48 ` Kuninori Morimoto 2021-10-01 20:01 ` Mark Brown 2021-10-03 23:52 ` Kuninori Morimoto 2021-10-04 16:54 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=202109121456.E5Sy8Umo-lkp@intel.com \ --to=lkp@intel.com \ --cc=kbuild-all@lists.01.org \ --cc=kuninori.morimoto.gx@renesas.com \ --cc=llvm@lists.linux.dev \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.