* [arm-platforms:irq/alloc_fwnode_pa 7/8] drivers/pci/controller/pci-hyperv.c:2593:27: error: passing argument 2 of 'kasprintf' from incompatible pointer type
@ 2019-08-07 12:51 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-08-07 12:51 UTC (permalink / raw)
To: Marc Zyngier; +Cc: kbuild-all, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 6477 bytes --]
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/alloc_fwnode_pa
head: d5865f5879f6f9e9653b5f2256dcf41059301d56
commit: 58266b4ea93f578ca3838bf04b92e51b4a7496f9 [7/8] PCI: hv: Allocate a named fwnode instead of an address-based one
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-10) 7.4.0
reproduce:
git checkout 58266b4ea93f578ca3838bf04b92e51b4a7496f9
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/pci/controller/pci-hyperv.c: In function 'hv_pci_probe':
>> drivers/pci/controller/pci-hyperv.c:2593:19: warning: passing argument 1 of 'kasprintf' makes integer from pointer without a cast [-Wint-conversion]
name = kasprintf("%pUL", &hdev->dev_instance);
^~~~~~
In file included from drivers/pci/controller/pci-hyperv.c:40:0:
include/linux/kernel.h:466:7: note: expected 'gfp_t {aka unsigned int}' but argument is of type 'char *'
char *kasprintf(gfp_t gfp, const char *fmt, ...);
^~~~~~~~~
>> drivers/pci/controller/pci-hyperv.c:2593:27: error: passing argument 2 of 'kasprintf' from incompatible pointer type [-Werror=incompatible-pointer-types]
name = kasprintf("%pUL", &hdev->dev_instance);
^
In file included from drivers/pci/controller/pci-hyperv.c:40:0:
include/linux/kernel.h:466:7: note: expected 'const char *' but argument is of type 'guid_t * {aka struct <anonymous> *}'
char *kasprintf(gfp_t gfp, const char *fmt, ...);
^~~~~~~~~
cc1: some warnings being treated as errors
vim +/kasprintf +2593 drivers/pci/controller/pci-hyperv.c
2512
2513 /**
2514 * hv_pci_probe() - New VMBus channel probe, for a root PCI bus
2515 * @hdev: VMBus's tracking struct for this root PCI bus
2516 * @dev_id: Identifies the device itself
2517 *
2518 * Return: 0 on success, -errno on failure
2519 */
2520 static int hv_pci_probe(struct hv_device *hdev,
2521 const struct hv_vmbus_device_id *dev_id)
2522 {
2523 struct hv_pcibus_device *hbus;
2524 char *name;
2525 int ret;
2526
2527 /*
2528 * hv_pcibus_device contains the hypercall arguments for retargeting in
2529 * hv_irq_unmask(). Those must not cross a page boundary.
2530 */
2531 BUILD_BUG_ON(sizeof(*hbus) > PAGE_SIZE);
2532
2533 hbus = (struct hv_pcibus_device *)get_zeroed_page(GFP_KERNEL);
2534 if (!hbus)
2535 return -ENOMEM;
2536 hbus->state = hv_pcibus_init;
2537
2538 /*
2539 * The PCI bus "domain" is what is called "segment" in ACPI and
2540 * other specs. Pull it from the instance ID, to get something
2541 * unique. Bytes 8 and 9 are what is used in Windows guests, so
2542 * do the same thing for consistency. Note that, since this code
2543 * only runs in a Hyper-V VM, Hyper-V can (and does) guarantee
2544 * that (1) the only domain in use for something that looks like
2545 * a physical PCI bus (which is actually emulated by the
2546 * hypervisor) is domain 0 and (2) there will be no overlap
2547 * between domains derived from these instance IDs in the same
2548 * VM.
2549 */
2550 hbus->sysdata.domain = hdev->dev_instance.b[9] |
2551 hdev->dev_instance.b[8] << 8;
2552
2553 hbus->hdev = hdev;
2554 refcount_set(&hbus->remove_lock, 1);
2555 INIT_LIST_HEAD(&hbus->children);
2556 INIT_LIST_HEAD(&hbus->dr_list);
2557 INIT_LIST_HEAD(&hbus->resources_for_children);
2558 spin_lock_init(&hbus->config_lock);
2559 spin_lock_init(&hbus->device_list_lock);
2560 spin_lock_init(&hbus->retarget_msi_interrupt_lock);
2561 init_completion(&hbus->remove_event);
2562 hbus->wq = alloc_ordered_workqueue("hv_pci_%x", 0,
2563 hbus->sysdata.domain);
2564 if (!hbus->wq) {
2565 ret = -ENOMEM;
2566 goto free_bus;
2567 }
2568
2569 ret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,
2570 hv_pci_onchannelcallback, hbus);
2571 if (ret)
2572 goto destroy_wq;
2573
2574 hv_set_drvdata(hdev, hbus);
2575
2576 ret = hv_pci_protocol_negotiation(hdev);
2577 if (ret)
2578 goto close;
2579
2580 ret = hv_allocate_config_window(hbus);
2581 if (ret)
2582 goto close;
2583
2584 hbus->cfg_addr = ioremap(hbus->mem_config->start,
2585 PCI_CONFIG_MMIO_LENGTH);
2586 if (!hbus->cfg_addr) {
2587 dev_err(&hdev->device,
2588 "Unable to map a virtual address for config space\n");
2589 ret = -ENOMEM;
2590 goto free_config;
2591 }
2592
> 2593 name = kasprintf("%pUL", &hdev->dev_instance);
2594 if (!name) {
2595 ret = -ENOMEM;
2596 goto unmap;
2597 }
2598
2599 hbus->sysdata.fwnode = irq_domain_alloc_named_fwnode(name);
2600 kfree(name);
2601 if (!hbus->sysdata.fwnode) {
2602 ret = -ENOMEM;
2603 goto unmap;
2604 }
2605
2606 ret = hv_pcie_init_irq_domain(hbus);
2607 if (ret)
2608 goto free_fwnode;
2609
2610 ret = hv_pci_query_relations(hdev);
2611 if (ret)
2612 goto free_irq_domain;
2613
2614 ret = hv_pci_enter_d0(hdev);
2615 if (ret)
2616 goto free_irq_domain;
2617
2618 ret = hv_pci_allocate_bridge_windows(hbus);
2619 if (ret)
2620 goto free_irq_domain;
2621
2622 ret = hv_send_resources_allocated(hdev);
2623 if (ret)
2624 goto free_windows;
2625
2626 prepopulate_bars(hbus);
2627
2628 hbus->state = hv_pcibus_probed;
2629
2630 ret = create_root_hv_pci_bus(hbus);
2631 if (ret)
2632 goto free_windows;
2633
2634 return 0;
2635
2636 free_windows:
2637 hv_pci_free_bridge_windows(hbus);
2638 free_irq_domain:
2639 irq_domain_remove(hbus->irq_domain);
2640 free_fwnode:
2641 irq_domain_free_fwnode(hbus->sysdata.fwnode);
2642 unmap:
2643 iounmap(hbus->cfg_addr);
2644 free_config:
2645 hv_free_config_window(hbus);
2646 close:
2647 vmbus_close(hdev->channel);
2648 destroy_wq:
2649 destroy_workqueue(hbus->wq);
2650 free_bus:
2651 free_page((unsigned long)hbus);
2652 return ret;
2653 }
2654
---
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: 70149 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-07 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-07 12:51 [arm-platforms:irq/alloc_fwnode_pa 7/8] drivers/pci/controller/pci-hyperv.c:2593:27: error: passing argument 2 of 'kasprintf' from incompatible pointer type kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox