[arnd-playground:nvme-platform 8/8] drivers/nvme/host/pci.c:1432:3: error: implicit declaration of function 'pci_free_irq'; did you mean
by kernel test robot
Hi Arnd,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git nvme-platform
head: 7dc06cf18b266aa30ab60ffd33ac7cfce46bf06d
commit: 7dc06cf18b266aa30ab60ffd33ac7cfce46bf06d [8/8] nvme: add platform driver registration
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://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground nvme-platform
git checkout 7dc06cf18b266aa30ab60ffd33ac7cfce46bf06d
# 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/build_bug.h:5,
from include/linux/bits.h:22,
from include/linux/ioport.h:13,
from include/linux/acpi.h:12,
from drivers/nvme/host/pci.c:7:
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));
| ^~~~~~~~~~~~~~~
drivers/nvme/host/pci.c: In function 'nvme_queue_free_irq':
>> drivers/nvme/host/pci.c:1432:3: error: implicit declaration of function 'pci_free_irq'; did you mean 'pcibios_free_irq'? [-Werror=implicit-function-declaration]
1432 | pci_free_irq(pdev, nvmeq->cq_vector, nvmeq);
| ^~~~~~~~~~~~
| pcibios_free_irq
drivers/nvme/host/pci.c: In function 'nvme_queue_request_irq':
>> drivers/nvme/host/pci.c:1596:10: error: implicit declaration of function 'pci_request_irq'; did you mean 'pci_request_acs'? [-Werror=implicit-function-declaration]
1596 | return pci_request_irq(pdev, nvmeq->cq_vector, handler,
| ^~~~~~~~~~~~~~~
| pci_request_acs
drivers/nvme/host/pci.c: In function 'nvme_pci_map_cmb':
>> drivers/nvme/host/pci.c:1902:10: error: implicit declaration of function 'pci_bus_address' [-Werror=implicit-function-declaration]
1902 | (pci_bus_address(pdev, bar) + offset),
| ^~~~~~~~~~~~~~~
drivers/nvme/host/pci.c: In function 'nvme_setup_irqs':
>> drivers/nvme/host/pci.c:2198:10: error: 'PCI_IRQ_ALL_TYPES' undeclared (first use in this function)
2198 | PCI_IRQ_ALL_TYPES | PCI_IRQ_AFFINITY, &affd);
| ^~~~~~~~~~~~~~~~~
drivers/nvme/host/pci.c:2198:10: note: each undeclared identifier is reported only once for each function it appears in
drivers/nvme/host/pci.c: In function 'nvme_pci_free_irqs':
>> drivers/nvme/host/pci.c:2210:2: error: implicit declaration of function 'pci_free_irq_vectors'; did you mean 'pci_alloc_irq_vectors'? [-Werror=implicit-function-declaration]
2210 | pci_free_irq_vectors(pdev);
| ^~~~~~~~~~~~~~~~~~~~
| pci_alloc_irq_vectors
drivers/nvme/host/pci.c: In function 'nvme_pci_enable':
>> drivers/nvme/host/pci.c:2473:6: error: implicit declaration of function 'pci_enable_device_mem'; did you mean 'pci_enable_device'? [-Werror=implicit-function-declaration]
2473 | if (pci_enable_device_mem(pdev))
| ^~~~~~~~~~~~~~~~~~~~~
| pci_enable_device
drivers/nvme/host/pci.c:2487:45: error: 'PCI_IRQ_ALL_TYPES' undeclared (first use in this function)
2487 | result = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
| ^~~~~~~~~~~~~~~~~
drivers/nvme/host/pci.c: In function 'nvme_pci_dev_unmap':
>> drivers/nvme/host/pci.c:2523:2: error: implicit declaration of function 'pci_release_mem_regions'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
2523 | pci_release_mem_regions(pdev);
| ^~~~~~~~~~~~~~~~~~~~~~~
| pci_release_regions
drivers/nvme/host/pci.c: In function 'nvme_pci_disable':
>> drivers/nvme/host/pci.c:2530:6: error: implicit declaration of function 'pci_is_enabled'; did you mean 'pci_acs_enabled'? [-Werror=implicit-function-declaration]
2530 | if (pci_is_enabled(pdev)) {
| ^~~~~~~~~~~~~~
| pci_acs_enabled
drivers/nvme/host/pci.c: In function 'nvme_setup_irqs':
drivers/nvme/host/pci.c:2199:1: error: control reaches end of non-void function [-Werror=return-type]
2199 | }
| ^
At top level:
drivers/nvme/host/pci.c:2593:12: warning: 'nvme_disable_prepare_reset' defined but not used [-Wunused-function]
2593 | static int nvme_disable_prepare_reset(struct nvme_dev *dev, bool shutdown)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/pci.c:2519:13: warning: 'nvme_pci_dev_unmap' defined but not used [-Wunused-function]
2519 | static void nvme_pci_dev_unmap(struct pci_dev *pdev, struct nvme_dev *dev)
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1432 drivers/nvme/host/pci.c
224042742582c9 drivers/block/nvme-core.c Keith Busch 2013-07-15 1426
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1427 static void nvme_queue_free_irq(struct nvme_queue *nvmeq)
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1428 {
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1429 struct pci_dev *pdev = nvme_pci_dev(nvmeq->dev);
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1430
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1431 if (pdev)
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 @1432 pci_free_irq(pdev, nvmeq->cq_vector, nvmeq);
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1433 else
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1434 free_irq(nvmeq->dev->platform_irq, nvmeq);
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1435 }
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1436
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1437
4d115420707afc drivers/block/nvme-core.c Keith Busch 2013-12-10 1438 /**
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1439 * nvme_pci_suspend_queue - put queue into suspended state
40581d1a91a152 drivers/nvme/host/pci.c Bart Van Assche 2018-10-08 1440 * @nvmeq: queue to suspend
4d115420707afc drivers/block/nvme-core.c Keith Busch 2013-12-10 1441 */
4d115420707afc drivers/block/nvme-core.c Keith Busch 2013-12-10 1442 static int nvme_suspend_queue(struct nvme_queue *nvmeq)
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1443 {
4e224106673f1e drivers/nvme/host/pci.c Christoph Hellwig 2018-12-02 1444 if (!test_and_clear_bit(NVMEQ_ENABLED, &nvmeq->flags))
2b25d981790b83 drivers/block/nvme-core.c Keith Busch 2014-12-22 1445 return 1;
a09115b23e2002 drivers/block/nvme.c Matthew Wilcox 2012-08-07 1446
4e224106673f1e drivers/nvme/host/pci.c Christoph Hellwig 2018-12-02 1447 /* ensure that nvme_queue_rq() sees NVMEQ_ENABLED cleared */
d1f06f4ae0410f drivers/nvme/host/pci.c Jens Axboe 2018-05-17 1448 mb();
a09115b23e2002 drivers/block/nvme.c Matthew Wilcox 2012-08-07 1449
4e224106673f1e drivers/nvme/host/pci.c Christoph Hellwig 2018-12-02 1450 nvmeq->dev->online_queues--;
1c63dc66580d4b drivers/nvme/host/pci.c Christoph Hellwig 2015-11-26 1451 if (!nvmeq->qid && nvmeq->dev->ctrl.admin_q)
c81545f991a661 drivers/nvme/host/pci.c Sagi Grimberg 2017-07-02 1452 blk_mq_quiesce_queue(nvmeq->dev->ctrl.admin_q);
7c349dde26b75d drivers/nvme/host/pci.c Keith Busch 2019-03-08 1453 if (!test_and_clear_bit(NVMEQ_POLLED, &nvmeq->flags))
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1454 nvme_queue_free_irq(nvmeq);
4d115420707afc drivers/block/nvme-core.c Keith Busch 2013-12-10 1455 return 0;
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1456 }
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1457
8fae268b40f519 drivers/nvme/host/pci.c Keith Busch 2019-01-04 1458 static void nvme_suspend_io_queues(struct nvme_dev *dev)
8fae268b40f519 drivers/nvme/host/pci.c Keith Busch 2019-01-04 1459 {
8fae268b40f519 drivers/nvme/host/pci.c Keith Busch 2019-01-04 1460 int i;
8fae268b40f519 drivers/nvme/host/pci.c Keith Busch 2019-01-04 1461
8fae268b40f519 drivers/nvme/host/pci.c Keith Busch 2019-01-04 1462 for (i = dev->ctrl.queue_count - 1; i > 0; i--)
8fae268b40f519 drivers/nvme/host/pci.c Keith Busch 2019-01-04 1463 nvme_suspend_queue(&dev->queues[i]);
8fae268b40f519 drivers/nvme/host/pci.c Keith Busch 2019-01-04 1464 }
8fae268b40f519 drivers/nvme/host/pci.c Keith Busch 2019-01-04 1465
a5cdb68c2c10f0 drivers/nvme/host/pci.c Keith Busch 2016-01-12 1466 static void nvme_disable_admin_queue(struct nvme_dev *dev, bool shutdown)
4d115420707afc drivers/block/nvme-core.c Keith Busch 2013-12-10 1467 {
147b27e4bd0840 drivers/nvme/host/pci.c Sagi Grimberg 2018-01-14 1468 struct nvme_queue *nvmeq = &dev->queues[0];
4d115420707afc drivers/block/nvme-core.c Keith Busch 2013-12-10 1469
a5cdb68c2c10f0 drivers/nvme/host/pci.c Keith Busch 2016-01-12 1470 if (shutdown)
a5cdb68c2c10f0 drivers/nvme/host/pci.c Keith Busch 2016-01-12 1471 nvme_shutdown_ctrl(&dev->ctrl);
a5cdb68c2c10f0 drivers/nvme/host/pci.c Keith Busch 2016-01-12 1472 else
b5b0504878b884 drivers/nvme/host/pci.c Sagi Grimberg 2019-07-22 1473 nvme_disable_ctrl(&dev->ctrl);
07836e659c81ec drivers/block/nvme-core.c Keith Busch 2015-02-19 1474
bf392a5dc02a9b drivers/nvme/host/pci.c Keith Busch 2020-03-02 1475 nvme_poll_irqdisable(nvmeq);
4d115420707afc drivers/block/nvme-core.c Keith Busch 2013-12-10 1476 }
4d115420707afc drivers/block/nvme-core.c Keith Busch 2013-12-10 1477
fa46c6fb5d61b1 drivers/nvme/host/pci.c Keith Busch 2020-02-13 1478 /*
fa46c6fb5d61b1 drivers/nvme/host/pci.c Keith Busch 2020-02-13 1479 * Called only on a device that has been disabled and after all other threads
9210c075cef29c drivers/nvme/host/pci.c Dongli Zhang 2020-05-27 1480 * that can check this device's completion queues have synced, except
9210c075cef29c drivers/nvme/host/pci.c Dongli Zhang 2020-05-27 1481 * nvme_poll(). This is the last chance for the driver to see a natural
9210c075cef29c drivers/nvme/host/pci.c Dongli Zhang 2020-05-27 1482 * completion before nvme_cancel_request() terminates all incomplete requests.
fa46c6fb5d61b1 drivers/nvme/host/pci.c Keith Busch 2020-02-13 1483 */
fa46c6fb5d61b1 drivers/nvme/host/pci.c Keith Busch 2020-02-13 1484 static void nvme_reap_pending_cqes(struct nvme_dev *dev)
fa46c6fb5d61b1 drivers/nvme/host/pci.c Keith Busch 2020-02-13 1485 {
fa46c6fb5d61b1 drivers/nvme/host/pci.c Keith Busch 2020-02-13 1486 int i;
fa46c6fb5d61b1 drivers/nvme/host/pci.c Keith Busch 2020-02-13 1487
9210c075cef29c drivers/nvme/host/pci.c Dongli Zhang 2020-05-27 1488 for (i = dev->ctrl.queue_count - 1; i > 0; i--) {
9210c075cef29c drivers/nvme/host/pci.c Dongli Zhang 2020-05-27 1489 spin_lock(&dev->queues[i].cq_poll_lock);
324b494c286298 drivers/nvme/host/pci.c Keith Busch 2020-03-02 1490 nvme_process_cq(&dev->queues[i]);
9210c075cef29c drivers/nvme/host/pci.c Dongli Zhang 2020-05-27 1491 spin_unlock(&dev->queues[i].cq_poll_lock);
9210c075cef29c drivers/nvme/host/pci.c Dongli Zhang 2020-05-27 1492 }
fa46c6fb5d61b1 drivers/nvme/host/pci.c Keith Busch 2020-02-13 1493 }
fa46c6fb5d61b1 drivers/nvme/host/pci.c Keith Busch 2020-02-13 1494
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1495 static int nvme_cmb_qdepth(struct nvme_dev *dev, int nr_io_queues,
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1496 int entry_size)
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1497 {
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1498 int q_depth = dev->q_depth;
5fd4ce1b005bd6 drivers/nvme/host/pci.c Christoph Hellwig 2015-11-28 1499 unsigned q_size_aligned = roundup(q_depth * entry_size,
6c3c05b087ada8 drivers/nvme/host/pci.c Chaitanya Kulkarni 2020-07-16 1500 NVME_CTRL_PAGE_SIZE);
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1501
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1502 if (q_size_aligned * nr_io_queues > dev->cmb_size) {
c45f5c9943ce0b drivers/block/nvme-core.c Jon Derrick 2015-07-21 1503 u64 mem_per_q = div_u64(dev->cmb_size, nr_io_queues);
4e523547e2bf75 drivers/nvme/host/pci.c Baolin Wang 2020-07-03 1504
6c3c05b087ada8 drivers/nvme/host/pci.c Chaitanya Kulkarni 2020-07-16 1505 mem_per_q = round_down(mem_per_q, NVME_CTRL_PAGE_SIZE);
c45f5c9943ce0b drivers/block/nvme-core.c Jon Derrick 2015-07-21 1506 q_depth = div_u64(mem_per_q, entry_size);
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1507
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1508 /*
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1509 * Ensure the reduced q_depth is above some threshold where it
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1510 * would be better to map queues in system memory with the
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1511 * original depth
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1512 */
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1513 if (q_depth < 64)
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1514 return -ENOMEM;
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1515 }
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1516
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1517 return q_depth;
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1518 }
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1519
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1520 static int nvme_pci_alloc_sq_cmds(struct nvme_dev *dev, struct nvme_queue *nvmeq,
8a1d09a668e7e2 drivers/nvme/host/pci.c Benjamin Herrenschmidt 2019-08-07 1521 int qid)
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1522 {
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1523 struct pci_dev *pdev = nvme_pci_dev(dev);
815c6704bf9f1c drivers/nvme/host/pci.c Keith Busch 2018-02-13 1524
165d0510c2356e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1525 if (pdev && qid && dev->cmb_use_sqes && (dev->cmbsz & NVME_CMBSZ_SQS)) {
8a1d09a668e7e2 drivers/nvme/host/pci.c Benjamin Herrenschmidt 2019-08-07 1526 nvmeq->sq_cmds = pci_alloc_p2pmem(pdev, SQ_SIZE(nvmeq));
bfac8e9f55cf62 drivers/nvme/host/pci.c Alan Mikhak 2019-07-08 1527 if (nvmeq->sq_cmds) {
0f238ff5cc9255 drivers/nvme/host/pci.c Logan Gunthorpe 2018-10-04 1528 nvmeq->sq_dma_addr = pci_p2pmem_virt_to_bus(pdev,
0f238ff5cc9255 drivers/nvme/host/pci.c Logan Gunthorpe 2018-10-04 1529 nvmeq->sq_cmds);
6322307809649c drivers/nvme/host/pci.c Christoph Hellwig 2018-12-02 1530 if (nvmeq->sq_dma_addr) {
6322307809649c drivers/nvme/host/pci.c Christoph Hellwig 2018-12-02 1531 set_bit(NVMEQ_SQ_CMB, &nvmeq->flags);
6322307809649c drivers/nvme/host/pci.c Christoph Hellwig 2018-12-02 1532 return 0;
6322307809649c drivers/nvme/host/pci.c Christoph Hellwig 2018-12-02 1533 }
bfac8e9f55cf62 drivers/nvme/host/pci.c Alan Mikhak 2019-07-08 1534
8a1d09a668e7e2 drivers/nvme/host/pci.c Benjamin Herrenschmidt 2019-08-07 1535 pci_free_p2pmem(pdev, nvmeq->sq_cmds, SQ_SIZE(nvmeq));
bfac8e9f55cf62 drivers/nvme/host/pci.c Alan Mikhak 2019-07-08 1536 }
0f238ff5cc9255 drivers/nvme/host/pci.c Logan Gunthorpe 2018-10-04 1537 }
815c6704bf9f1c drivers/nvme/host/pci.c Keith Busch 2018-02-13 1538
8a1d09a668e7e2 drivers/nvme/host/pci.c Benjamin Herrenschmidt 2019-08-07 1539 nvmeq->sq_cmds = dma_alloc_coherent(dev->dev, SQ_SIZE(nvmeq),
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1540 &nvmeq->sq_dma_addr, GFP_KERNEL);
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1541 if (!nvmeq->sq_cmds)
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1542 return -ENOMEM;
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1543 return 0;
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1544 }
8ffaadf7429270 drivers/block/nvme-core.c Jon Derrick 2015-07-20 1545
a6ff7262c26c19 drivers/nvme/host/pci.c Keith Busch 2018-04-12 1546 static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth)
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1547 {
147b27e4bd0840 drivers/nvme/host/pci.c Sagi Grimberg 2018-01-14 1548 struct nvme_queue *nvmeq = &dev->queues[qid];
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1549
62314e405fa101 drivers/nvme/host/pci.c Keith Busch 2018-01-23 1550 if (dev->ctrl.queue_count > qid)
62314e405fa101 drivers/nvme/host/pci.c Keith Busch 2018-01-23 1551 return 0;
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1552
c1e0cc7e1d3199 drivers/nvme/host/pci.c Benjamin Herrenschmidt 2019-08-07 1553 nvmeq->sqes = qid ? dev->io_sqes : NVME_ADM_SQES;
8a1d09a668e7e2 drivers/nvme/host/pci.c Benjamin Herrenschmidt 2019-08-07 1554 nvmeq->q_depth = depth;
8a1d09a668e7e2 drivers/nvme/host/pci.c Benjamin Herrenschmidt 2019-08-07 1555 nvmeq->cqes = dma_alloc_coherent(dev->dev, CQ_SIZE(nvmeq),
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1556 &nvmeq->cq_dma_addr, GFP_KERNEL);
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1557 if (!nvmeq->cqes)
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1558 goto free_nvmeq;
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1559
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1560 if (nvme_pci_alloc_sq_cmds(dev, nvmeq, qid))
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1561 goto free_cqdma;
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1562
091b609258b8e0 drivers/block/nvme.c Matthew Wilcox 2011-02-10 1563 nvmeq->dev = dev;
1ab0cd6966fc4a drivers/nvme/host/pci.c Jens Axboe 2018-05-17 1564 spin_lock_init(&nvmeq->sq_lock);
3a7afd8ee42a68 drivers/nvme/host/pci.c Christoph Hellwig 2018-12-02 1565 spin_lock_init(&nvmeq->cq_poll_lock);
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1566 nvmeq->cq_head = 0;
821234603b265f drivers/block/nvme.c Matthew Wilcox 2011-01-20 1567 nvmeq->cq_phase = 1;
b80d5ccca3a012 drivers/block/nvme-core.c Haiyan Hu 2013-09-10 1568 nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride];
c30341dc3c436c drivers/block/nvme-core.c Keith Busch 2013-12-10 1569 nvmeq->qid = qid;
d858e5f04e58a4 drivers/nvme/host/pci.c Sagi Grimberg 2017-04-24 1570 dev->ctrl.queue_count++;
36a7e993eedb2c drivers/block/nvme-core.c Jon Derrick 2015-05-27 1571
147b27e4bd0840 drivers/nvme/host/pci.c Sagi Grimberg 2018-01-14 1572 return 0;
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1573
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1574 free_cqdma:
8a1d09a668e7e2 drivers/nvme/host/pci.c Benjamin Herrenschmidt 2019-08-07 1575 dma_free_coherent(dev->dev, CQ_SIZE(nvmeq), (void *)nvmeq->cqes,
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1576 nvmeq->cq_dma_addr);
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1577 free_nvmeq:
147b27e4bd0840 drivers/nvme/host/pci.c Sagi Grimberg 2018-01-14 1578 return -ENOMEM;
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1579 }
b60503ba432b16 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1580
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1581 static int nvme_queue_request_irq(struct nvme_queue *nvmeq)
3001082cac4bf6 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1582 {
d34fe42db54c5c drivers/nvme/host/pci.c Arnd Bergmann 2021-02-11 1583 struct pci_dev *pdev = nvme_pci_dev(nvmeq->dev);
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1584 irq_handler_t handler, thread_fn;
0ff199cb48b4af drivers/nvme/host/pci.c Christoph Hellwig 2017-04-13 1585 int nr = nvmeq->dev->ctrl.instance;
0ff199cb48b4af drivers/nvme/host/pci.c Christoph Hellwig 2017-04-13 1586
0ff199cb48b4af drivers/nvme/host/pci.c Christoph Hellwig 2017-04-13 1587 if (use_threaded_interrupts) {
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1588 handler = nvme_irq_check;
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1589 thread_fn = nvme_irq;
0ff199cb48b4af drivers/nvme/host/pci.c Christoph Hellwig 2017-04-13 1590 } else {
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1591 handler = nvme_irq;
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1592 thread_fn = NULL;
0ff199cb48b4af drivers/nvme/host/pci.c Christoph Hellwig 2017-04-13 1593 }
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1594
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1595 if (pdev)
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 @1596 return pci_request_irq(pdev, nvmeq->cq_vector, handler,
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1597 thread_fn, nvmeq, "nvme%dq%d", nr,
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1598 nvmeq->qid);
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1599
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1600 return request_threaded_irq(nvmeq->dev->platform_irq, handler,
daa71369c9422e drivers/nvme/host/pci.c Arnd Bergmann 2021-02-13 1601 thread_fn, 0, "nvme", nvmeq);
3001082cac4bf6 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1602 }
3001082cac4bf6 drivers/block/nvme.c Matthew Wilcox 2011-01-20 1603
:::::: The code at line 1432 was first introduced by commit
:::::: d34fe42db54c5cbd0487d559c90ad11d146c8546 nvme: pci: rename pci specific functions
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Arnd Bergmann <arnd(a)arndb.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[linux-next:master 8485/11103] drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:5: warning: no previous prototype for function 'mlx5e_tc_tun_update_header_ipv6'
by kernel test robot
Hi Vlad,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 07f7e57c63aaa2afb4ea31edef05e08699a63a00
commit: c7b9038d8af68e351e09a8427fa0264be8dc811f [8485/11103] net/mlx5e: TC preparation refactoring for routing update event
config: x86_64-randconfig-r023-20210214 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# 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 c7b9038d8af68e351e09a8427fa0264be8dc811f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:45:
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_tc.h:40:
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:5: warning: no previous prototype for function 'mlx5e_tc_tun_update_header_ipv6' [-Wmissing-prototypes]
int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
^
static
1 warning generated.
--
In file included from drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:41:
drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:34:1: warning: no previous prototype for function 'mlx5_esw_indir_table_init' [-Wmissing-prototypes]
mlx5_esw_indir_table_init(void)
^
drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:33:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct mlx5_esw_indir_table *
^
static
drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:40:1: warning: no previous prototype for function 'mlx5_esw_indir_table_destroy' [-Wmissing-prototypes]
mlx5_esw_indir_table_destroy(struct mlx5_esw_indir_table *indir)
^
drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:39:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:61:1: warning: no previous prototype for function 'mlx5_esw_indir_table_needed' [-Wmissing-prototypes]
mlx5_esw_indir_table_needed(struct mlx5_eswitch *esw,
^
drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:60:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool
^
static
In file included from drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:50:
In file included from drivers/net/ethernet/mellanox/mlx5/core/en_tc.h:40:
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:5: warning: no previous prototype for function 'mlx5e_tc_tun_update_header_ipv6' [-Wmissing-prototypes]
int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
^
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
^
static
4 warnings generated.
vim +/mlx5e_tc_tun_update_header_ipv6 +78 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
53
54 int mlx5e_tc_tun_init_encap_attr(struct net_device *tunnel_dev,
55 struct mlx5e_priv *priv,
56 struct mlx5e_encap_entry *e,
57 struct netlink_ext_ack *extack);
58
59 int mlx5e_tc_tun_create_header_ipv4(struct mlx5e_priv *priv,
60 struct net_device *mirred_dev,
61 struct mlx5e_encap_entry *e);
62 int mlx5e_tc_tun_update_header_ipv4(struct mlx5e_priv *priv,
63 struct net_device *mirred_dev,
64 struct mlx5e_encap_entry *e);
65
66 #if IS_ENABLED(CONFIG_INET) && IS_ENABLED(CONFIG_IPV6)
67 int mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv,
68 struct net_device *mirred_dev,
69 struct mlx5e_encap_entry *e);
70 int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
71 struct net_device *mirred_dev,
72 struct mlx5e_encap_entry *e);
73 #else
74 static inline int
75 mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv,
76 struct net_device *mirred_dev,
77 struct mlx5e_encap_entry *e) { return -EOPNOTSUPP; }
> 78 int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
79 struct net_device *mirred_dev,
80 struct mlx5e_encap_entry *e)
81 { return -EOPNOTSUPP; }
82 #endif
83 int mlx5e_tc_tun_route_lookup(struct mlx5e_priv *priv,
84 struct mlx5_flow_spec *spec,
85 struct mlx5_flow_attr *attr);
86
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[freescale-fslc:pr/257 8321/17025] drivers/spi/spi-nxp-fspi.c:1193:12: error: 'nxp_fspi_pm_ops' undeclared here (not in a function); did you mean
by kernel test robot
Hi Han,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc pr/257
head: 5df3672236fb7ca1b04a8e8fa65bf039400b5020
commit: 2c4cf9ce2fcf9581d6625025b76ae73f77dde922 [8321/17025] MLK-23644: spi: spi-nxp-fspi: enable runtime pm for fspi
config: openrisc-randconfig-r006-20210214 (attached as .config)
compiler: or1k-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/Freescale/linux-fslc/commit/2c4cf9ce2fcf9581d6625025b7...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/257
git checkout 2c4cf9ce2fcf9581d6625025b76ae73f77dde922
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc
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 >>):
>> drivers/spi/spi-nxp-fspi.c:1193:12: error: 'nxp_fspi_pm_ops' undeclared here (not in a function); did you mean 'nxp_fspi_mem_ops'?
1193 | .pm = &nxp_fspi_pm_ops,
| ^~~~~~~~~~~~~~~
| nxp_fspi_mem_ops
vim +1193 drivers/spi/spi-nxp-fspi.c
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1188
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1189 static struct platform_driver nxp_fspi_driver = {
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1190 .driver = {
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1191 .name = "nxp-fspi",
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1192 .of_match_table = nxp_fspi_dt_ids,
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 @1193 .pm = &nxp_fspi_pm_ops,
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1194 },
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1195 .probe = nxp_fspi_probe,
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1196 .remove = nxp_fspi_remove,
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1197 };
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1198 module_platform_driver(nxp_fspi_driver);
a5356aef6a907c2 Yogesh Narayan Gaur 2019-01-15 1199
:::::: The code at line 1193 was first introduced by commit
:::::: a5356aef6a907c2e2aed0caaa2b88b6021394471 spi: spi-mem: Add driver for NXP FlexSPI controller
:::::: TO: Yogesh Narayan Gaur <yogeshnarayan.gaur(a)nxp.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[freescale-fslc:pr/257 15408/17025] drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:79:17: error: no previous prototype for 'viv_gem_prime_export'
by kernel test robot
tree: https://github.com/Freescale/linux-fslc pr/257
head: 5df3672236fb7ca1b04a8e8fa65bf039400b5020
commit: 0cbc4419bd2f810d1689d81f24884bb527bbe5fd [15408/17025] MGS-4929 [#imx-2382] enable vivante drm for linux build
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/Freescale/linux-fslc/commit/0cbc4419bd2f810d1689d81f24...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/257
git checkout 0cbc4419bd2f810d1689d81f24884bb527bbe5fd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>):
cc1: error: arch/arm/mm: No such file or directory [-Werror=missing-include-dirs]
>> drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:79:17: error: no previous prototype for 'viv_gem_prime_export' [-Werror=missing-prototypes]
79 | struct dma_buf *viv_gem_prime_export(struct drm_gem_object *gem_obj,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:103:24: error: no previous prototype for 'viv_gem_prime_import' [-Werror=missing-prototypes]
103 | struct drm_gem_object *viv_gem_prime_import(struct drm_device *drm,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:145:6: error: no previous prototype for 'viv_gem_free_object' [-Werror=missing-prototypes]
145 | void viv_gem_free_object(struct drm_gem_object *gem_obj)
| ^~~~~~~~~~~~~~~~~~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: In function 'viv_ioctl_gem_create':
>> drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:166:9: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
166 | int ret = 0;
| ^~~
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c: At top level:
>> drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:739:5: error: no previous prototype for 'viv_drm_open' [-Werror=missing-prototypes]
739 | int viv_drm_open(struct drm_device *drm, struct drm_file *file)
| ^~~~~~~~~~~~
>> drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:759:6: error: no previous prototype for 'viv_drm_postclose' [-Werror=missing-prototypes]
759 | void viv_drm_postclose(struct drm_device *drm, struct drm_file *file)
| ^~~~~~~~~~~~~~~~~
>> drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:814:5: error: no previous prototype for 'viv_drm_probe' [-Werror=missing-prototypes]
814 | int viv_drm_probe(struct device *dev)
| ^~~~~~~~~~~~~
>> drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c:856:5: error: no previous prototype for 'viv_drm_remove' [-Werror=missing-prototypes]
856 | int viv_drm_remove(struct device *dev)
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/viv_gem_prime_export +79 drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c
30638182fdab7c Xianzhong 2019-01-29 77
9821cda5105e7d Richard Liu 2019-12-25 78 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0)
9821cda5105e7d Richard Liu 2019-12-25 @79 struct dma_buf *viv_gem_prime_export(struct drm_gem_object *gem_obj,
9821cda5105e7d Richard Liu 2019-12-25 80 int flags)
9821cda5105e7d Richard Liu 2019-12-25 81 {
9821cda5105e7d Richard Liu 2019-12-25 82 struct drm_device *drm = gem_obj->dev;
9821cda5105e7d Richard Liu 2019-12-25 83 #else
30638182fdab7c Xianzhong 2019-01-29 84 struct dma_buf *viv_gem_prime_export(struct drm_device *drm,
30638182fdab7c Xianzhong 2019-01-29 85 struct drm_gem_object *gem_obj,
30638182fdab7c Xianzhong 2019-01-29 86 int flags)
30638182fdab7c Xianzhong 2019-01-29 87 {
9821cda5105e7d Richard Liu 2019-12-25 88 #endif
30638182fdab7c Xianzhong 2019-01-29 89 struct viv_gem_object *viv_obj = container_of(gem_obj, struct viv_gem_object, base);
30638182fdab7c Xianzhong 2019-01-29 90 struct dma_buf *dmabuf = gcvNULL;
30638182fdab7c Xianzhong 2019-01-29 91 gckGALDEVICE gal_dev = (gckGALDEVICE)drm->dev_private;
30638182fdab7c Xianzhong 2019-01-29 92
30638182fdab7c Xianzhong 2019-01-29 93 if (gal_dev)
30638182fdab7c Xianzhong 2019-01-29 94 {
30638182fdab7c Xianzhong 2019-01-29 95 gckKERNEL kernel = gal_dev->device->map[gal_dev->device->defaultHwType].kernels[0];
e9371a70921300 Minjie Zhuang 2019-09-23 96 gcmkVERIFY_OK(gckVIDMEM_NODE_Export(kernel, viv_obj->node_object, flags,
30638182fdab7c Xianzhong 2019-01-29 97 (gctPOINTER*)&dmabuf, gcvNULL));
30638182fdab7c Xianzhong 2019-01-29 98 }
30638182fdab7c Xianzhong 2019-01-29 99
30638182fdab7c Xianzhong 2019-01-29 100 return dmabuf;
30638182fdab7c Xianzhong 2019-01-29 101 }
30638182fdab7c Xianzhong 2019-01-29 102
30638182fdab7c Xianzhong 2019-01-29 @103 struct drm_gem_object *viv_gem_prime_import(struct drm_device *drm,
30638182fdab7c Xianzhong 2019-01-29 104 struct dma_buf *dmabuf)
30638182fdab7c Xianzhong 2019-01-29 105 {
30638182fdab7c Xianzhong 2019-01-29 106 struct drm_gem_object *gem_obj = gcvNULL;
30638182fdab7c Xianzhong 2019-01-29 107 struct viv_gem_object *viv_obj;
30638182fdab7c Xianzhong 2019-01-29 108
30638182fdab7c Xianzhong 2019-01-29 109 gcsHAL_INTERFACE iface;
30638182fdab7c Xianzhong 2019-01-29 110 gckGALDEVICE gal_dev;
30638182fdab7c Xianzhong 2019-01-29 111 gckKERNEL kernel;
30638182fdab7c Xianzhong 2019-01-29 112 gctUINT32 processID;
30638182fdab7c Xianzhong 2019-01-29 113 gckVIDMEM_NODE nodeObject;
30638182fdab7c Xianzhong 2019-01-29 114 gceSTATUS status = gcvSTATUS_OK;
30638182fdab7c Xianzhong 2019-01-29 115
30638182fdab7c Xianzhong 2019-01-29 116 gal_dev = (gckGALDEVICE)drm->dev_private;
30638182fdab7c Xianzhong 2019-01-29 117 if (!gal_dev)
30638182fdab7c Xianzhong 2019-01-29 118 {
30638182fdab7c Xianzhong 2019-01-29 119 gcmkONERROR(gcvSTATUS_INVALID_ARGUMENT);
30638182fdab7c Xianzhong 2019-01-29 120 }
30638182fdab7c Xianzhong 2019-01-29 121
30638182fdab7c Xianzhong 2019-01-29 122 gckOS_ZeroMemory(&iface, sizeof(iface));
30638182fdab7c Xianzhong 2019-01-29 123 iface.command = gcvHAL_WRAP_USER_MEMORY;
30638182fdab7c Xianzhong 2019-01-29 124 iface.hardwareType = gal_dev->device->defaultHwType;
30638182fdab7c Xianzhong 2019-01-29 125 iface.u.WrapUserMemory.desc.flag = gcvALLOC_FLAG_DMABUF;
30638182fdab7c Xianzhong 2019-01-29 126 iface.u.WrapUserMemory.desc.handle = -1;
30638182fdab7c Xianzhong 2019-01-29 127 iface.u.WrapUserMemory.desc.dmabuf = gcmPTR_TO_UINT64(dmabuf);
30638182fdab7c Xianzhong 2019-01-29 128 gcmkONERROR(gckDEVICE_Dispatch(gal_dev->device, &iface));
30638182fdab7c Xianzhong 2019-01-29 129
30638182fdab7c Xianzhong 2019-01-29 130 kernel = gal_dev->device->map[gal_dev->device->defaultHwType].kernels[0];
30638182fdab7c Xianzhong 2019-01-29 131 gcmkONERROR(gckOS_GetProcessID(&processID));
30638182fdab7c Xianzhong 2019-01-29 132 gcmkONERROR(gckVIDMEM_HANDLE_Lookup(kernel, processID, iface.u.WrapUserMemory.node, &nodeObject));
30638182fdab7c Xianzhong 2019-01-29 133
30638182fdab7c Xianzhong 2019-01-29 134 /* ioctl output */
30638182fdab7c Xianzhong 2019-01-29 135 gem_obj = kzalloc(sizeof(struct viv_gem_object), GFP_KERNEL);
30638182fdab7c Xianzhong 2019-01-29 136 drm_gem_private_object_init(drm, gem_obj, dmabuf->size);
30638182fdab7c Xianzhong 2019-01-29 137 viv_obj = container_of(gem_obj, struct viv_gem_object, base);
30638182fdab7c Xianzhong 2019-01-29 138 viv_obj->node_handle = iface.u.WrapUserMemory.node;
30638182fdab7c Xianzhong 2019-01-29 139 viv_obj->node_object = nodeObject;
30638182fdab7c Xianzhong 2019-01-29 140
30638182fdab7c Xianzhong 2019-01-29 141 OnError:
30638182fdab7c Xianzhong 2019-01-29 142 return gem_obj;
30638182fdab7c Xianzhong 2019-01-29 143 }
30638182fdab7c Xianzhong 2019-01-29 144
30638182fdab7c Xianzhong 2019-01-29 @145 void viv_gem_free_object(struct drm_gem_object *gem_obj)
30638182fdab7c Xianzhong 2019-01-29 146 {
30638182fdab7c Xianzhong 2019-01-29 147 struct viv_gem_object *viv_obj = container_of(gem_obj, struct viv_gem_object, base);
30638182fdab7c Xianzhong 2019-01-29 148 struct drm_device *drm = gem_obj->dev;
30638182fdab7c Xianzhong 2019-01-29 149
30638182fdab7c Xianzhong 2019-01-29 150 gcsHAL_INTERFACE iface;
30638182fdab7c Xianzhong 2019-01-29 151 gckGALDEVICE gal_dev = (gckGALDEVICE)drm->dev_private;
30638182fdab7c Xianzhong 2019-01-29 152
30638182fdab7c Xianzhong 2019-01-29 153 gckOS_ZeroMemory(&iface, sizeof(iface));
30638182fdab7c Xianzhong 2019-01-29 154 iface.command = gcvHAL_RELEASE_VIDEO_MEMORY;
30638182fdab7c Xianzhong 2019-01-29 155 iface.hardwareType = gal_dev->device->defaultHwType;
30638182fdab7c Xianzhong 2019-01-29 156 iface.u.ReleaseVideoMemory.node = viv_obj->node_handle;
30638182fdab7c Xianzhong 2019-01-29 157 gcmkVERIFY_OK(gckDEVICE_Dispatch(gal_dev->device, &iface));
30638182fdab7c Xianzhong 2019-01-29 158
30638182fdab7c Xianzhong 2019-01-29 159 drm_gem_object_release(gem_obj);
30638182fdab7c Xianzhong 2019-01-29 160 kfree(gem_obj);
30638182fdab7c Xianzhong 2019-01-29 161 }
30638182fdab7c Xianzhong 2019-01-29 162
30638182fdab7c Xianzhong 2019-01-29 163 static int viv_ioctl_gem_create(struct drm_device *drm, void *data,
30638182fdab7c Xianzhong 2019-01-29 164 struct drm_file *file)
30638182fdab7c Xianzhong 2019-01-29 165 {
30638182fdab7c Xianzhong 2019-01-29 @166 int ret = 0;
30638182fdab7c Xianzhong 2019-01-29 167 struct drm_viv_gem_create *args = (struct drm_viv_gem_create*)data;
30638182fdab7c Xianzhong 2019-01-29 168 struct drm_gem_object *gem_obj = gcvNULL;
30638182fdab7c Xianzhong 2019-01-29 169 struct viv_gem_object *viv_obj = gcvNULL;
30638182fdab7c Xianzhong 2019-01-29 170
30638182fdab7c Xianzhong 2019-01-29 171 gcsHAL_INTERFACE iface;
30638182fdab7c Xianzhong 2019-01-29 172 gckGALDEVICE gal_dev;
30638182fdab7c Xianzhong 2019-01-29 173 gckKERNEL kernel;
30638182fdab7c Xianzhong 2019-01-29 174 gctUINT32 processID;
30638182fdab7c Xianzhong 2019-01-29 175 gckVIDMEM_NODE nodeObject;
30638182fdab7c Xianzhong 2019-01-29 176 gctUINT32 flags = gcvALLOC_FLAG_DMABUF_EXPORTABLE;
30638182fdab7c Xianzhong 2019-01-29 177 gceSTATUS status = gcvSTATUS_OK;
e9371a70921300 Minjie Zhuang 2019-09-23 178 gctUINT64 alignSize = PAGE_ALIGN(args->size);
30638182fdab7c Xianzhong 2019-01-29 179
30638182fdab7c Xianzhong 2019-01-29 180 gal_dev = (gckGALDEVICE)drm->dev_private;
30638182fdab7c Xianzhong 2019-01-29 181 if (!gal_dev)
30638182fdab7c Xianzhong 2019-01-29 182 {
30638182fdab7c Xianzhong 2019-01-29 183 gcmkONERROR(gcvSTATUS_INVALID_ARGUMENT);
30638182fdab7c Xianzhong 2019-01-29 184 }
30638182fdab7c Xianzhong 2019-01-29 185
30638182fdab7c Xianzhong 2019-01-29 186 if (args->flags & DRM_VIV_GEM_CONTIGUOUS)
30638182fdab7c Xianzhong 2019-01-29 187 {
30638182fdab7c Xianzhong 2019-01-29 188 flags |= gcvALLOC_FLAG_CONTIGUOUS;
30638182fdab7c Xianzhong 2019-01-29 189 }
30638182fdab7c Xianzhong 2019-01-29 190 if (args->flags & DRM_VIV_GEM_CACHED)
30638182fdab7c Xianzhong 2019-01-29 191 {
30638182fdab7c Xianzhong 2019-01-29 192 flags |= gcvALLOC_FLAG_CACHEABLE;
30638182fdab7c Xianzhong 2019-01-29 193 }
30638182fdab7c Xianzhong 2019-01-29 194 if (args->flags & DRM_VIV_GEM_SECURE)
30638182fdab7c Xianzhong 2019-01-29 195 {
30638182fdab7c Xianzhong 2019-01-29 196 flags |= gcvALLOC_FLAG_SECURITY;
30638182fdab7c Xianzhong 2019-01-29 197 }
30638182fdab7c Xianzhong 2019-01-29 198 if (args->flags & DRM_VIV_GEM_CMA_LIMIT)
30638182fdab7c Xianzhong 2019-01-29 199 {
30638182fdab7c Xianzhong 2019-01-29 200 flags |= gcvALLOC_FLAG_CMA_LIMIT;
30638182fdab7c Xianzhong 2019-01-29 201 }
30638182fdab7c Xianzhong 2019-01-29 202
30638182fdab7c Xianzhong 2019-01-29 203 gckOS_ZeroMemory(&iface, sizeof(iface));
30638182fdab7c Xianzhong 2019-01-29 204 iface.command = gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY;
30638182fdab7c Xianzhong 2019-01-29 205 iface.hardwareType = gal_dev->device->defaultHwType;
e9371a70921300 Minjie Zhuang 2019-09-23 206 iface.u.AllocateLinearVideoMemory.bytes = alignSize;
30638182fdab7c Xianzhong 2019-01-29 207 iface.u.AllocateLinearVideoMemory.alignment = 256;
e9371a70921300 Minjie Zhuang 2019-09-23 208 iface.u.AllocateLinearVideoMemory.type = gcvVIDMEM_TYPE_GENERIC;
30638182fdab7c Xianzhong 2019-01-29 209 iface.u.AllocateLinearVideoMemory.flag = flags;
e9371a70921300 Minjie Zhuang 2019-09-23 210 iface.u.AllocateLinearVideoMemory.pool = gcvPOOL_DEFAULT;
30638182fdab7c Xianzhong 2019-01-29 211 gcmkONERROR(gckDEVICE_Dispatch(gal_dev->device, &iface));
30638182fdab7c Xianzhong 2019-01-29 212
30638182fdab7c Xianzhong 2019-01-29 213 kernel = gal_dev->device->map[gal_dev->device->defaultHwType].kernels[0];
30638182fdab7c Xianzhong 2019-01-29 214 gcmkONERROR(gckOS_GetProcessID(&processID));
30638182fdab7c Xianzhong 2019-01-29 215 gcmkONERROR(gckVIDMEM_HANDLE_Lookup(kernel, processID, iface.u.AllocateLinearVideoMemory.node, &nodeObject));
30638182fdab7c Xianzhong 2019-01-29 216
30638182fdab7c Xianzhong 2019-01-29 217 /* ioctl output */
30638182fdab7c Xianzhong 2019-01-29 218 gem_obj = kzalloc(sizeof(struct viv_gem_object), GFP_KERNEL);
e9371a70921300 Minjie Zhuang 2019-09-23 219 drm_gem_private_object_init(drm, gem_obj, (size_t)alignSize);
30638182fdab7c Xianzhong 2019-01-29 220 ret = drm_gem_handle_create(file, gem_obj, &args->handle);
30638182fdab7c Xianzhong 2019-01-29 221
30638182fdab7c Xianzhong 2019-01-29 222 viv_obj = container_of(gem_obj, struct viv_gem_object, base);
30638182fdab7c Xianzhong 2019-01-29 223 viv_obj->node_handle = iface.u.AllocateLinearVideoMemory.node;
30638182fdab7c Xianzhong 2019-01-29 224 viv_obj->node_object = nodeObject;
30638182fdab7c Xianzhong 2019-01-29 225 viv_obj->cacheable = flags & gcvALLOC_FLAG_CACHEABLE;
30638182fdab7c Xianzhong 2019-01-29 226
30638182fdab7c Xianzhong 2019-01-29 227 /* drop reference from allocate - handle holds it now */
30638182fdab7c Xianzhong 2019-01-29 228 drm_gem_object_unreference_unlocked(gem_obj);
30638182fdab7c Xianzhong 2019-01-29 229
30638182fdab7c Xianzhong 2019-01-29 230 OnError:
30638182fdab7c Xianzhong 2019-01-29 231 return gcmIS_ERROR(status) ? -ENOTTY : 0;
30638182fdab7c Xianzhong 2019-01-29 232 }
30638182fdab7c Xianzhong 2019-01-29 233
:::::: The code at line 79 was first introduced by commit
:::::: 9821cda5105e7d6bf026a4f21f927745a3f6b931 MA-16168 [#imx-1903] Fix GPU driver build error and not work issue on 5.4 kernel
:::::: TO: Richard Liu <xuegang.liu(a)nxp.com>
:::::: CC: Xianzhong <xianzhong.li(a)nxp.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH net-next v2 7/7] mld: convert ifmcaddr6 to RCU
by kernel test robot
Hi Taehee,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Taehee-Yoo/mld-change-context-fr...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 3c5a2fd042d0bfac71a2dfb99515723d318df47b
config: x86_64-randconfig-s022-20210214 (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/05d3b96bdcaec52bc3f2ef1f96e571dc1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Taehee-Yoo/mld-change-context-from-atomic-to-sleepable/20210214-015930
git checkout 05d3b96bdcaec52bc3f2ef1f96e571dc17bf9f5a
# 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 >>)"
>> net/ipv6/mcast.c:764:44: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 *[assigned] pmc @@ got struct ifmcaddr6 [noderef] __rcu *next @@
net/ipv6/mcast.c:764:44: sparse: expected struct ifmcaddr6 *[assigned] pmc
net/ipv6/mcast.c:764:44: sparse: got struct ifmcaddr6 [noderef] __rcu *next
>> net/ipv6/mcast.c:773:39: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 *mc_tomb @@ got struct ifmcaddr6 [noderef] __rcu *next @@
net/ipv6/mcast.c:773:39: sparse: expected struct ifmcaddr6 *mc_tomb
net/ipv6/mcast.c:773:39: sparse: got struct ifmcaddr6 [noderef] __rcu *next
net/ipv6/mcast.c:781:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu *__tmp @@ got struct ip6_sf_list * @@
net/ipv6/mcast.c:781:35: sparse: expected struct ip6_sf_list [noderef] __rcu *__tmp
net/ipv6/mcast.c:781:35: sparse: got struct ip6_sf_list *
net/ipv6/mcast.c:781:33: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *sources @@ got struct ip6_sf_list [noderef] __rcu *__tmp @@
net/ipv6/mcast.c:781:33: sparse: expected struct ip6_sf_list *sources
net/ipv6/mcast.c:781:33: sparse: got struct ip6_sf_list [noderef] __rcu *__tmp
>> net/ipv6/mcast.c:804:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 *nextpmc @@ got struct ifmcaddr6 [noderef] __rcu *next @@
net/ipv6/mcast.c:804:25: sparse: expected struct ifmcaddr6 *nextpmc
net/ipv6/mcast.c:804:25: sparse: got struct ifmcaddr6 [noderef] __rcu *next
net/ipv6/mcast.c:2301:43: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *[assigned] dpsf @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:2301:43: sparse: expected struct ip6_sf_list *[assigned] dpsf
net/ipv6/mcast.c:2301:43: sparse: got struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:2311:63: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *mca_tomb @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:2311:63: sparse: expected struct ip6_sf_list *mca_tomb
net/ipv6/mcast.c:2311:63: sparse: got struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:2323:63: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *[assigned] dpsf @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:2323:63: sparse: expected struct ip6_sf_list *[assigned] dpsf
net/ipv6/mcast.c:2323:63: sparse: got struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:2332:47: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu *sf_next @@ got struct ip6_sf_list *mca_tomb @@
net/ipv6/mcast.c:2332:47: sparse: expected struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:2332:47: sparse: got struct ip6_sf_list *mca_tomb
net/ipv6/mcast.c:2410:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *nextpsf @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:2410:25: sparse: expected struct ip6_sf_list *nextpsf
net/ipv6/mcast.c:2410:25: sparse: got struct ip6_sf_list [noderef] __rcu *sf_next
net/ipv6/mcast.c:449:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/mcast.c:449:17: sparse: struct ip6_sf_socklist [noderef] __rcu *
net/ipv6/mcast.c:449:17: sparse: struct ip6_sf_socklist *
>> net/ipv6/mcast.c:935:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 [noderef] __rcu * @@ got struct ifmcaddr6 * @@
net/ipv6/mcast.c: note: in included file:
include/net/mld.h:32:43: sparse: sparse: array of flexible structures
net/ipv6/mcast.c:1777:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu * @@ got struct ip6_sf_list * @@
net/ipv6/mcast.c:1833:51: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu * @@ got struct ip6_sf_list * @@
net/ipv6/mcast.c:1901:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/mcast.c:1901:20: sparse: struct ip6_sf_list [noderef] __rcu *
net/ipv6/mcast.c:1901:20: sparse: struct ip6_sf_list *
>> net/ipv6/mcast.c:1925:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 *pmc_next @@ got struct ifmcaddr6 [noderef] __rcu *next @@
net/ipv6/mcast.c:1925:26: sparse: expected struct ifmcaddr6 *pmc_next
net/ipv6/mcast.c:1925:26: sparse: got struct ifmcaddr6 [noderef] __rcu *next
net/ipv6/mcast.c:1940:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ip6_sf_list **ppsf @@ got struct ip6_sf_list [noderef] __rcu ** @@
net/ipv6/mcast.c:1940:50: sparse: expected struct ip6_sf_list **ppsf
net/ipv6/mcast.c:1940:50: sparse: got struct ip6_sf_list [noderef] __rcu **
>> net/ipv6/mcast.c:1946:48: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ifmcaddr6 [noderef] __rcu *next @@ got struct ifmcaddr6 *pmc_next @@
net/ipv6/mcast.c:1946:48: sparse: expected struct ifmcaddr6 [noderef] __rcu *next
net/ipv6/mcast.c:1946:48: sparse: got struct ifmcaddr6 *pmc_next
net/ipv6/mcast.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/mmzone.h, ...):
include/linux/rcupdate.h:700:9: sparse: sparse: context imbalance in 'ip6_mc_msfget' - unexpected unlock
vim +764 net/ipv6/mcast.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 756
1666d49e1d416f Hangbin Liu 2017-01-12 757 static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
^1da177e4c3f41 Linus Torvalds 2005-04-16 758 {
1666d49e1d416f Hangbin Liu 2017-01-12 759 struct in6_addr *pmca = &im->mca_addr;
50d689e601cc17 Taehee Yoo 2021-02-13 760 struct ip6_sf_list *psf, *sources;
50d689e601cc17 Taehee Yoo 2021-02-13 761 struct ifmcaddr6 *pmc, *pmc_prev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 762
^1da177e4c3f41 Linus Torvalds 2005-04-16 763 pmc_prev = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @764 for (pmc = idev->mc_tomb; pmc; pmc = pmc->next) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 765 if (ipv6_addr_equal(&pmc->mca_addr, pmca))
^1da177e4c3f41 Linus Torvalds 2005-04-16 766 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 767 pmc_prev = pmc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 768 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 769 if (pmc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 770 if (pmc_prev)
^1da177e4c3f41 Linus Torvalds 2005-04-16 771 pmc_prev->next = pmc->next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 772 else
^1da177e4c3f41 Linus Torvalds 2005-04-16 @773 idev->mc_tomb = pmc->next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 774 }
6457d26bd40077 Stephen Hemminger 2010-02-17 775
^1da177e4c3f41 Linus Torvalds 2005-04-16 776 if (pmc) {
1666d49e1d416f Hangbin Liu 2017-01-12 777 im->idev = pmc->idev;
08d3ffcc0cfaba Hangbin Liu 2018-07-20 778 if (im->mca_sfmode == MCAST_INCLUDE) {
a84d016479896b Eric Dumazet 2019-08-27 779 swap(im->mca_tomb, pmc->mca_tomb);
50d689e601cc17 Taehee Yoo 2021-02-13 780
50d689e601cc17 Taehee Yoo 2021-02-13 781 sources = rcu_replace_pointer(im->mca_sources,
50d689e601cc17 Taehee Yoo 2021-02-13 782 pmc->mca_sources,
50d689e601cc17 Taehee Yoo 2021-02-13 783 lockdep_rtnl_is_held());
50d689e601cc17 Taehee Yoo 2021-02-13 784 rcu_assign_pointer(pmc->mca_sources, sources);
50d689e601cc17 Taehee Yoo 2021-02-13 785 for_each_psf_rtnl(im, psf)
c7ea20c9da5b94 Hangbin Liu 2018-07-10 786 psf->sf_crcount = idev->mc_qrv;
c7ea20c9da5b94 Hangbin Liu 2018-07-10 787 } else {
c7ea20c9da5b94 Hangbin Liu 2018-07-10 788 im->mca_crcount = idev->mc_qrv;
^1da177e4c3f41 Linus Torvalds 2005-04-16 789 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 790 in6_dev_put(pmc->idev);
a84d016479896b Eric Dumazet 2019-08-27 791 ip6_mc_clear_src(pmc);
9c8bb163ae784b Hangbin Liu 2017-02-08 792 kfree(pmc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 793 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 794 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 795
^1da177e4c3f41 Linus Torvalds 2005-04-16 796 static void mld_clear_delrec(struct inet6_dev *idev)
^1da177e4c3f41 Linus Torvalds 2005-04-16 797 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 798 struct ifmcaddr6 *pmc, *nextpmc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 799
^1da177e4c3f41 Linus Torvalds 2005-04-16 800 pmc = idev->mc_tomb;
^1da177e4c3f41 Linus Torvalds 2005-04-16 801 idev->mc_tomb = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 802
^1da177e4c3f41 Linus Torvalds 2005-04-16 803 for (; pmc; pmc = nextpmc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 @804 nextpmc = pmc->next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 805 ip6_mc_clear_src(pmc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 806 in6_dev_put(pmc->idev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 807 kfree(pmc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 808 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 809
^1da177e4c3f41 Linus Torvalds 2005-04-16 810 /* clear dead sources, too */
05d3b96bdcaec5 Taehee Yoo 2021-02-13 811 for_each_mc_rtnl(idev, pmc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 812 struct ip6_sf_list *psf, *psf_next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 813
^1da177e4c3f41 Linus Torvalds 2005-04-16 814 psf = pmc->mca_tomb;
^1da177e4c3f41 Linus Torvalds 2005-04-16 815 pmc->mca_tomb = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 816 for (; psf; psf = psf_next) {
50d689e601cc17 Taehee Yoo 2021-02-13 817 psf_next = rtnl_dereference(psf->sf_next);
50d689e601cc17 Taehee Yoo 2021-02-13 818 kfree_rcu(psf, rcu);
^1da177e4c3f41 Linus Torvalds 2005-04-16 819 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 820 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 821 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 822
1691c63ea42d6f WANG Cong 2014-09-11 823 static void mca_get(struct ifmcaddr6 *mc)
1691c63ea42d6f WANG Cong 2014-09-11 824 {
d3981bc615f652 Reshetova, Elena 2017-07-04 825 refcount_inc(&mc->mca_refcnt);
1691c63ea42d6f WANG Cong 2014-09-11 826 }
1691c63ea42d6f WANG Cong 2014-09-11 827
1691c63ea42d6f WANG Cong 2014-09-11 828 static void ma_put(struct ifmcaddr6 *mc)
1691c63ea42d6f WANG Cong 2014-09-11 829 {
d3981bc615f652 Reshetova, Elena 2017-07-04 830 if (refcount_dec_and_test(&mc->mca_refcnt)) {
1691c63ea42d6f WANG Cong 2014-09-11 831 in6_dev_put(mc->idev);
05d3b96bdcaec5 Taehee Yoo 2021-02-13 832 kfree_rcu(mc, rcu);
1691c63ea42d6f WANG Cong 2014-09-11 833 }
1691c63ea42d6f WANG Cong 2014-09-11 834 }
1691c63ea42d6f WANG Cong 2014-09-11 835
1691c63ea42d6f WANG Cong 2014-09-11 836 static struct ifmcaddr6 *mca_alloc(struct inet6_dev *idev,
c7ea20c9da5b94 Hangbin Liu 2018-07-10 837 const struct in6_addr *addr,
c7ea20c9da5b94 Hangbin Liu 2018-07-10 838 unsigned int mode)
1691c63ea42d6f WANG Cong 2014-09-11 839 {
1691c63ea42d6f WANG Cong 2014-09-11 840 struct ifmcaddr6 *mc;
1691c63ea42d6f WANG Cong 2014-09-11 841
05d3b96bdcaec5 Taehee Yoo 2021-02-13 842 mc = kzalloc(sizeof(*mc), GFP_KERNEL);
63159f29be1df7 Ian Morris 2015-03-29 843 if (!mc)
1691c63ea42d6f WANG Cong 2014-09-11 844 return NULL;
1691c63ea42d6f WANG Cong 2014-09-11 845
da82b573563d55 Taehee Yoo 2021-02-13 846 INIT_DELAYED_WORK(&mc->mca_work, mld_mca_work);
1691c63ea42d6f WANG Cong 2014-09-11 847
1691c63ea42d6f WANG Cong 2014-09-11 848 mc->mca_addr = *addr;
1691c63ea42d6f WANG Cong 2014-09-11 849 mc->idev = idev; /* reference taken by caller */
1691c63ea42d6f WANG Cong 2014-09-11 850 mc->mca_users = 1;
1691c63ea42d6f WANG Cong 2014-09-11 851 /* mca_stamp should be updated upon changes */
1691c63ea42d6f WANG Cong 2014-09-11 852 mc->mca_cstamp = mc->mca_tstamp = jiffies;
d3981bc615f652 Reshetova, Elena 2017-07-04 853 refcount_set(&mc->mca_refcnt, 1);
1691c63ea42d6f WANG Cong 2014-09-11 854 spin_lock_init(&mc->mca_lock);
1691c63ea42d6f WANG Cong 2014-09-11 855
c7ea20c9da5b94 Hangbin Liu 2018-07-10 856 mc->mca_sfmode = mode;
c7ea20c9da5b94 Hangbin Liu 2018-07-10 857 mc->mca_sfcount[mode] = 1;
1691c63ea42d6f WANG Cong 2014-09-11 858
1691c63ea42d6f WANG Cong 2014-09-11 859 if (ipv6_addr_is_ll_all_nodes(&mc->mca_addr) ||
1691c63ea42d6f WANG Cong 2014-09-11 860 IPV6_ADDR_MC_SCOPE(&mc->mca_addr) < IPV6_ADDR_SCOPE_LINKLOCAL)
a3403c9c2ef72a Taehee Yoo 2021-02-13 861 mc->mca_noreport = true;
1691c63ea42d6f WANG Cong 2014-09-11 862
1691c63ea42d6f WANG Cong 2014-09-11 863 return mc;
1691c63ea42d6f WANG Cong 2014-09-11 864 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 865
^1da177e4c3f41 Linus Torvalds 2005-04-16 866 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 867 * device multicast group inc (add if not found)
^1da177e4c3f41 Linus Torvalds 2005-04-16 868 */
c7ea20c9da5b94 Hangbin Liu 2018-07-10 869 static int __ipv6_dev_mc_inc(struct net_device *dev,
c7ea20c9da5b94 Hangbin Liu 2018-07-10 870 const struct in6_addr *addr, unsigned int mode)
^1da177e4c3f41 Linus Torvalds 2005-04-16 871 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 872 struct ifmcaddr6 *mc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 873 struct inet6_dev *idev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 874
a9ed4a2986e130 Sabrina Dubroca 2014-09-02 875 ASSERT_RTNL();
a9ed4a2986e130 Sabrina Dubroca 2014-09-02 876
96b52e61be1ad4 Eric Dumazet 2010-06-07 877 /* we need to take a reference on idev */
^1da177e4c3f41 Linus Torvalds 2005-04-16 878 idev = in6_dev_get(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 879
63159f29be1df7 Ian Morris 2015-03-29 880 if (!idev)
^1da177e4c3f41 Linus Torvalds 2005-04-16 881 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 882
^1da177e4c3f41 Linus Torvalds 2005-04-16 883 if (idev->dead) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 884 in6_dev_put(idev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 885 return -ENODEV;
^1da177e4c3f41 Linus Torvalds 2005-04-16 886 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 887
05d3b96bdcaec5 Taehee Yoo 2021-02-13 888 for_each_mc_rtnl(idev, mc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 889 if (ipv6_addr_equal(&mc->mca_addr, addr)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 890 mc->mca_users++;
c7ea20c9da5b94 Hangbin Liu 2018-07-10 891 ip6_mc_add_src(idev, &mc->mca_addr, mode, 0, NULL, 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 892 in6_dev_put(idev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 893 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 894 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 895 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 896
c7ea20c9da5b94 Hangbin Liu 2018-07-10 897 mc = mca_alloc(idev, addr, mode);
1691c63ea42d6f WANG Cong 2014-09-11 898 if (!mc) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 899 in6_dev_put(idev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 900 return -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 901 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 902
05d3b96bdcaec5 Taehee Yoo 2021-02-13 903 rcu_assign_pointer(mc->next, idev->mc_list);
05d3b96bdcaec5 Taehee Yoo 2021-02-13 904 rcu_assign_pointer(idev->mc_list, mc);
1691c63ea42d6f WANG Cong 2014-09-11 905
1691c63ea42d6f WANG Cong 2014-09-11 906 mca_get(mc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 907
1666d49e1d416f Hangbin Liu 2017-01-12 908 mld_del_delrec(idev, mc);
0ae0d60a379c11 Hangbin Liu 2018-07-20 909 igmp6_group_added(mc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 910 ma_put(mc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 911 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 912 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 913
c7ea20c9da5b94 Hangbin Liu 2018-07-10 914 int ipv6_dev_mc_inc(struct net_device *dev, const struct in6_addr *addr)
c7ea20c9da5b94 Hangbin Liu 2018-07-10 915 {
c7ea20c9da5b94 Hangbin Liu 2018-07-10 916 return __ipv6_dev_mc_inc(dev, addr, MCAST_EXCLUDE);
c7ea20c9da5b94 Hangbin Liu 2018-07-10 917 }
4effd28c124530 Linus Lüssing 2019-01-21 918 EXPORT_SYMBOL(ipv6_dev_mc_inc);
c7ea20c9da5b94 Hangbin Liu 2018-07-10 919
^1da177e4c3f41 Linus Torvalds 2005-04-16 920 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 921 * device multicast group del
^1da177e4c3f41 Linus Torvalds 2005-04-16 922 */
9acd9f3ae92d0d YOSHIFUJI Hideaki 2008-04-10 923 int __ipv6_dev_mc_dec(struct inet6_dev *idev, const struct in6_addr *addr)
^1da177e4c3f41 Linus Torvalds 2005-04-16 924 {
05d3b96bdcaec5 Taehee Yoo 2021-02-13 925 struct ifmcaddr6 __rcu **map;
05d3b96bdcaec5 Taehee Yoo 2021-02-13 926 struct ifmcaddr6 *ma;
^1da177e4c3f41 Linus Torvalds 2005-04-16 927
a9ed4a2986e130 Sabrina Dubroca 2014-09-02 928 ASSERT_RTNL();
a9ed4a2986e130 Sabrina Dubroca 2014-09-02 929
05d3b96bdcaec5 Taehee Yoo 2021-02-13 930 for (map = &idev->mc_list;
05d3b96bdcaec5 Taehee Yoo 2021-02-13 931 (ma = rtnl_dereference(*map)) != NULL;
05d3b96bdcaec5 Taehee Yoo 2021-02-13 932 map = &ma->next) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 933 if (ipv6_addr_equal(&ma->mca_addr, addr)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 934 if (--ma->mca_users == 0) {
05d3b96bdcaec5 Taehee Yoo 2021-02-13 @935 *map = rtnl_dereference(ma->next);
^1da177e4c3f41 Linus Torvalds 2005-04-16 936
^1da177e4c3f41 Linus Torvalds 2005-04-16 937 igmp6_group_dropped(ma);
1666d49e1d416f Hangbin Liu 2017-01-12 938 ip6_mc_clear_src(ma);
^1da177e4c3f41 Linus Torvalds 2005-04-16 939
^1da177e4c3f41 Linus Torvalds 2005-04-16 940 ma_put(ma);
^1da177e4c3f41 Linus Torvalds 2005-04-16 941 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 942 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 943 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 944 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 945 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 946
^1da177e4c3f41 Linus Torvalds 2005-04-16 947 return -ENOENT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 948 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 949
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
include/linux/compiler_types.h:315:38: error: call to '__compiletime_assert_515' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct can_frame, len) != offsetof(struct canfd_frame, len) || offsetof(struct can_frame, data) != offsetof(struc...
by kernel test robot
Hi Oliver,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: c7b74967799b1af52b3045d69d4c26836b2d41de can: replace can_dlc as variable/element for payload length
date: 3 months ago
config: arm-randconfig-r013-20210214 (attached as .config)
compiler: arm-linux-gnueabi-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout c7b74967799b1af52b3045d69d4c26836b2d41de
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 <command-line>:
net/can/af_can.c: In function 'can_init':
>> include/linux/compiler_types.h:315:38: error: call to '__compiletime_assert_515' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct can_frame, len) != offsetof(struct canfd_frame, len) || offsetof(struct can_frame, data) != offsetof(struct canfd_frame, data)
315 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:296:4: note: in definition of macro '__compiletime_assert'
296 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:315:2: note: in expansion of macro '_compiletime_assert'
315 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
net/can/af_can.c:891:2: note: in expansion of macro 'BUILD_BUG_ON'
891 | BUILD_BUG_ON(offsetof(struct can_frame, len) !=
| ^~~~~~~~~~~~
vim +/__compiletime_assert_515 +315 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 301
eb5c2d4b45e3d2 Will Deacon 2020-07-21 302 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 303 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 304
eb5c2d4b45e3d2 Will Deacon 2020-07-21 305 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 306 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 307 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 308 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 309 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 310 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 311 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 312 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 313 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 314 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @315 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 316
:::::: The code at line 315 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH net-next v2 6/7] mld: convert ip6_sf_list to RCU
by kernel test robot
Hi Taehee,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Taehee-Yoo/mld-change-context-fr...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 3c5a2fd042d0bfac71a2dfb99515723d318df47b
config: x86_64-randconfig-s022-20210214 (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/50d689e601cc17c3b2bf668b2e5be766e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Taehee-Yoo/mld-change-context-from-atomic-to-sleepable/20210214-015930
git checkout 50d689e601cc17c3b2bf668b2e5be766e9dbc7b3
# 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 >>)"
net/ipv6/mcast.c:754:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/mcast.c:754:9: sparse: struct ifmcaddr6 [noderef] __rcu *
net/ipv6/mcast.c:754:9: sparse: struct ifmcaddr6 *
>> net/ipv6/mcast.c:783:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu *__tmp @@ got struct ip6_sf_list * @@
>> net/ipv6/mcast.c:783:33: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *sources @@ got struct ip6_sf_list [noderef] __rcu *__tmp @@
>> net/ipv6/mcast.c:2322:43: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *[assigned] dpsf @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
>> net/ipv6/mcast.c:2332:63: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *mca_tomb @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:2344:63: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *[assigned] dpsf @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
>> net/ipv6/mcast.c:2353:47: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu *sf_next @@ got struct ip6_sf_list *mca_tomb @@
>> net/ipv6/mcast.c:2432:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list *nextpsf @@ got struct ip6_sf_list [noderef] __rcu *sf_next @@
net/ipv6/mcast.c:440:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/ipv6/mcast.c:440:17: sparse: struct ip6_sf_socklist [noderef] __rcu *
net/ipv6/mcast.c:440:17: sparse: struct ip6_sf_socklist *
net/ipv6/mcast.c: note: in included file:
include/net/mld.h:32:43: sparse: sparse: array of flexible structures
>> net/ipv6/mcast.c:1791:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu * @@ got struct ip6_sf_list * @@
net/ipv6/mcast.c:1841:51: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ip6_sf_list [noderef] __rcu * @@ got struct ip6_sf_list * @@
net/ipv6/mcast.c:1911:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> net/ipv6/mcast.c:1911:20: sparse: struct ip6_sf_list [noderef] __rcu *
>> net/ipv6/mcast.c:1911:20: sparse: struct ip6_sf_list *
>> net/ipv6/mcast.c:1952:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ip6_sf_list **ppsf @@ got struct ip6_sf_list [noderef] __rcu ** @@
net/ipv6/mcast.c:1952:50: sparse: expected struct ip6_sf_list **ppsf
net/ipv6/mcast.c:1952:50: sparse: got struct ip6_sf_list [noderef] __rcu **
net/ipv6/mcast.c:267:25: sparse: sparse: context imbalance in 'ip6_mc_find_dev_rcu' - different lock contexts for basic block
net/ipv6/mcast.c:457:9: sparse: sparse: context imbalance in 'ip6_mc_source' - unexpected unlock
net/ipv6/mcast.c:546:9: sparse: sparse: context imbalance in 'ip6_mc_msfilter' - unexpected unlock
net/ipv6/mcast.c:593:21: sparse: sparse: context imbalance in 'ip6_mc_msfget' - unexpected unlock
net/ipv6/mcast.c:2758:25: sparse: sparse: context imbalance in 'igmp6_mc_get_next' - unexpected unlock
net/ipv6/mcast.c:2780:9: sparse: sparse: context imbalance in 'igmp6_mc_get_idx' - wrong count at exit
net/ipv6/mcast.c:2807:9: sparse: sparse: context imbalance in 'igmp6_mc_seq_stop' - unexpected unlock
net/ipv6/mcast.c:2879:31: sparse: sparse: context imbalance in 'igmp6_mcf_get_next' - unexpected unlock
net/ipv6/mcast.c:2911:9: sparse: sparse: context imbalance in 'igmp6_mcf_get_idx' - wrong count at exit
net/ipv6/mcast.c:2928:9: sparse: sparse: context imbalance in 'igmp6_mcf_seq_next' - wrong count at exit
net/ipv6/mcast.c:2941:17: sparse: sparse: context imbalance in 'igmp6_mcf_seq_stop' - unexpected unlock
vim +783 net/ipv6/mcast.c
757
758 static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
759 {
760 struct in6_addr *pmca = &im->mca_addr;
761 struct ip6_sf_list *psf, *sources;
762 struct ifmcaddr6 *pmc, *pmc_prev;
763
764 pmc_prev = NULL;
765 for (pmc = idev->mc_tomb; pmc; pmc = pmc->next) {
766 if (ipv6_addr_equal(&pmc->mca_addr, pmca))
767 break;
768 pmc_prev = pmc;
769 }
770 if (pmc) {
771 if (pmc_prev)
772 pmc_prev->next = pmc->next;
773 else
774 idev->mc_tomb = pmc->next;
775 }
776
777 spin_lock_bh(&im->mca_lock);
778 if (pmc) {
779 im->idev = pmc->idev;
780 if (im->mca_sfmode == MCAST_INCLUDE) {
781 swap(im->mca_tomb, pmc->mca_tomb);
782
> 783 sources = rcu_replace_pointer(im->mca_sources,
784 pmc->mca_sources,
785 lockdep_rtnl_is_held());
786 rcu_assign_pointer(pmc->mca_sources, sources);
787 for_each_psf_rtnl(im, psf)
788 psf->sf_crcount = idev->mc_qrv;
789 } else {
790 im->mca_crcount = idev->mc_qrv;
791 }
792 in6_dev_put(pmc->idev);
793 ip6_mc_clear_src(pmc);
794 kfree(pmc);
795 }
796 spin_unlock_bh(&im->mca_lock);
797 }
798
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[PATCH] usb: chipidea: tegra: fix flexible_array.cocci warnings
by Julia Lawall
From: kernel test robot <lkp(a)intel.com>
Zero-length and one-element arrays are deprecated, see
Documentation/process/deprecated.rst
Flexible-array members should be used instead.
Generated by: scripts/coccinelle/misc/flexible_array.cocci
Fixes: fc53d5279094 ("usb: chipidea: tegra: Support host mode")
CC: Peter Geis <pgwipeout(a)gmail.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Julia Lawall <julia.lawall(a)inria.fr>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next
head: 7a1e838d0cdce7d09a0bd81d45c7b5a660e71ac7
commit: fc53d5279094e38e6363506339772a7021da2df8 [64/198] usb: chipidea: tegra: Support host mode
:::::: branch date: 19 hours ago
:::::: commit date: 4 weeks ago
host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -32,7 +32,7 @@ struct ehci_ci_priv {
struct ci_hdrc_dma_aligned_buffer {
void *kmalloc_ptr;
void *old_xfer_buffer;
- u8 data[0];
+ u8 data[];
};
static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable)
1 year, 7 months
/usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: 67a5a68013056cbcf0a647e36cb6f4622fb6a470 gcc-plugins: fix gcc 11 indigestion with plugins...
date: 5 weeks ago
config: x86_64-randconfig-a001-20200622 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 67a5a68013056cbcf0a647e36cb6f4622fb6a470
# 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 >>):
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/tm.h:27,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/gcc-plugin.h:31,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/plugin.h:23,
from scripts/gcc-plugins/gcc-common.h:9,
from scripts/gcc-plugins/latent_entropy_plugin.c:78:
>> /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
^
/usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/tm.h:48,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/gcc-plugin.h:31,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/plugin.h:23,
from scripts/gcc-plugins/gcc-common.h:9,
from scripts/gcc-plugins/latent_entropy_plugin.c:78:
>> /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
>> cc1plus: warning: unrecognized command line option '-Wno-format-diag'
--
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/tm.h:27,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/gcc-plugin.h:31,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/plugin.h:23,
from scripts/gcc-plugins/gcc-common.h:9,
from scripts/gcc-plugins/latent_entropy_plugin.c:78:
>> /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
^
/usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/tm.h:48,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/gcc-plugin.h:31,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/plugin.h:23,
from scripts/gcc-plugins/gcc-common.h:9,
from scripts/gcc-plugins/latent_entropy_plugin.c:78:
>> /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/tm.h:27,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/gcc-plugin.h:31,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/plugin.h:23,
from scripts/gcc-plugins/gcc-common.h:9,
from scripts/gcc-plugins/sancov_plugin.c:22:
>> /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
^
/usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/tm.h:27,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/gcc-plugin.h:31,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/plugin.h:23,
from scripts/gcc-plugins/gcc-common.h:9,
from scripts/gcc-plugins/structleak_plugin.c:32:
>> /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
^
/usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/tm.h:48,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/gcc-plugin.h:31,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/plugin.h:23,
from scripts/gcc-plugins/gcc-common.h:9,
from scripts/gcc-plugins/sancov_plugin.c:22:
>> /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/tm.h:48,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/gcc-plugin.h:31,
from /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/plugin.h:23,
from scripts/gcc-plugins/gcc-common.h:9,
from scripts/gcc-plugins/structleak_plugin.c:32:
>> /usr/lib/gcc/x86_64-linux-gnu/5/plugin/include/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
>> cc1plus: warning: unrecognized command line option '-Wno-format-diag'
>> cc1plus: warning: unrecognized command line option '-Wno-format-diag'
>> cc1plus: warning: unrecognized command line option '-Wno-format-diag'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
drivers/gpu/drm/i915/gvt/gtt.c:267:19: error: unused function 'get_pt_type'
by kernel test robot
Hi Nick,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcc0b49040c70ad827a7f3d58a21b01fdb14e749
commit: 9f4069b055d1508c833115df7493b6e0001e5c9b drm/i915: re-disable -Wframe-address
date: 10 months ago
config: x86_64-randconfig-a013-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9f4069b055d1508c833115df7493b6e0001e5c9b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> drivers/gpu/drm/i915/gvt/gtt.c:267:19: error: unused function 'get_pt_type' [-Werror,-Wunused-function]
static inline int get_pt_type(int type)
^
>> drivers/gpu/drm/i915/gvt/gtt.c:590:20: error: unused function 'ppgtt_set_guest_root_entry' [-Werror,-Wunused-function]
static inline void ppgtt_set_guest_root_entry(struct intel_vgpu_mm *mm,
^
2 errors generated.
--
>> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:259:19: error: unused function 'rq_prio' [-Werror,-Wunused-function]
static inline int rq_prio(const struct i915_request *rq)
^
1 error generated.
vim +/get_pt_type +267 drivers/gpu/drm/i915/gvt/gtt.c
2707e44466881d Zhi Wang 2016-03-28 266
054f4eba2a2985 Zhi Wang 2017-10-10 @267 static inline int get_pt_type(int type)
054f4eba2a2985 Zhi Wang 2017-10-10 268 {
054f4eba2a2985 Zhi Wang 2017-10-10 269 return gtt_type_table[type].pt_type;
054f4eba2a2985 Zhi Wang 2017-10-10 270 }
054f4eba2a2985 Zhi Wang 2017-10-10 271
:::::: The code at line 267 was first introduced by commit
:::::: 054f4eba2a2985b1db43353b7b5ce90e96cf9bb9 drm/i915/gvt: Introduce page table type of current level in GTT type enumerations
:::::: TO: Zhi Wang <zhi.a.wang(a)intel.com>
:::::: CC: Zhenyu Wang <zhenyuw(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months