tree:
https://github.com/thesofproject/linux pr/3415
head: 482e28f06bef4e2b04194dbca6e71bddb6baa0e0
commit: dd22c425deaa842639786db96212ac90e94cda8d [1/26] Fixup! ASoC: SOF: IPC: Introduce
IPC ops
config: x86_64-sof-customedconfig-sof-defconfig
(
https://download.01.org/0day-ci/archive/20220211/202202110022.6FQCY2cP-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/thesofproject/linux/commit/dd22c425deaa842639786db9621...
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=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash sound/soc/sof/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the thesofproject/pr/3415 HEAD 482e28f06bef4e2b04194dbca6e71bddb6baa0e0 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 ipc_tplg_ops *' from incompatible pointer type 'const struct
sof_ipc_tplg_ops * const' [-Werror=incompatible-pointer-types]
60 | const
struct ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg;
| ^~~~
> sound/soc/sof/topology.c:61:56: error: dereferencing pointer to
incomplete type 'const struct ipc_tplg_ops'
61 | const struct
sof_token_info *token_list = 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_ops *
const' [-Werror=incompatible-pointer-types]
268 | const struct ipc_tplg_ops *tplg_ops = sdev->ipc->ops->tplg;
| ^~~~
sound/soc/sof/topology.c:270:14: error: dereferencing pointer to incomplete 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_ops *
const' [-Werror=incompatible-pointer-types]
459 | const struct ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg;
| ^~~~
sound/soc/sof/topology.c:460:56: error: dereferencing pointer to incomplete type
'const struct ipc_tplg_ops'
460 | const struct sof_token_info *token_list = 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_ops *
const' [-Werror=incompatible-pointer-types]
960 | const struct ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg;
| ^~~~
sound/soc/sof/topology.c:966:18: error: dereferencing pointer to incomplete 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=incompatible-pointer-types]
1091 | const struct ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg;
| ^~~~
sound/soc/sof/topology.c:1092:56: error: dereferencing pointer to incomplete type
'const struct ipc_tplg_ops'
1092 | const struct sof_token_info *token_list = 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=incompatible-pointer-types]
1176 | const struct ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg;
| ^~~~
sound/soc/sof/topology.c:1177:61: error: dereferencing pointer to incomplete type
'const struct ipc_tplg_ops'
1177 | const struct ipc_tplg_widget_ops *widget_ops = 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 = widget_ops[w->id].token_list;
| ^
sound/soc/sof/topology.c:1201:25: error: dereferencing pointer to incomplete 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 = 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 = 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=incompatible-pointer-types]
1326 | const struct ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg;
| ^~~~
sound/soc/sof/topology.c:1327:61: error: dereferencing pointer to incomplete type
'const struct ipc_tplg_ops'
1327 | const struct ipc_tplg_widget_ops *widget_ops = 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 incomplete 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=incompatible-pointer-types]
1542 | const struct ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg;
| ^~~~
sound/soc/sof/topology.c:1543:56: error: dereferencing pointer to incomplete type
'const struct ipc_tplg_ops'
1543 | const struct sof_token_info *token_list = 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=incompatible-pointer-types]
1847 | const struct ipc_tplg_ops *ipc_tplg_ops = sdev->ipc->ops->tplg;
| ^~~~
sound/soc/sof/topology.c:1848:61: error: dereferencing pointer to incomplete type
'const struct ipc_tplg_ops'
1848 | const struct ipc_tplg_widget_ops *widget_ops = 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 incomplete 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 = 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 struct to save
the parsed values
1907d3493e3d89 Ranjani Sridharan 2021-12-02 47 * @token_id: token ID for the token
array to be searched
1907d3493e3d89 Ranjani Sridharan 2021-12-02 48 * @tuples: pointer to the 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: number of times
the same @token_id needs to be parsed i.e. the function
1907d3493e3d89 Ranjani Sridharan 2021-12-02 52 * looks for @token_instance_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 =
snd_soc_component_get_drvdata(scomp);
1907d3493e3d89 Ranjani Sridharan 2021-12-02 @60 const struct ipc_tplg_ops *ipc_tplg_ops
= sdev->ipc->ops->tplg;
1907d3493e3d89 Ranjani Sridharan 2021-12-02 @61 const struct sof_token_info *token_list
= ipc_tplg_ops->token_list;
1907d3493e3d89 Ranjani Sridharan 2021-12-02 62 const struct sof_topology_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, "Invalid
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 = token_list[token_id].tokens;
1907d3493e3d89 Ranjani Sridharan 2021-12-02 75 if (!tokens) {
1907d3493e3d89 Ranjani Sridharan 2021-12-02 76 dev_err(scomp->dev, "Invalid
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 = 0; i <
token_list[token_id].count; i++) {
1907d3493e3d89 Ranjani Sridharan 2021-12-02 81 int offset = 0;
1907d3493e3d89 Ranjani Sridharan 2021-12-02 82 int num_tokens_matched = 0;
1907d3493e3d89 Ranjani Sridharan 2021-12-02 83
1907d3493e3d89 Ranjani Sridharan 2021-12-02 84 for (j = 0; j < num_tuples; j++) {
1907d3493e3d89 Ranjani Sridharan 2021-12-02 85 if (tokens[i].token ==
tuples[j].token) {
1907d3493e3d89 Ranjani Sridharan 2021-12-02 86 switch (tokens[i].type) {
1907d3493e3d89 Ranjani Sridharan 2021-12-02 87 case SND_SOC_TPLG_TUPLE_TYPE_WORD:
1907d3493e3d89 Ranjani Sridharan 2021-12-02 88 {
1907d3493e3d89 Ranjani Sridharan 2021-12-02 89 u32 *val = (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 = tuples[j].value.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_TUPLE_TYPE_SHORT:
1907d3493e3d89 Ranjani Sridharan 2021-12-02 96 case SND_SOC_TPLG_TUPLE_TYPE_BOOL:
1907d3493e3d89 Ranjani Sridharan 2021-12-02 97 {
1907d3493e3d89 Ranjani Sridharan 2021-12-02 98 u16 *val = (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 = (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_TUPLE_TYPE_STRING:
1907d3493e3d89 Ranjani Sridharan 2021-12-02 105 {
1907d3493e3d89 Ranjani Sridharan 2021-12-02 106 if (!tokens[i].get_token) {
1907d3493e3d89 Ranjani Sridharan 2021-12-02 107 dev_err(scomp->dev,
1907d3493e3d89 Ranjani Sridharan 2021-12-02 108 "get_token not defined for
token %d in %s\n",
1907d3493e3d89 Ranjani Sridharan 2021-12-02 109 tokens[i].token,
token_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].offset + 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_matched %
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 object */
1907d3493e3d89 Ranjani Sridharan 2021-12-02 127 offset += object_size;
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 helper function
for processing tuple arrays
:::::: TO: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
:::::: CC: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org