Re: [net-next v2 07/14] octeontx2-pf: cn10k: Use LMTST lines for NPA/NIX operations
by kernel test robot
Hi Geetha,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Geetha-sowjanya/Add-Marvell-CN10...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 6626a0266566c5aea16178c5e6cd7fc4db3f2f56
config: riscv-allmodconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
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/2b6495d2b221c50facea4eb70bee5d0cc...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Geetha-sowjanya/Add-Marvell-CN10K-support/20210202-140820
git checkout 2b6495d2b221c50facea4eb70bee5d0cccfb43e4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:21:
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h: In function '__cn10k_aura_freeptr':
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:529:16: warning: variable 'val' set but not used [-Wunused-but-set-variable]
529 | u64 tar_addr, val = 0;
| ^~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h: In function 'otx2_aura_freeptr':
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:578:19: warning: unused variable 'pfvf' [-Wunused-variable]
578 | struct otx2_nic *pfvf = dev;
| ^~~~
--
In file included from drivers/net/ethernet/marvell/octeontx2/nic/cn10k.h:10,
from drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c:7:
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h: In function '__cn10k_aura_freeptr':
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:529:16: warning: variable 'val' set but not used [-Wunused-but-set-variable]
529 | u64 tar_addr, val = 0;
| ^~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h: In function 'otx2_aura_freeptr':
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:578:19: warning: unused variable 'pfvf' [-Wunused-variable]
578 | struct otx2_nic *pfvf = dev;
| ^~~~
drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c: In function 'cn10k_sqe_flush':
>> drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c:164:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]
164 | u64 val = 0, tar_addr = 0;
| ^~~
vim +/val +529 drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
523
524 static inline void __cn10k_aura_freeptr(struct otx2_nic *pfvf, u64 aura,
525 u64 *ptrs, u64 num_ptrs,
526 u64 *lmt_addr)
527 {
528 u64 size = 0, count_eot = 0;
> 529 u64 tar_addr, val = 0;
530
531 tar_addr = (__force u64)otx2_get_regaddr(pfvf, NPA_LF_AURA_BATCH_FREE0);
532 /* LMTID is same as AURA Id */
533 val = (aura & 0x7FF) | BIT_ULL(63);
534 /* Set if [127:64] of last 128bit word has a valid pointer */
535 count_eot = (num_ptrs % 2) ? 0ULL : 1ULL;
536 /* Set AURA ID to free pointer */
537 ptrs[0] = (count_eot << 32) | (aura & 0xFFFFF);
538 /* Target address for LMTST flush tells HW how many 128bit
539 * words are valid from NPA_LF_AURA_BATCH_FREE0.
540 *
541 * tar_addr[6:4] is LMTST size-1 in units of 128b.
542 */
543 if (num_ptrs > 2) {
544 size = (sizeof(u64) * num_ptrs) / 16;
545 if (!count_eot)
546 size++;
547 tar_addr |= ((size - 1) & 0x7) << 4;
548 }
549 memcpy(lmt_addr, ptrs, sizeof(u64) * num_ptrs);
550 /* Perform LMTST flush */
551 cn10k_lmt_flush(val, tar_addr);
552 }
553
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH rfc 2/3] virtio-net: support receive timestamp
by kernel test robot
Hi Willem,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on ipvs/master]
[also build test WARNING on linus/master v5.11-rc6 next-20210125]
[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/Willem-de-Bruijn/virtio-net-add-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
config: x86_64-randconfig-s021-20201228 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://github.com/0day-ci/linux/commit/d309db6857fa35b0d7a11cc5229436d6d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Willem-de-Bruijn/virtio-net-add-tx-hash-rx-tstamp-and-tx-tstamp/20201229-002604
git checkout d309db6857fa35b0d7a11cc5229436d6d71ab274
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/net/virtio_net.c:1096:80: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long long [usertype] ns @@ got restricted __virtio64 [usertype] tstamp @@
drivers/net/virtio_net.c:1096:80: sparse: expected unsigned long long [usertype] ns
drivers/net/virtio_net.c:1096:80: sparse: got restricted __virtio64 [usertype] tstamp
drivers/net/virtio_net.c:1580:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] hash_value @@ got restricted __virtio32 @@
drivers/net/virtio_net.c:1580:32: sparse: expected restricted __le32 [usertype] hash_value
drivers/net/virtio_net.c:1580:32: sparse: got restricted __virtio32
drivers/net/virtio_net.c:1581:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] hash_report @@ got int @@
drivers/net/virtio_net.c:1581:33: sparse: expected restricted __le16 [usertype] hash_report
drivers/net/virtio_net.c:1581:33: sparse: got int
vim +1096 drivers/net/virtio_net.c
1048
1049 static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
1050 void *buf, unsigned int len, void **ctx,
1051 unsigned int *xdp_xmit,
1052 struct virtnet_rq_stats *stats)
1053 {
1054 struct net_device *dev = vi->dev;
1055 struct sk_buff *skb;
1056 struct virtio_net_hdr_mrg_rxbuf *hdr;
1057
1058 if (unlikely(len < vi->hdr_len + ETH_HLEN)) {
1059 pr_debug("%s: short packet %i\n", dev->name, len);
1060 dev->stats.rx_length_errors++;
1061 if (vi->mergeable_rx_bufs) {
1062 put_page(virt_to_head_page(buf));
1063 } else if (vi->big_packets) {
1064 give_pages(rq, buf);
1065 } else {
1066 put_page(virt_to_head_page(buf));
1067 }
1068 return;
1069 }
1070
1071 if (vi->mergeable_rx_bufs)
1072 skb = receive_mergeable(dev, vi, rq, buf, ctx, len, xdp_xmit,
1073 stats);
1074 else if (vi->big_packets)
1075 skb = receive_big(dev, vi, rq, buf, len, stats);
1076 else
1077 skb = receive_small(dev, vi, rq, buf, ctx, len, xdp_xmit, stats);
1078
1079 if (unlikely(!skb))
1080 return;
1081
1082 hdr = skb_vnet_hdr(skb);
1083
1084 if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID)
1085 skb->ip_summed = CHECKSUM_UNNECESSARY;
1086
1087 if (virtio_net_hdr_to_skb(skb, &hdr->hdr,
1088 virtio_is_little_endian(vi->vdev))) {
1089 net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n",
1090 dev->name, hdr->hdr.gso_type,
1091 hdr->hdr.gso_size);
1092 goto frame_err;
1093 }
1094
1095 if (vi->has_rx_tstamp)
> 1096 skb_hwtstamps(skb)->hwtstamp = ns_to_ktime(skb_vnet_hdr_12(skb)->tstamp);
1097
1098 skb_record_rx_queue(skb, vq2rxq(rq->vq));
1099 skb->protocol = eth_type_trans(skb, dev);
1100 pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
1101 ntohs(skb->protocol), skb->len, skb->pkt_type);
1102
1103 napi_gro_receive(&rq->napi, skb);
1104 return;
1105
1106 frame_err:
1107 dev->stats.rx_frame_errors++;
1108 dev_kfree_skb(skb);
1109 }
1110
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[linux-next:master 4894/6048] sound/soc/soc-topology-test.c:128:25: sparse: sparse: incorrect type in initializer (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 59fa6a163ffabc1bf25c5e0e33899e268a96d3cc
commit: cec9128dfcf9101f903470e43d46278e5b07ef24 [4894/6048] ASoC: topology: KUnit: Add KUnit tests passing empty topology with variants to snd_soc_tplg_component_load
config: ia64-randconfig-s032-20210202 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout cec9128dfcf9101f903470e43d46278e5b07ef24
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
sound/soc/soc-topology-test.c:124:26: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le32 [usertype] magic @@ got int @@
sound/soc/soc-topology-test.c:124:26: sparse: expected restricted __le32 [usertype] magic
sound/soc/soc-topology-test.c:124:26: sparse: got int
sound/soc/soc-topology-test.c:125:24: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le32 [usertype] abi @@ got int @@
sound/soc/soc-topology-test.c:125:24: sparse: expected restricted __le32 [usertype] abi
sound/soc/soc-topology-test.c:125:24: sparse: got int
sound/soc/soc-topology-test.c:127:25: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le32 [usertype] type @@ got int @@
sound/soc/soc-topology-test.c:127:25: sparse: expected restricted __le32 [usertype] type
sound/soc/soc-topology-test.c:127:25: sparse: got int
>> sound/soc/soc-topology-test.c:128:25: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le32 [usertype] size @@ got unsigned long @@
sound/soc/soc-topology-test.c:128:25: sparse: expected restricted __le32 [usertype] size
sound/soc/soc-topology-test.c:128:25: sparse: got unsigned long
>> sound/soc/soc-topology-test.c:130:33: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le32 [usertype] payload_size @@ got unsigned long @@
sound/soc/soc-topology-test.c:130:33: sparse: expected restricted __le32 [usertype] payload_size
sound/soc/soc-topology-test.c:130:33: sparse: got unsigned long
sound/soc/soc-topology-test.c:132:26: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le32 [usertype] count @@ got int @@
sound/soc/soc-topology-test.c:132:26: sparse: expected restricted __le32 [usertype] count
sound/soc/soc-topology-test.c:132:26: sparse: got int
sound/soc/soc-topology-test.c:136:25: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le32 [usertype] size @@ got unsigned long @@
sound/soc/soc-topology-test.c:136:25: sparse: expected restricted __le32 [usertype] size
sound/soc/soc-topology-test.c:136:25: sparse: got unsigned long
sound/soc/soc-topology-test.c:390:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] magic @@ got int @@
sound/soc/soc-topology-test.c:390:28: sparse: expected restricted __le32 [usertype] magic
sound/soc/soc-topology-test.c:390:28: sparse: got int
sound/soc/soc-topology-test.c:446:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] abi @@ got int @@
sound/soc/soc-topology-test.c:446:26: sparse: expected restricted __le32 [usertype] abi
sound/soc/soc-topology-test.c:446:26: sparse: got int
>> sound/soc/soc-topology-test.c:502:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] size @@ got unsigned long @@
sound/soc/soc-topology-test.c:502:27: sparse: expected restricted __le32 [usertype] size
sound/soc/soc-topology-test.c:502:27: sparse: got unsigned long
vim +128 sound/soc/soc-topology-test.c
121
122 static struct tplg_tmpl_001 tplg_tmpl_empty = {
123 .header = {
> 124 .magic = SND_SOC_TPLG_MAGIC,
> 125 .abi = 5,
126 .version = 0,
127 .type = SND_SOC_TPLG_TYPE_MANIFEST,
> 128 .size = sizeof(struct snd_soc_tplg_hdr),
129 .vendor_type = 0,
> 130 .payload_size = sizeof(struct snd_soc_tplg_manifest),
131 .index = 0,
132 .count = 1,
133 },
134
135 .manifest = {
> 136 .size = sizeof(struct snd_soc_tplg_manifest),
137 /* rest of fields is 0 */
138 },
139 };
140
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH v2 2/2] drm/aspeed: Use dt matching for default register values
by kernel test robot
Hi Joel,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip v5.11-rc6 next-20210125]
[cannot apply to joel-aspeed/for-next]
[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/Joel-Stanley/drm-aspeed-Support-...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
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/d6ef19fa04b9cc1d571e0babb5250c5f8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Joel-Stanley/drm-aspeed-Support-more-chip-families/20210202-134815
git checkout d6ef19fa04b9cc1d571e0babb5250c5f8f8da34e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/err.h:5,
from include/linux/clk.h:12,
from drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:4:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:174:49: warning: ordered comparison of pointer with null pointer [-Wextra]
174 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:8:
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c: At top level:
>> drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:87:25: error: 'aspeed_gfx_of_table' undeclared here (not in a function); did you mean 'aspeed_gfx_match'?
87 | MODULE_DEVICE_TABLE(of, aspeed_gfx_of_table);
| ^~~~~~~~~~~~~~~~~~~
include/linux/module.h:241:15: note: in definition of macro 'MODULE_DEVICE_TABLE'
241 | extern typeof(name) __mod_##type##__##name##_device_table \
| ^~~~
>> include/linux/module.h:241:21: error: '__mod_of__aspeed_gfx_of_table_device_table' aliased to undefined symbol 'aspeed_gfx_of_table'
241 | extern typeof(name) __mod_##type##__##name##_device_table \
| ^~~~~~
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:87:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
87 | MODULE_DEVICE_TABLE(of, aspeed_gfx_of_table);
| ^~~~~~~~~~~~~~~~~~~
vim +87 drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
81
82 static const struct of_device_id aspeed_gfx_match[] = {
83 { .compatible = "aspeed,ast2400-gfx", .data = &ast2400_config },
84 { .compatible = "aspeed,ast2500-gfx", .data = &ast2500_config },
85 { },
86 };
> 87 MODULE_DEVICE_TABLE(of, aspeed_gfx_of_table);
88
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
Re: [PATCH v5 2/2] media: i2c: Add imx334 camera sensor driver
by kernel test robot
Hi Martina,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on fd821bf0ed9a7db09d2e007df697f4d9ecfda99a]
url: https://github.com/0day-ci/linux/commits/Martina-Krasteva/IMX334-Camera-S...
base: fd821bf0ed9a7db09d2e007df697f4d9ecfda99a
config: nds32-randconfig-r031-20210202 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
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/57bf371289c42fe7cc648f2de6cd6680d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Martina-Krasteva/IMX334-Camera-Sensor-Driver/20210202-094552
git checkout 57bf371289c42fe7cc648f2de6cd6680df675f09
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/imx334.c:751:5: warning: no previous prototype for 'imx334_parse_hw_config' [-Wmissing-prototypes]
751 | int imx334_parse_hw_config(struct imx334 *imx334)
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/imx334_parse_hw_config +751 drivers/media/i2c/imx334.c
744
745 /**
746 * imx334_parse_hw_config() - Parse HW configuration and check if supported
747 * @imx334: pointer to imx334 device
748 *
749 * Return: 0 if successful, error code otherwise.
750 */
> 751 int imx334_parse_hw_config(struct imx334 *imx334)
752 {
753 struct fwnode_handle *fwnode = dev_fwnode(imx334->dev);
754 struct v4l2_fwnode_endpoint bus_cfg = {
755 .bus_type = V4L2_MBUS_CSI2_DPHY
756 };
757 struct fwnode_handle *ep;
758 unsigned long rate;
759 int ret;
760 int i;
761
762 if (!fwnode)
763 return -ENXIO;
764
765 /* Request optional reset pin */
766 imx334->reset_gpio = devm_gpiod_get_optional(imx334->dev, "reset",
767 GPIOD_OUT_LOW);
768 if (IS_ERR(imx334->reset_gpio)) {
769 dev_err(imx334->dev, "failed to get reset gpio %d", ret);
770 return PTR_ERR(imx334->reset_gpio);
771 }
772
773 /* Get sensor input clock */
774 imx334->inclk = devm_clk_get(imx334->dev, "inclk");
775 if (IS_ERR(imx334->inclk)) {
776 dev_err(imx334->dev, "could not get inclk");
777 return PTR_ERR(imx334->inclk);
778 }
779
780 rate = clk_get_rate(imx334->inclk);
781 if (rate != IMX334_INCLK_RATE) {
782 dev_err(imx334->dev, "inclk frequency mismatch");
783 return -EINVAL;
784 }
785
786 ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
787 if (!ep)
788 return -ENXIO;
789
790 ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
791 fwnode_handle_put(ep);
792 if (ret)
793 return ret;
794
795 if (bus_cfg.bus.mipi_csi2.num_data_lanes != IMX334_NUM_DATA_LANES) {
796 dev_err(imx334->dev,
797 "number of CSI2 data lanes %d is not supported",
798 bus_cfg.bus.mipi_csi2.num_data_lanes);
799 ret = -EINVAL;
800 goto done_endpoint_free;
801 }
802
803 if (!bus_cfg.nr_of_link_frequencies) {
804 dev_err(imx334->dev, "no link frequencies defined");
805 ret = -EINVAL;
806 goto done_endpoint_free;
807 }
808
809 for (i = 0; i < bus_cfg.nr_of_link_frequencies; i++)
810 if (bus_cfg.link_frequencies[i] == IMX334_LINK_FREQ)
811 goto done_endpoint_free;
812
813 ret = -EINVAL;
814
815 done_endpoint_free:
816 v4l2_fwnode_endpoint_free(&bus_cfg);
817
818 return ret;
819 }
820
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[intel-linux-intel-lts:4.19/android_r 16885/21556] sound/soc/soc-dapm.c:3833:1: warning: the frame size of 2064 bytes is larger than 2048 bytes
by kernel test robot
Hi Greg,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 4.19/android_r
head: 968adf904a287574c10a384c2e3b1e88994ad843
commit: b8539473ea414eaa4ef28791fa308a6ab8c5d67c [16885/21556] ANDROID: GKI: workqueue.h: add Android ABI padding to some structures
config: x86_64-randconfig-r032-20210201 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/linux-intel-lts/commit/b8539473ea414eaa4ef28791f...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 4.19/android_r
git checkout b8539473ea414eaa4ef28791fa308a6ab8c5d67c
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
sound/soc/soc-dapm.c: In function 'pop_dbg':
sound/soc/soc-dapm.c:174:2: warning: function 'pop_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
174 | vsnprintf(buf, PAGE_SIZE, fmt, args);
| ^~~~~~~~~
sound/soc/soc-dapm.c: In function 'snd_soc_dai_link_event':
>> sound/soc/soc-dapm.c:3833:1: warning: the frame size of 2064 bytes is larger than 2048 bytes [-Wframe-larger-than=]
3833 | }
| ^
vim +3833 sound/soc/soc-dapm.c
4ba1327ab8ce179 Mark Brown 2008-05-13 3697
c74184ed30ecce2 Mark Brown 2012-04-04 3698 static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
c74184ed30ecce2 Mark Brown 2012-04-04 3699 struct snd_kcontrol *kcontrol, int event)
c74184ed30ecce2 Mark Brown 2012-04-04 3700 {
c74184ed30ecce2 Mark Brown 2012-04-04 3701 struct snd_soc_dapm_path *source_p, *sink_p;
c74184ed30ecce2 Mark Brown 2012-04-04 3702 struct snd_soc_dai *source, *sink;
249dc49576fc953 Charles Keepax 2018-08-15 3703 struct snd_soc_pcm_runtime *rtd = w->priv;
c66150824b8a809 Nikesh Oswal 2015-02-02 3704 const struct snd_soc_pcm_stream *config = w->params + w->params_select;
c74184ed30ecce2 Mark Brown 2012-04-04 3705 struct snd_pcm_substream substream;
9747cec21e2d55e Mark Brown 2012-04-26 3706 struct snd_pcm_hw_params *params = NULL;
8053f21675b073b Nicolin Chen 2016-07-26 3707 struct snd_pcm_runtime *runtime = NULL;
3ba66feb59810e2 Takashi Iwai 2018-07-25 3708 unsigned int fmt;
0376916b7b2cff6 Charles Keepax 2018-09-06 3709 int ret = 0;
c74184ed30ecce2 Mark Brown 2012-04-04 3710
bf4edea863c435c Takashi Iwai 2013-11-07 3711 if (WARN_ON(!config) ||
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3712 WARN_ON(list_empty(&w->edges[SND_SOC_DAPM_DIR_OUT]) ||
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3713 list_empty(&w->edges[SND_SOC_DAPM_DIR_IN])))
bf4edea863c435c Takashi Iwai 2013-11-07 3714 return -EINVAL;
c74184ed30ecce2 Mark Brown 2012-04-04 3715
c74184ed30ecce2 Mark Brown 2012-04-04 3716 /* We only support a single source and sink, pick the first */
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3717 source_p = list_first_entry(&w->edges[SND_SOC_DAPM_DIR_OUT],
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3718 struct snd_soc_dapm_path,
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3719 list_node[SND_SOC_DAPM_DIR_OUT]);
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3720 sink_p = list_first_entry(&w->edges[SND_SOC_DAPM_DIR_IN],
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3721 struct snd_soc_dapm_path,
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3722 list_node[SND_SOC_DAPM_DIR_IN]);
c74184ed30ecce2 Mark Brown 2012-04-04 3723
c74184ed30ecce2 Mark Brown 2012-04-04 3724 source = source_p->source->priv;
c74184ed30ecce2 Mark Brown 2012-04-04 3725 sink = sink_p->sink->priv;
c74184ed30ecce2 Mark Brown 2012-04-04 3726
c74184ed30ecce2 Mark Brown 2012-04-04 3727 /* Be a little careful as we don't want to overflow the mask array */
c74184ed30ecce2 Mark Brown 2012-04-04 3728 if (config->formats) {
c74184ed30ecce2 Mark Brown 2012-04-04 3729 fmt = ffs(config->formats) - 1;
c74184ed30ecce2 Mark Brown 2012-04-04 3730 } else {
30a6a1a4eed170b Liam Girdwood 2012-11-19 3731 dev_warn(w->dapm->dev, "ASoC: Invalid format %llx specified\n",
c74184ed30ecce2 Mark Brown 2012-04-04 3732 config->formats);
c74184ed30ecce2 Mark Brown 2012-04-04 3733 fmt = 0;
c74184ed30ecce2 Mark Brown 2012-04-04 3734 }
c74184ed30ecce2 Mark Brown 2012-04-04 3735
c74184ed30ecce2 Mark Brown 2012-04-04 3736 /* Currently very limited parameter selection */
9747cec21e2d55e Mark Brown 2012-04-26 3737 params = kzalloc(sizeof(*params), GFP_KERNEL);
9747cec21e2d55e Mark Brown 2012-04-26 3738 if (!params) {
9747cec21e2d55e Mark Brown 2012-04-26 3739 ret = -ENOMEM;
9747cec21e2d55e Mark Brown 2012-04-26 3740 goto out;
9747cec21e2d55e Mark Brown 2012-04-26 3741 }
9747cec21e2d55e Mark Brown 2012-04-26 3742 snd_mask_set(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT), fmt);
c74184ed30ecce2 Mark Brown 2012-04-04 3743
9747cec21e2d55e Mark Brown 2012-04-26 3744 hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->min =
c74184ed30ecce2 Mark Brown 2012-04-04 3745 config->rate_min;
9747cec21e2d55e Mark Brown 2012-04-26 3746 hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->max =
c74184ed30ecce2 Mark Brown 2012-04-04 3747 config->rate_max;
c74184ed30ecce2 Mark Brown 2012-04-04 3748
9747cec21e2d55e Mark Brown 2012-04-26 3749 hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->min
c74184ed30ecce2 Mark Brown 2012-04-04 3750 = config->channels_min;
9747cec21e2d55e Mark Brown 2012-04-26 3751 hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->max
c74184ed30ecce2 Mark Brown 2012-04-04 3752 = config->channels_max;
c74184ed30ecce2 Mark Brown 2012-04-04 3753
c74184ed30ecce2 Mark Brown 2012-04-04 3754 memset(&substream, 0, sizeof(substream));
c74184ed30ecce2 Mark Brown 2012-04-04 3755
8053f21675b073b Nicolin Chen 2016-07-26 3756 /* Allocate a dummy snd_pcm_runtime for startup() and other ops() */
8053f21675b073b Nicolin Chen 2016-07-26 3757 runtime = kzalloc(sizeof(*runtime), GFP_KERNEL);
8053f21675b073b Nicolin Chen 2016-07-26 3758 if (!runtime) {
8053f21675b073b Nicolin Chen 2016-07-26 3759 ret = -ENOMEM;
8053f21675b073b Nicolin Chen 2016-07-26 3760 goto out;
8053f21675b073b Nicolin Chen 2016-07-26 3761 }
8053f21675b073b Nicolin Chen 2016-07-26 3762 substream.runtime = runtime;
249dc49576fc953 Charles Keepax 2018-08-15 3763 substream.private_data = rtd;
8053f21675b073b Nicolin Chen 2016-07-26 3764
c74184ed30ecce2 Mark Brown 2012-04-04 3765 switch (event) {
c74184ed30ecce2 Mark Brown 2012-04-04 3766 case SND_SOC_DAPM_PRE_PMU:
c74184ed30ecce2 Mark Brown 2012-04-04 3767 substream.stream = SNDRV_PCM_STREAM_CAPTURE;
9900a4226c785db Kuninori Morimoto 2017-09-25 3768 if (source->driver->ops->startup) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3769 ret = source->driver->ops->startup(&substream, source);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3770 if (ret < 0) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3771 dev_err(source->dev,
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3772 "ASoC: startup() failed: %d\n", ret);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3773 goto out;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3774 }
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3775 source->active++;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3776 }
93e6958a3674d2f Benoit Cousson 2014-07-08 3777 ret = soc_dai_hw_params(&substream, params, source);
93e6958a3674d2f Benoit Cousson 2014-07-08 3778 if (ret < 0)
9747cec21e2d55e Mark Brown 2012-04-26 3779 goto out;
c74184ed30ecce2 Mark Brown 2012-04-04 3780
c74184ed30ecce2 Mark Brown 2012-04-04 3781 substream.stream = SNDRV_PCM_STREAM_PLAYBACK;
9900a4226c785db Kuninori Morimoto 2017-09-25 3782 if (sink->driver->ops->startup) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3783 ret = sink->driver->ops->startup(&substream, sink);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3784 if (ret < 0) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3785 dev_err(sink->dev,
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3786 "ASoC: startup() failed: %d\n", ret);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3787 goto out;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3788 }
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3789 sink->active++;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3790 }
93e6958a3674d2f Benoit Cousson 2014-07-08 3791 ret = soc_dai_hw_params(&substream, params, sink);
93e6958a3674d2f Benoit Cousson 2014-07-08 3792 if (ret < 0)
9747cec21e2d55e Mark Brown 2012-04-26 3793 goto out;
c74184ed30ecce2 Mark Brown 2012-04-04 3794 break;
c74184ed30ecce2 Mark Brown 2012-04-04 3795
c74184ed30ecce2 Mark Brown 2012-04-04 3796 case SND_SOC_DAPM_POST_PMU:
da18396f949ecaa Mark Brown 2013-02-06 3797 ret = snd_soc_dai_digital_mute(sink, 0,
da18396f949ecaa Mark Brown 2013-02-06 3798 SNDRV_PCM_STREAM_PLAYBACK);
c74184ed30ecce2 Mark Brown 2012-04-04 3799 if (ret != 0 && ret != -ENOTSUPP)
30a6a1a4eed170b Liam Girdwood 2012-11-19 3800 dev_warn(sink->dev, "ASoC: Failed to unmute: %d\n", ret);
9747cec21e2d55e Mark Brown 2012-04-26 3801 ret = 0;
c74184ed30ecce2 Mark Brown 2012-04-04 3802 break;
c74184ed30ecce2 Mark Brown 2012-04-04 3803
c74184ed30ecce2 Mark Brown 2012-04-04 3804 case SND_SOC_DAPM_PRE_PMD:
da18396f949ecaa Mark Brown 2013-02-06 3805 ret = snd_soc_dai_digital_mute(sink, 1,
da18396f949ecaa Mark Brown 2013-02-06 3806 SNDRV_PCM_STREAM_PLAYBACK);
c74184ed30ecce2 Mark Brown 2012-04-04 3807 if (ret != 0 && ret != -ENOTSUPP)
30a6a1a4eed170b Liam Girdwood 2012-11-19 3808 dev_warn(sink->dev, "ASoC: Failed to mute: %d\n", ret);
9747cec21e2d55e Mark Brown 2012-04-26 3809 ret = 0;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3810
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3811 source->active--;
9900a4226c785db Kuninori Morimoto 2017-09-25 3812 if (source->driver->ops->shutdown) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3813 substream.stream = SNDRV_PCM_STREAM_CAPTURE;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3814 source->driver->ops->shutdown(&substream, source);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3815 }
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3816
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3817 sink->active--;
9900a4226c785db Kuninori Morimoto 2017-09-25 3818 if (sink->driver->ops->shutdown) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3819 substream.stream = SNDRV_PCM_STREAM_PLAYBACK;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3820 sink->driver->ops->shutdown(&substream, sink);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3821 }
c74184ed30ecce2 Mark Brown 2012-04-04 3822 break;
c74184ed30ecce2 Mark Brown 2012-04-04 3823
c74184ed30ecce2 Mark Brown 2012-04-04 3824 default:
a6ed0608bd289b4 Takashi Iwai 2013-11-06 3825 WARN(1, "Unknown event %d\n", event);
75881df3fd7708f Sudip Mukherjee 2015-09-10 3826 ret = -EINVAL;
c74184ed30ecce2 Mark Brown 2012-04-04 3827 }
c74184ed30ecce2 Mark Brown 2012-04-04 3828
9747cec21e2d55e Mark Brown 2012-04-26 3829 out:
8053f21675b073b Nicolin Chen 2016-07-26 3830 kfree(runtime);
9747cec21e2d55e Mark Brown 2012-04-26 3831 kfree(params);
9747cec21e2d55e Mark Brown 2012-04-26 3832 return ret;
c74184ed30ecce2 Mark Brown 2012-04-04 @3833 }
c74184ed30ecce2 Mark Brown 2012-04-04 3834
:::::: The code at line 3833 was first introduced by commit
:::::: c74184ed30ecce2a5e9ae9aa22cb5e3942e0c7c7 ASoC: core: Support transparent CODEC<->CODEC DAI links
:::::: TO: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
:::::: CC: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[morimoto-linux:fw-cleanup-2021-02-01-v1 47/105] include/sound/soc.h:1270 snd_soc_fixup_dai_links_platform_name() error: potentially dereferencing uninitialized 'dai_link'.
by Dan Carpenter
tree: https://github.com/morimoto/linux fw-cleanup-2021-02-01-v1
head: 5b4245224e7512af00a891f6bb91474bea0a361e
commit: c7ccad9772573920328d9c930197cef3b9e492f4 [47/105] ASoC: soc.h: return error if multi platform at snd_soc_fixup_dai_links_platform_name()
config: x86_64-randconfig-m001-20210201 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
include/sound/soc.h:1270 snd_soc_fixup_dai_links_platform_name() error: potentially dereferencing uninitialized 'dai_link'.
vim +/dai_link +1270 include/sound/soc.h
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1258 static inline
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1259 int snd_soc_fixup_dai_links_platform_name(struct snd_soc_card *card,
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1260 const char *platform_name)
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1261 {
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1262 struct snd_soc_dai_link *dai_link;
^^^^^^^^
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1263 const char *name;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1264 int i;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1265
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1266 if (!platform_name) /* nothing to do */
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1267 return 0;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1268
c7ccad97725739 Kuninori Morimoto 2020-12-15 1269 /* only single platform is supported for now */
c7ccad97725739 Kuninori Morimoto 2020-12-15 @1270 if (dai_link->num_platforms != 1) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Not initialized.
c7ccad97725739 Kuninori Morimoto 2020-12-15 1271 dev_err(card->dev, "only single platform is supported for now\n");
c7ccad97725739 Kuninori Morimoto 2020-12-15 1272 return -EINVAL;
c7ccad97725739 Kuninori Morimoto 2020-12-15 1273 }
c7ccad97725739 Kuninori Morimoto 2020-12-15 1274
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1275 /* set platform name for each dailink */
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1276 for_each_card_prelinks(card, i, dai_link) {
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1277 name = devm_kstrdup(card->dev, platform_name, GFP_KERNEL);
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1278 if (!name)
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1279 return -ENOMEM;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1280
adb76b5b9c4740 Kuninori Morimoto 2019-06-06 1281 if (!dai_link->platforms)
adb76b5b9c4740 Kuninori Morimoto 2019-06-06 1282 return -EINVAL;
adb76b5b9c4740 Kuninori Morimoto 2019-06-06 1283
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1284 /* only single platform is supported for now */
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1285 dai_link->platforms->name = name;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1286 }
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1287
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1288 return 0;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1289 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[morimoto-linux:fw-cleanup-2021-02-01-v1 32/105] sound/soc/generic/audio-graph-card.c:514 __graph_for_each_link() error: uninitialized symbol 'ret'.
by Dan Carpenter
tree: https://github.com/morimoto/linux fw-cleanup-2021-02-01-v1
head: 5b4245224e7512af00a891f6bb91474bea0a361e
commit: c8a125300801eaf71415c1283f742d19a5c641fb [32/105] ASoC: audio-graph: cleanup graph_for_each_link()
config: x86_64-randconfig-m001-20210201 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
sound/soc/generic/audio-graph-card.c:514 __graph_for_each_link() error: uninitialized symbol 'ret'.
vim +/ret +514 sound/soc/generic/audio-graph-card.c
c8a125300801ea Kuninori Morimoto 2020-11-16 452 static int __graph_for_each_link(struct asoc_simple_priv *priv,
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 453 struct link_info *li,
e59289cda8dec0 Kuninori Morimoto 2019-03-20 454 int (*func_noml)(struct asoc_simple_priv *priv,
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 455 struct device_node *cpu_ep,
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 456 struct device_node *codec_ep,
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 457 struct link_info *li),
e59289cda8dec0 Kuninori Morimoto 2019-03-20 458 int (*func_dpcm)(struct asoc_simple_priv *priv,
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 459 struct device_node *cpu_ep,
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 460 struct device_node *codec_ep,
c8a125300801ea Kuninori Morimoto 2020-11-16 461 struct link_info *li))
2692c1c63c29ca Kuninori Morimoto 2017-04-20 462 {
2692c1c63c29ca Kuninori Morimoto 2017-04-20 463 struct of_phandle_iterator it;
e59289cda8dec0 Kuninori Morimoto 2019-03-20 464 struct device *dev = simple_priv_to_dev(priv);
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 465 struct device_node *node = dev->of_node;
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 466 struct device_node *cpu_port;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 467 struct device_node *cpu_ep;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 468 struct device_node *codec_ep;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 469 struct device_node *codec_port;
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 470 struct device_node *codec_port_old = NULL;
ad11e59f52d6fc Kuninori Morimoto 2019-03-20 471 struct asoc_simple_data adata;
0e3460bceedc98 Kuninori Morimoto 2018-11-30 472 int rc, ret;
2692c1c63c29ca Kuninori Morimoto 2017-04-20 473
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 474 /* loop for all listed CPU port */
2692c1c63c29ca Kuninori Morimoto 2017-04-20 475 of_for_each_phandle(&it, rc, node, "dais", NULL, 0) {
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 476 cpu_port = it.node;
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 477 cpu_ep = NULL;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 478
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 479 /* loop for all CPU endpoint */
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 480 while (1) {
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 481 cpu_ep = of_get_next_child(cpu_port, cpu_ep);
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 482 if (!cpu_ep)
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 483 break;
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 484
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 485 /* get codec */
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 486 codec_ep = of_graph_get_remote_endpoint(cpu_ep);
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 487 codec_port = of_get_parent(codec_ep);
c0a480d1acf7dc Tony Lindgren 2017-07-28 488
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 489 /* get convert-xxx property */
de2949fe262197 Kuninori Morimoto 2018-12-20 490 memset(&adata, 0, sizeof(adata));
d2bf008ad11abc Kuninori Morimoto 2019-03-18 491 graph_parse_convert(dev, codec_ep, &adata);
d2bf008ad11abc Kuninori Morimoto 2019-03-18 492 graph_parse_convert(dev, cpu_ep, &adata);
de2949fe262197 Kuninori Morimoto 2018-12-20 493
d09c774f2f9ff2 Sameer Pujar 2020-11-02 494 /* check if link requires DPCM parsing */
c8a125300801ea Kuninori Morimoto 2020-11-16 495 if (parse_as_dpcm_link(priv, codec_port, &adata)) {
c8a125300801ea Kuninori Morimoto 2020-11-16 496 /*
c8a125300801ea Kuninori Morimoto 2020-11-16 497 * Codec endpoint can be NULL for pluggable audio HW.
c8a125300801ea Kuninori Morimoto 2020-11-16 498 * Platform DT can populate the Codec endpoint depending on the
c8a125300801ea Kuninori Morimoto 2020-11-16 499 * plugged HW.
c8a125300801ea Kuninori Morimoto 2020-11-16 500 */
c8a125300801ea Kuninori Morimoto 2020-11-16 501 /* Do it all CPU endpoint, and 1st Codec endpoint */
c8a125300801ea Kuninori Morimoto 2020-11-16 502 if (li->cpu ||
c8a125300801ea Kuninori Morimoto 2020-11-16 503 ((codec_port_old != codec_port) && codec_ep))
c8a125300801ea Kuninori Morimoto 2020-11-16 504 ret = func_dpcm(priv, cpu_ep, codec_ep, li);
"ret" not initialized on else path.
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 505 /* else normal sound */
c8a125300801ea Kuninori Morimoto 2020-11-16 506 } else {
c8a125300801ea Kuninori Morimoto 2020-11-16 507 if (li->cpu)
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 508 ret = func_noml(priv, cpu_ep, codec_ep, li);
"ret" not initialized if "li->cpu == 0".
c8a125300801ea Kuninori Morimoto 2020-11-16 509 }
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 510
1bcc1fd64e4dd9 Wen Yang 2019-07-04 511 of_node_put(codec_ep);
1bcc1fd64e4dd9 Wen Yang 2019-07-04 512 of_node_put(codec_port);
1bcc1fd64e4dd9 Wen Yang 2019-07-04 513
ae3cb5790906b5 Kuninori Morimoto 2018-12-14 @514 if (ret < 0)
2692c1c63c29ca Kuninori Morimoto 2017-04-20 515 return ret;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 516
dd98fbc558a035 Kuninori Morimoto 2018-12-20 517 codec_port_old = codec_port;
2692c1c63c29ca Kuninori Morimoto 2017-04-20 518 }
c0a480d1acf7dc Tony Lindgren 2017-07-28 519 }
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 520
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 521 return 0;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 522 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months