* [plbossart-sound:fix/skl-kbl-support 11/23] sound/soc/sof/ipc.c:600:35: error: initialization of 'const struct sof_ipc_ops *' from incompatible pointer type 'const struct ipc_ops *'
@ 2022-02-04 1:30 kernel test robot
2022-02-04 8:49 ` Péter Ujfalusi
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-02-04 1:30 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5228 bytes --]
tree: https://github.com/plbossart/sound fix/skl-kbl-support
head: 7789f3e98c686f9300a556d67a210306407d2841
commit: d399e2a55e99980b016e8695912eb61c8f2ac576 [11/23] ASoC: SOF: ipc: Switch over to use the tx_msg and set_get_data ops
config: x86_64-sof-customedconfig-sof-defconfig (https://download.01.org/0day-ci/archive/20220204/202202040412.6FkCqceQ-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/plbossart/sound/commit/d399e2a55e99980b016e8695912eb61c8f2ac576
git remote add plbossart-sound https://github.com/plbossart/sound
git fetch --no-tags plbossart-sound fix/skl-kbl-support
git checkout d399e2a55e99980b016e8695912eb61c8f2ac576
# 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@intel.com>
Note: the plbossart-sound/fix/skl-kbl-support HEAD 7789f3e98c686f9300a556d67a210306407d2841 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
sound/soc/sof/ipc.c: In function 'snd_sof_ipc_set_get_comp_data':
>> sound/soc/sof/ipc.c:600:35: error: initialization of 'const struct sof_ipc_ops *' from incompatible pointer type 'const struct ipc_ops *' [-Werror=incompatible-pointer-types]
600 | const struct sof_ipc_ops *iops = sdev->ipc->ops;
| ^~~~
>> sound/soc/sof/ipc.c:671:13: error: dereferencing pointer to incomplete type 'const struct sof_ipc_ops'
671 | return iops->set_get_data(sdev, cdata, cdata->rhdr.hdr.size, set);
| ^~
sound/soc/sof/ipc.c:672:1: error: control reaches end of non-void function [-Werror=return-type]
672 | }
| ^
cc1: some warnings being treated as errors
vim +600 sound/soc/sof/ipc.c
591
592 /*
593 * IPC get()/set() for kcontrols.
594 */
595 int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, bool set)
596 {
597 struct snd_soc_component *scomp = scontrol->scomp;
598 struct sof_ipc_ctrl_data *cdata = scontrol->ipc_control_data;
599 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
> 600 const struct sof_ipc_ops *iops = sdev->ipc->ops;
601 enum sof_ipc_ctrl_type ctrl_type;
602 struct snd_sof_widget *swidget;
603 bool widget_found = false;
604 u32 ipc_cmd, msg_bytes;
605
606 list_for_each_entry(swidget, &sdev->widget_list, list) {
607 if (swidget->comp_id == scontrol->comp_id) {
608 widget_found = true;
609 break;
610 }
611 }
612
613 if (!widget_found) {
614 dev_err(sdev->dev, "%s: can't find widget with id %d\n", __func__,
615 scontrol->comp_id);
616 return -EINVAL;
617 }
618
619 /*
620 * Volatile controls should always be part of static pipelines and the widget use_count
621 * would always be > 0 in this case. For the others, just return the cached value if the
622 * widget is not set up.
623 */
624 if (!swidget->use_count)
625 return 0;
626
627 /*
628 * Select the IPC cmd and the ctrl_type based on the ctrl_cmd and the
629 * direction
630 * Note: SOF_CTRL_TYPE_VALUE_COMP_* is not used and supported currently
631 * for ctrl_type
632 */
633 if (cdata->cmd == SOF_CTRL_CMD_BINARY) {
634 ipc_cmd = set ? SOF_IPC_COMP_SET_DATA : SOF_IPC_COMP_GET_DATA;
635 ctrl_type = set ? SOF_CTRL_TYPE_DATA_SET : SOF_CTRL_TYPE_DATA_GET;
636 } else {
637 ipc_cmd = set ? SOF_IPC_COMP_SET_VALUE : SOF_IPC_COMP_GET_VALUE;
638 ctrl_type = set ? SOF_CTRL_TYPE_VALUE_CHAN_SET : SOF_CTRL_TYPE_VALUE_CHAN_GET;
639 }
640
641 cdata->rhdr.hdr.cmd = SOF_IPC_GLB_COMP_MSG | ipc_cmd;
642 cdata->type = ctrl_type;
643 cdata->comp_id = scontrol->comp_id;
644 cdata->msg_index = 0;
645
646 /* calculate header and data size */
647 switch (cdata->type) {
648 case SOF_CTRL_TYPE_VALUE_CHAN_GET:
649 case SOF_CTRL_TYPE_VALUE_CHAN_SET:
650 cdata->num_elems = scontrol->num_channels;
651
652 msg_bytes = scontrol->num_channels *
653 sizeof(struct sof_ipc_ctrl_value_chan);
654 msg_bytes += sizeof(struct sof_ipc_ctrl_data);
655 break;
656 case SOF_CTRL_TYPE_DATA_GET:
657 case SOF_CTRL_TYPE_DATA_SET:
658 cdata->num_elems = cdata->data->size;
659
660 msg_bytes = cdata->data->size;
661 msg_bytes += sizeof(struct sof_ipc_ctrl_data) +
662 sizeof(struct sof_abi_hdr);
663 break;
664 default:
665 return -EINVAL;
666 }
667
668 cdata->rhdr.hdr.size = msg_bytes;
669 cdata->elems_remaining = 0;
670
> 671 return iops->set_get_data(sdev, cdata, cdata->rhdr.hdr.size, set);
672 }
673 EXPORT_SYMBOL(snd_sof_ipc_set_get_comp_data);
674
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [plbossart-sound:fix/skl-kbl-support 11/23] sound/soc/sof/ipc.c:600:35: error: initialization of 'const struct sof_ipc_ops *' from incompatible pointer type 'const struct ipc_ops *'
2022-02-04 1:30 [plbossart-sound:fix/skl-kbl-support 11/23] sound/soc/sof/ipc.c:600:35: error: initialization of 'const struct sof_ipc_ops *' from incompatible pointer type 'const struct ipc_ops *' kernel test robot
@ 2022-02-04 8:49 ` Péter Ujfalusi
0 siblings, 0 replies; 2+ messages in thread
From: Péter Ujfalusi @ 2022-02-04 8:49 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5846 bytes --]
crap,
I did missed this one in the middle.
I had the struct ipc_ops > struct sof_ipc_ops rename first, fixed all
patches, then I dropped the rename and fixed most of the patches, but
this one was missed.
For upstream I always do a patch by patch checkpatch/build/boot test, I
will fix it up then.
On 04/02/2022 03:30, kernel test robot wrote:
> tree: https://github.com/plbossart/sound fix/skl-kbl-support
> head: 7789f3e98c686f9300a556d67a210306407d2841
> commit: d399e2a55e99980b016e8695912eb61c8f2ac576 [11/23] ASoC: SOF: ipc: Switch over to use the tx_msg and set_get_data ops
> config: x86_64-sof-customedconfig-sof-defconfig (https://download.01.org/0day-ci/archive/20220204/202202040412.6FkCqceQ-lkp(a)intel.com/config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
> # https://github.com/plbossart/sound/commit/d399e2a55e99980b016e8695912eb61c8f2ac576
> git remote add plbossart-sound https://github.com/plbossart/sound
> git fetch --no-tags plbossart-sound fix/skl-kbl-support
> git checkout d399e2a55e99980b016e8695912eb61c8f2ac576
> # 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@intel.com>
>
> Note: the plbossart-sound/fix/skl-kbl-support HEAD 7789f3e98c686f9300a556d67a210306407d2841 builds fine.
> It only hurts bisectability.
>
> All errors (new ones prefixed by >>):
>
> sound/soc/sof/ipc.c: In function 'snd_sof_ipc_set_get_comp_data':
>>> sound/soc/sof/ipc.c:600:35: error: initialization of 'const struct sof_ipc_ops *' from incompatible pointer type 'const struct ipc_ops *' [-Werror=incompatible-pointer-types]
> 600 | const struct sof_ipc_ops *iops = sdev->ipc->ops;
> | ^~~~
>>> sound/soc/sof/ipc.c:671:13: error: dereferencing pointer to incomplete type 'const struct sof_ipc_ops'
> 671 | return iops->set_get_data(sdev, cdata, cdata->rhdr.hdr.size, set);
> | ^~
> sound/soc/sof/ipc.c:672:1: error: control reaches end of non-void function [-Werror=return-type]
> 672 | }
> | ^
> cc1: some warnings being treated as errors
>
>
> vim +600 sound/soc/sof/ipc.c
>
> 591
> 592 /*
> 593 * IPC get()/set() for kcontrols.
> 594 */
> 595 int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, bool set)
> 596 {
> 597 struct snd_soc_component *scomp = scontrol->scomp;
> 598 struct sof_ipc_ctrl_data *cdata = scontrol->ipc_control_data;
> 599 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
> > 600 const struct sof_ipc_ops *iops = sdev->ipc->ops;
> 601 enum sof_ipc_ctrl_type ctrl_type;
> 602 struct snd_sof_widget *swidget;
> 603 bool widget_found = false;
> 604 u32 ipc_cmd, msg_bytes;
> 605
> 606 list_for_each_entry(swidget, &sdev->widget_list, list) {
> 607 if (swidget->comp_id == scontrol->comp_id) {
> 608 widget_found = true;
> 609 break;
> 610 }
> 611 }
> 612
> 613 if (!widget_found) {
> 614 dev_err(sdev->dev, "%s: can't find widget with id %d\n", __func__,
> 615 scontrol->comp_id);
> 616 return -EINVAL;
> 617 }
> 618
> 619 /*
> 620 * Volatile controls should always be part of static pipelines and the widget use_count
> 621 * would always be > 0 in this case. For the others, just return the cached value if the
> 622 * widget is not set up.
> 623 */
> 624 if (!swidget->use_count)
> 625 return 0;
> 626
> 627 /*
> 628 * Select the IPC cmd and the ctrl_type based on the ctrl_cmd and the
> 629 * direction
> 630 * Note: SOF_CTRL_TYPE_VALUE_COMP_* is not used and supported currently
> 631 * for ctrl_type
> 632 */
> 633 if (cdata->cmd == SOF_CTRL_CMD_BINARY) {
> 634 ipc_cmd = set ? SOF_IPC_COMP_SET_DATA : SOF_IPC_COMP_GET_DATA;
> 635 ctrl_type = set ? SOF_CTRL_TYPE_DATA_SET : SOF_CTRL_TYPE_DATA_GET;
> 636 } else {
> 637 ipc_cmd = set ? SOF_IPC_COMP_SET_VALUE : SOF_IPC_COMP_GET_VALUE;
> 638 ctrl_type = set ? SOF_CTRL_TYPE_VALUE_CHAN_SET : SOF_CTRL_TYPE_VALUE_CHAN_GET;
> 639 }
> 640
> 641 cdata->rhdr.hdr.cmd = SOF_IPC_GLB_COMP_MSG | ipc_cmd;
> 642 cdata->type = ctrl_type;
> 643 cdata->comp_id = scontrol->comp_id;
> 644 cdata->msg_index = 0;
> 645
> 646 /* calculate header and data size */
> 647 switch (cdata->type) {
> 648 case SOF_CTRL_TYPE_VALUE_CHAN_GET:
> 649 case SOF_CTRL_TYPE_VALUE_CHAN_SET:
> 650 cdata->num_elems = scontrol->num_channels;
> 651
> 652 msg_bytes = scontrol->num_channels *
> 653 sizeof(struct sof_ipc_ctrl_value_chan);
> 654 msg_bytes += sizeof(struct sof_ipc_ctrl_data);
> 655 break;
> 656 case SOF_CTRL_TYPE_DATA_GET:
> 657 case SOF_CTRL_TYPE_DATA_SET:
> 658 cdata->num_elems = cdata->data->size;
> 659
> 660 msg_bytes = cdata->data->size;
> 661 msg_bytes += sizeof(struct sof_ipc_ctrl_data) +
> 662 sizeof(struct sof_abi_hdr);
> 663 break;
> 664 default:
> 665 return -EINVAL;
> 666 }
> 667
> 668 cdata->rhdr.hdr.size = msg_bytes;
> 669 cdata->elems_remaining = 0;
> 670
> > 671 return iops->set_get_data(sdev, cdata, cdata->rhdr.hdr.size, set);
> 672 }
> 673 EXPORT_SYMBOL(snd_sof_ipc_set_get_comp_data);
> 674
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
--
Péter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-04 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04 1:30 [plbossart-sound:fix/skl-kbl-support 11/23] sound/soc/sof/ipc.c:600:35: error: initialization of 'const struct sof_ipc_ops *' from incompatible pointer type 'const struct ipc_ops *' kernel test robot
2022-02-04 8:49 ` Péter Ujfalusi
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.