* [ti:ti-rt-linux-5.4.y 12712/12848] drivers/soc/ti/k3-ringacc.c:1479:24: sparse: sparse: incorrect type in return expression (different address spaces)
@ 2020-12-11 13:37 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-12-11 13:37 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3928 bytes --]
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.4.y
head: 5408fe1faf9d469d0f9653c60c3e05098b7907b7
commit: c80de11c397fca6dc81ebad2af118cafad6800d7 [12712/12848] soc: ti: k3-ringacc: add AM64 DMA rings support.
config: arm64-randconfig-s032-20201209 (attached as .config)
compiler: aarch64-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-179-ga00755aa-dirty
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.4.y
git checkout c80de11c397fca6dc81ebad2af118cafad6800d7
# 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=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/soc/ti/k3-ringacc.c:1479:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct k3_ringacc * @@ got void [noderef] <asn:2> *[assigned] base_rt @@
drivers/soc/ti/k3-ringacc.c:1479:24: sparse: expected struct k3_ringacc *
drivers/soc/ti/k3-ringacc.c:1479:24: sparse: got void [noderef] <asn:2> *[assigned] base_rt
vim +1479 drivers/soc/ti/k3-ringacc.c
1454
1455 struct k3_ringacc *k3_ringacc_dmarings_init(struct platform_device *pdev,
1456 struct k3_ringacc_init_data *data)
1457 {
1458 struct device *dev = &pdev->dev;
1459 struct k3_ringacc *ringacc;
1460 void __iomem *base_rt;
1461 struct resource *res;
1462 int i;
1463
1464 ringacc = devm_kzalloc(dev, sizeof(*ringacc), GFP_KERNEL);
1465 if (!ringacc)
1466 return ERR_PTR(-ENOMEM);
1467
1468 ringacc->dev = dev;
1469 ringacc->dma_rings = true;
1470 ringacc->num_rings = data->num_rings;
1471 ringacc->tisci = data->tisci;
1472 ringacc->tisci_dev_id = data->tisci_dev_id;
1473
1474 mutex_init(&ringacc->req_lock);
1475
1476 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ringrt");
1477 base_rt = devm_ioremap_resource(dev, res);
1478 if (IS_ERR(base_rt))
> 1479 return base_rt;
1480
1481 ringacc->rings = devm_kzalloc(dev,
1482 sizeof(*ringacc->rings) *
1483 ringacc->num_rings * 2,
1484 GFP_KERNEL);
1485 ringacc->rings_inuse = devm_kcalloc(dev,
1486 BITS_TO_LONGS(ringacc->num_rings),
1487 sizeof(unsigned long), GFP_KERNEL);
1488
1489 if (!ringacc->rings || !ringacc->rings_inuse)
1490 return ERR_PTR(-ENOMEM);
1491
1492 for (i = 0; i < ringacc->num_rings; i++) {
1493 struct k3_ring *ring = &ringacc->rings[i];
1494
1495 ring->rt = base_rt + K3_DMARING_RT_REGS_STEP * i;
1496 ring->parent = ringacc;
1497 ring->ring_id = i;
1498 ring->proxy_id = K3_RINGACC_PROXY_NOT_USED;
1499
1500 ring = &ringacc->rings[ringacc->num_rings + i];
1501 ring->rt = base_rt + K3_DMARING_RT_REGS_STEP * i +
1502 K3_DMARING_RT_REGS_REVERSE_OFS;
1503 ring->parent = ringacc;
1504 ring->ring_id = i;
1505 ring->proxy_id = K3_RINGACC_PROXY_NOT_USED;
1506 ring->flags = K3_RING_FLAG_REVERSE;
1507 }
1508
1509 ringacc->tisci_ring_ops = &ringacc->tisci->ops.rm_ring_ops;
1510
1511 dev_info(dev, "Number of rings: %u\n", ringacc->num_rings);
1512
1513 return ringacc;
1514 }
1515 EXPORT_SYMBOL_GPL(k3_ringacc_dmarings_init);
1516
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32847 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-11 13:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11 13:37 [ti:ti-rt-linux-5.4.y 12712/12848] drivers/soc/ti/k3-ringacc.c:1479:24: sparse: sparse: incorrect type in return expression (different address spaces) kernel test robot
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.