From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============9197816852300481155==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [thesofproject:pr/3415 1/26] sound/soc/sof/topology.c:60:44: error: initialization of 'const struct ipc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_ops * const' Date: Fri, 11 Feb 2022 01:02:15 +0800 Message-ID: <202202110022.6FQCY2cP-lkp@intel.com> List-Id: --===============9197816852300481155== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://github.com/thesofproject/linux pr/3415 head: 482e28f06bef4e2b04194dbca6e71bddb6baa0e0 commit: dd22c425deaa842639786db96212ac90e94cda8d [1/26] Fixup! ASoC: SOF: I= PC: Introduce IPC ops config: x86_64-sof-customedconfig-sof-defconfig (https://download.01.org/0d= ay-ci/archive/20220211/202202110022.6FQCY2cP-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=3D1 build): # https://github.com/thesofproject/linux/commit/dd22c425deaa8426397= 86db96212ac90e94cda8d git remote add thesofproject https://github.com/thesofproject/linux git fetch --no-tags thesofproject pr/3415 git checkout dd22c425deaa842639786db96212ac90e94cda8d # save the config file to linux build tree mkdir build_dir make W=3D1 O=3Dbuild_dir ARCH=3Dx86_64 SHELL=3D/bin/bash sound/soc/= sof/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Note: the thesofproject/pr/3415 HEAD 482e28f06bef4e2b04194dbca6e71bddb6baa0= e0 builds fine. It only hurts bisectability. All errors (new ones prefixed by >>): sound/soc/sof/topology.c: In function 'sof_update_ipc_object': >> sound/soc/sof/topology.c:60:44: error: initialization of 'const struct i= pc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_op= s * const' [-Werror=3Dincompatible-pointer-types] 60 | const struct ipc_tplg_ops *ipc_tplg_ops =3D sdev->ipc->ops->tpl= g; | ^~~~ >> sound/soc/sof/topology.c:61:56: error: dereferencing pointer to incomple= te type 'const struct ipc_tplg_ops' 61 | const struct sof_token_info *token_list =3D ipc_tplg_ops->token= _list; | ^~ sound/soc/sof/topology.c: In function 'set_up_volume_table': sound/soc/sof/topology.c:268:40: error: initialization of 'const struct = ipc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_o= ps * const' [-Werror=3Dincompatible-pointer-types] 268 | const struct ipc_tplg_ops *tplg_ops =3D sdev->ipc->ops->tplg; | ^~~~ sound/soc/sof/topology.c:270:14: error: dereferencing pointer to incompl= ete type 'const struct ipc_tplg_ops' 270 | if (tplg_ops->control->set_up_volume_table) | ^~ sound/soc/sof/topology.c: In function 'sof_copy_tuples': sound/soc/sof/topology.c:459:44: error: initialization of 'const struct = ipc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_o= ps * const' [-Werror=3Dincompatible-pointer-types] 459 | const struct ipc_tplg_ops *ipc_tplg_ops =3D sdev->ipc->ops->tpl= g; | ^~~~ sound/soc/sof/topology.c:460:56: error: dereferencing pointer to incompl= ete type 'const struct ipc_tplg_ops' 460 | const struct sof_token_info *token_list =3D ipc_tplg_ops->token= _list; | ^~ sound/soc/sof/topology.c: In function 'sof_control_unload': sound/soc/sof/topology.c:960:44: error: initialization of 'const struct = ipc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_o= ps * const' [-Werror=3Dincompatible-pointer-types] 960 | const struct ipc_tplg_ops *ipc_tplg_ops =3D sdev->ipc->ops->tpl= g; | ^~~~ sound/soc/sof/topology.c:966:18: error: dereferencing pointer to incompl= ete type 'const struct ipc_tplg_ops' 966 | if (ipc_tplg_ops->control_free) { | ^~ sound/soc/sof/topology.c: In function 'sof_widget_parse_tokens': sound/soc/sof/topology.c:1091:44: error: initialization of 'const struct= ipc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_= ops * const' [-Werror=3Dincompatible-pointer-types] 1091 | const struct ipc_tplg_ops *ipc_tplg_ops =3D sdev->ipc->ops->tpl= g; | ^~~~ sound/soc/sof/topology.c:1092:56: error: dereferencing pointer to incomp= lete type 'const struct ipc_tplg_ops' 1092 | const struct sof_token_info *token_list =3D ipc_tplg_ops->token= _list; | ^~ sound/soc/sof/topology.c: In function 'sof_widget_ready': sound/soc/sof/topology.c:1176:44: error: initialization of 'const struct= ipc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_= ops * const' [-Werror=3Dincompatible-pointer-types] 1176 | const struct ipc_tplg_ops *ipc_tplg_ops =3D sdev->ipc->ops->tpl= g; | ^~~~ sound/soc/sof/topology.c:1177:61: error: dereferencing pointer to incomp= lete type 'const struct ipc_tplg_ops' 1177 | const struct ipc_tplg_widget_ops *widget_ops =3D ipc_tplg_ops->= widget; | ^~ sound/soc/sof/topology.c:1201:25: error: invalid use of undefined type '= struct ipc_tplg_widget_ops' 1201 | token_list =3D widget_ops[w->id].token_list; | ^ sound/soc/sof/topology.c:1201:25: error: dereferencing pointer to incomp= lete type 'const struct ipc_tplg_widget_ops' sound/soc/sof/topology.c:1202:30: error: invalid use of undefined type '= struct ipc_tplg_widget_ops' 1202 | token_list_size =3D widget_ops[w->id].token_list_size; | ^ sound/soc/sof/topology.c:1286:17: error: invalid use of undefined type '= struct ipc_tplg_widget_ops' 1286 | if (widget_ops[w->id].bind_event) { | ^ sound/soc/sof/topology.c:1287:20: error: invalid use of undefined type '= struct ipc_tplg_widget_ops' 1287 | ret =3D widget_ops[w->id].bind_event(scomp, swidget, | ^ sound/soc/sof/topology.c: In function 'sof_widget_unload': sound/soc/sof/topology.c:1326:44: error: initialization of 'const struct= ipc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_= ops * const' [-Werror=3Dincompatible-pointer-types] 1326 | const struct ipc_tplg_ops *ipc_tplg_ops =3D sdev->ipc->ops->tpl= g; | ^~~~ sound/soc/sof/topology.c:1327:61: error: dereferencing pointer to incomp= lete type 'const struct ipc_tplg_ops' 1327 | const struct ipc_tplg_widget_ops *widget_ops =3D ipc_tplg_ops->= widget; | ^~ sound/soc/sof/topology.c:1384:16: error: invalid use of undefined type '= struct ipc_tplg_widget_ops' 1384 | if (widget_ops[swidget->id].ipc_free) | ^ sound/soc/sof/topology.c:1384:16: error: dereferencing pointer to incomp= lete type 'const struct ipc_tplg_widget_ops' sound/soc/sof/topology.c:1385:13: error: invalid use of undefined type '= struct ipc_tplg_widget_ops' 1385 | widget_ops[swidget->id].ipc_free(swidget); | ^ sound/soc/sof/topology.c: In function 'sof_link_load': sound/soc/sof/topology.c:1542:44: error: initialization of 'const struct= ipc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_= ops * const' [-Werror=3Dincompatible-pointer-types] 1542 | const struct ipc_tplg_ops *ipc_tplg_ops =3D sdev->ipc->ops->tpl= g; | ^~~~ sound/soc/sof/topology.c:1543:56: error: dereferencing pointer to incomp= lete type 'const struct ipc_tplg_ops' 1543 | const struct sof_token_info *token_list =3D ipc_tplg_ops->token= _list; | ^~ sound/soc/sof/topology.c: In function 'sof_complete': sound/soc/sof/topology.c:1847:44: error: initialization of 'const struct= ipc_tplg_ops *' from incompatible pointer type 'const struct sof_ipc_tplg_= ops * const' [-Werror=3Dincompatible-pointer-types] 1847 | const struct ipc_tplg_ops *ipc_tplg_ops =3D sdev->ipc->ops->tpl= g; | ^~~~ sound/soc/sof/topology.c:1848:61: error: dereferencing pointer to incomp= lete type 'const struct ipc_tplg_ops' 1848 | const struct ipc_tplg_widget_ops *widget_ops =3D ipc_tplg_ops->= widget; | ^~ sound/soc/sof/topology.c:1869:17: error: invalid use of undefined type '= struct ipc_tplg_widget_ops' 1869 | if (widget_ops[swidget->id].ipc_setup) { | ^ sound/soc/sof/topology.c:1869:17: error: dereferencing pointer to incomp= lete type 'const struct ipc_tplg_widget_ops' sound/soc/sof/topology.c:1870:20: error: invalid use of undefined type '= struct ipc_tplg_widget_ops' 1870 | ret =3D widget_ops[swidget->id].ipc_setup(swidget); | ^ cc1: some warnings being treated as errors vim +60 sound/soc/sof/topology.c 311ce4fe7637d9 Liam Girdwood 2019-04-12 41 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 42 /** 1907d3493e3d89 Ranjani Sridharan 2021-12-02 43 * sof_update_ipc_object = - Parse multiple sets of tokens within the token array associated with the 1907d3493e3d89 Ranjani Sridharan 2021-12-02 44 * token ID. 1907d3493e3d89 Ranjani Sridharan 2021-12-02 45 * @scomp: pointer to SOC= component 1907d3493e3d89 Ranjani Sridharan 2021-12-02 46 * @object: target IPC st= ruct to save the parsed values 1907d3493e3d89 Ranjani Sridharan 2021-12-02 47 * @token_id: token ID fo= r the token array to be searched 1907d3493e3d89 Ranjani Sridharan 2021-12-02 48 * @tuples: pointer to th= e tuples array 1907d3493e3d89 Ranjani Sridharan 2021-12-02 49 * @num_tuples: number of= tuples in the tuples array 1907d3493e3d89 Ranjani Sridharan 2021-12-02 50 * @object_size: size of = the object 1907d3493e3d89 Ranjani Sridharan 2021-12-02 51 * @token_instance_num: n= umber of times the same @token_id needs to be parsed i.e. the function 1907d3493e3d89 Ranjani Sridharan 2021-12-02 52 * looks for @token_ins= tance_num of each token in the token array associated 1907d3493e3d89 Ranjani Sridharan 2021-12-02 53 * with the @token_id 1907d3493e3d89 Ranjani Sridharan 2021-12-02 54 */ 1907d3493e3d89 Ranjani Sridharan 2021-12-02 55 int sof_update_ipc_object= (struct snd_soc_component *scomp, void *object, enum sof_tokens token_id, 1907d3493e3d89 Ranjani Sridharan 2021-12-02 56 struct snd_sof_tuple= *tuples, int num_tuples, 1907d3493e3d89 Ranjani Sridharan 2021-12-02 57 size_t object_size, = int token_instance_num) 1907d3493e3d89 Ranjani Sridharan 2021-12-02 58 { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 59 struct snd_sof_dev *sdev= =3D snd_soc_component_get_drvdata(scomp); 1907d3493e3d89 Ranjani Sridharan 2021-12-02 @60 const struct ipc_tplg_op= s *ipc_tplg_ops =3D sdev->ipc->ops->tplg; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 @61 const struct sof_token_i= nfo *token_list =3D ipc_tplg_ops->token_list; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 62 const struct sof_topolog= y_token *tokens; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 63 int i, j; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 64 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 65 if (token_list[token_id]= .count < 0) { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 66 dev_err(scomp->dev, "In= valid token count for token ID: %d\n", token_id); 1907d3493e3d89 Ranjani Sridharan 2021-12-02 67 return -EINVAL; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 68 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 69 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 70 /* No tokens to match */ 1907d3493e3d89 Ranjani Sridharan 2021-12-02 71 if (!token_list[token_id= ].count) 1907d3493e3d89 Ranjani Sridharan 2021-12-02 72 return 0; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 73 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 74 tokens =3D token_list[to= ken_id].tokens; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 75 if (!tokens) { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 76 dev_err(scomp->dev, "In= valid tokens for token id: %d\n", token_id); 1907d3493e3d89 Ranjani Sridharan 2021-12-02 77 return -EINVAL; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 78 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 79 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 80 for (i =3D 0; i < token_= list[token_id].count; i++) { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 81 int offset =3D 0; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 82 int num_tokens_matched = =3D 0; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 83 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 84 for (j =3D 0; j < num_t= uples; j++) { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 85 if (tokens[i].token = =3D=3D tuples[j].token) { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 86 switch (tokens[i].typ= e) { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 87 case SND_SOC_TPLG_TUP= LE_TYPE_WORD: 1907d3493e3d89 Ranjani Sridharan 2021-12-02 88 { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 89 u32 *val =3D (u32 *)= ((u8 *)object + tokens[i].offset + 1907d3493e3d89 Ranjani Sridharan 2021-12-02 90 offset); 1907d3493e3d89 Ranjani Sridharan 2021-12-02 91 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 92 *val =3D tuples[j].v= alue.v; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 93 break; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 94 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 95 case SND_SOC_TPLG_TUP= LE_TYPE_SHORT: 1907d3493e3d89 Ranjani Sridharan 2021-12-02 96 case SND_SOC_TPLG_TUP= LE_TYPE_BOOL: 1907d3493e3d89 Ranjani Sridharan 2021-12-02 97 { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 98 u16 *val =3D (u16 *)= ((u8 *)object + tokens[i].offset + 1907d3493e3d89 Ranjani Sridharan 2021-12-02 99 offset); 1907d3493e3d89 Ranjani Sridharan 2021-12-02 100 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 101 *val =3D (u16)tuples= [j].value.v; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 102 break; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 103 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 104 case SND_SOC_TPLG_TUP= LE_TYPE_STRING: 1907d3493e3d89 Ranjani Sridharan 2021-12-02 105 { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 106 if (!tokens[i].get_t= oken) { 1907d3493e3d89 Ranjani Sridharan 2021-12-02 107 dev_err(scomp->dev, 1907d3493e3d89 Ranjani Sridharan 2021-12-02 108 "get_token not def= ined for token %d in %s\n", 1907d3493e3d89 Ranjani Sridharan 2021-12-02 109 tokens[i].token, t= oken_list[token_id].name); 1907d3493e3d89 Ranjani Sridharan 2021-12-02 110 return -EINVAL; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 111 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 112 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 113 tokens[i].get_token(= (void *)tuples[j].value.s, object, 1907d3493e3d89 Ranjani Sridharan 2021-12-02 114 tokens[i].offs= et + offset); 1907d3493e3d89 Ranjani Sridharan 2021-12-02 115 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 116 default: 1907d3493e3d89 Ranjani Sridharan 2021-12-02 117 break; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 118 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 119 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 120 num_tokens_matched++; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 121 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 122 /* found all required= sets of current token. Move to the next one */ 1907d3493e3d89 Ranjani Sridharan 2021-12-02 123 if (!(num_tokens_matc= hed % token_instance_num)) 1907d3493e3d89 Ranjani Sridharan 2021-12-02 124 break; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 125 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 126 /* move to the next o= bject */ 1907d3493e3d89 Ranjani Sridharan 2021-12-02 127 offset +=3D object_si= ze; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 128 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 129 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 130 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 131 = 1907d3493e3d89 Ranjani Sridharan 2021-12-02 132 return 0; 1907d3493e3d89 Ranjani Sridharan 2021-12-02 133 } 1907d3493e3d89 Ranjani Sridharan 2021-12-02 134 = :::::: The code at line 60 was first introduced by commit :::::: 1907d3493e3d89ee9a66b2b3f33b8a9104f15826 ASoC: SOF: topology: Add he= lper function for processing tuple arrays :::::: TO: Ranjani Sridharan :::::: CC: Pierre-Louis Bossart --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============9197816852300481155==--