From: kbuild test robot <fengguang.wu@intel.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: kbuild-all@01.org, linux-pci@vger.kernel.org,
Bjorn Helgaas <bhelgaas@google.com>
Subject: [pci:pci/host-designware 37/43] drivers/misc/pci_endpoint_test.c:420:8: error: implicit declaration of function 'pci_alloc_irq_vectors'
Date: Wed, 5 Apr 2017 06:12:25 +0800 [thread overview]
Message-ID: <201704050616.ukHhiUMi%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6359 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/host-designware
head: f6a1972e20ab2f40f4a8a1000bf34f4df3145c01
commit: 450afc42599ba3544e23fb45e86a995d839e2e1c [37/43] misc: Add host side PCI driver for PCI test function device
config: blackfin-allmodconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 450afc42599ba3544e23fb45e86a995d839e2e1c
# save the attached .config to linux build tree
make.cross ARCH=blackfin
All error/warnings (new ones prefixed by >>):
drivers/misc/pci_endpoint_test.c: In function 'pci_endpoint_test_probe':
>> drivers/misc/pci_endpoint_test.c:420:8: error: implicit declaration of function 'pci_alloc_irq_vectors' [-Werror=implicit-function-declaration]
irq = pci_alloc_irq_vectors(pdev, 1, 32, PCI_IRQ_MSI);
^~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/pci_endpoint_test.c:420:43: error: 'PCI_IRQ_MSI' undeclared (first use in this function)
irq = pci_alloc_irq_vectors(pdev, 1, 32, PCI_IRQ_MSI);
^~~~~~~~~~~
drivers/misc/pci_endpoint_test.c:420:43: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/misc/pci_endpoint_test.c:487:2: error: implicit declaration of function 'pci_disable_msi' [-Werror=implicit-function-declaration]
pci_disable_msi(pdev);
^~~~~~~~~~~~~~~
drivers/misc/pci_endpoint_test.c: At top level:
>> drivers/misc/pci_endpoint_test.c:530:1: warning: data definition has no type or storage class
module_pci_driver(pci_endpoint_test_driver);
^~~~~~~~~~~~~~~~~
>> drivers/misc/pci_endpoint_test.c:530:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int]
>> drivers/misc/pci_endpoint_test.c:530:1: warning: parameter names (without types) in function declaration
drivers/misc/pci_endpoint_test.c:524:26: warning: 'pci_endpoint_test_driver' defined but not used [-Wunused-variable]
static struct pci_driver pci_endpoint_test_driver = {
^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/pci_alloc_irq_vectors +420 drivers/misc/pci_endpoint_test.c
414 dev_err(dev, "Cannot obtain PCI resources\n");
415 goto err_disable_pdev;
416 }
417
418 pci_set_master(pdev);
419
> 420 irq = pci_alloc_irq_vectors(pdev, 1, 32, PCI_IRQ_MSI);
421 if (irq < 0)
422 dev_err(dev, "failed to get MSI interrupts\n");
423
424 err = devm_request_irq(dev, pdev->irq, pci_endpoint_test_irqhandler,
425 IRQF_SHARED, DRV_MODULE_NAME, test);
426 if (err) {
427 dev_err(dev, "failed to request IRQ %d\n", pdev->irq);
428 goto err_disable_msi;
429 }
430
431 for (i = 1; i < irq; i++) {
432 err = devm_request_irq(dev, pdev->irq + i,
433 pci_endpoint_test_irqhandler,
434 IRQF_SHARED, DRV_MODULE_NAME, test);
435 if (err)
436 dev_err(dev, "failed to request IRQ %d for MSI %d\n",
437 pdev->irq + i, i + 1);
438 }
439
440 for (bar = BAR_0; bar <= BAR_5; bar++) {
441 base = pci_ioremap_bar(pdev, bar);
442 if (!base) {
443 dev_err(dev, "failed to read BAR%d\n", bar);
444 WARN_ON(bar == BAR_0);
445 }
446 test->bar[bar] = base;
447 }
448
449 test->base = test->bar[0];
450 if (!test->base) {
451 dev_err(dev, "Cannot perform PCI test without BAR0\n");
452 goto err_iounmap;
453 }
454
455 pci_set_drvdata(pdev, test);
456
457 id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL);
458 if (id < 0) {
459 dev_err(dev, "unable to get id\n");
460 goto err_iounmap;
461 }
462
463 snprintf(name, sizeof(name), DRV_MODULE_NAME ".%d", id);
464 misc_device = &test->miscdev;
465 misc_device->minor = MISC_DYNAMIC_MINOR;
466 misc_device->name = name;
467 misc_device->fops = &pci_endpoint_test_fops,
468
469 err = misc_register(misc_device);
470 if (err) {
471 dev_err(dev, "failed to register device\n");
472 goto err_ida_remove;
473 }
474
475 return 0;
476
477 err_ida_remove:
478 ida_simple_remove(&pci_endpoint_test_ida, id);
479
480 err_iounmap:
481 for (bar = BAR_0; bar <= BAR_5; bar++) {
482 if (test->bar[bar])
483 pci_iounmap(pdev, test->bar[bar]);
484 }
485
486 err_disable_msi:
> 487 pci_disable_msi(pdev);
488 pci_release_regions(pdev);
489
490 err_disable_pdev:
491 pci_disable_device(pdev);
492
493 return err;
494 }
495
496 static void pci_endpoint_test_remove(struct pci_dev *pdev)
497 {
498 int id;
499 enum pci_barno bar;
500 struct pci_endpoint_test *test = pci_get_drvdata(pdev);
501 struct miscdevice *misc_device = &test->miscdev;
502
503 if (sscanf(misc_device->name, DRV_MODULE_NAME ".%d", &id) != 1)
504 return;
505
506 misc_deregister(&test->miscdev);
507 ida_simple_remove(&pci_endpoint_test_ida, id);
508 for (bar = BAR_0; bar <= BAR_5; bar++) {
509 if (test->bar[bar])
510 pci_iounmap(pdev, test->bar[bar]);
511 }
512 pci_disable_msi(pdev);
513 pci_release_regions(pdev);
514 pci_disable_device(pdev);
515 }
516
517 static const struct pci_device_id pci_endpoint_test_tbl[] = {
518 { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA74x) },
519 { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_DRA72x) },
520 { }
521 };
522 MODULE_DEVICE_TABLE(pci, pci_endpoint_test_tbl);
523
524 static struct pci_driver pci_endpoint_test_driver = {
525 .name = DRV_MODULE_NAME,
526 .id_table = pci_endpoint_test_tbl,
527 .probe = pci_endpoint_test_probe,
528 .remove = pci_endpoint_test_remove,
529 };
> 530 module_pci_driver(pci_endpoint_test_driver);
531
532 MODULE_DESCRIPTION("PCI ENDPOINT TEST HOST DRIVER");
533 MODULE_AUTHOR("Kishon Vijay Abraham I <kishon@ti.com>");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 43919 bytes --]
next reply other threads:[~2017-04-04 22:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 22:12 kbuild test robot [this message]
2017-04-05 5:43 ` [pci:pci/host-designware 37/43] drivers/misc/pci_endpoint_test.c:420:8: error: implicit declaration of function 'pci_alloc_irq_vectors' Kishon Vijay Abraham I
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201704050616.ukHhiUMi%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=bhelgaas@google.com \
--cc=kbuild-all@01.org \
--cc=kishon@ti.com \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.