[hch-block:block-bounce-cleanup 4/11] drivers/scsi/BusLogic.c:616:7: warning: variable 'addr_seen' set but not used
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git block-bounce-cleanup
head: 32689ac00077fa97c292009c17ccaff150a81107
commit: 68c46eba39a6849411b4de9b08b74dd361888c74 [4/11] Buslogic: remove ISA support
config: i386-randconfig-a004-20210312 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block block-bounce-cleanup
git checkout 68c46eba39a6849411b4de9b08b74dd361888c74
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/scsi/BusLogic.c: In function 'blogic_init_mm_probeinfo':
>> drivers/scsi/BusLogic.c:616:7: warning: variable 'addr_seen' set but not used [-Wunused-but-set-variable]
616 | bool addr_seen[6];
| ^~~~~~~~~
drivers/scsi/BusLogic.c: In function 'blogic_msg':
drivers/scsi/BusLogic.c:3474:2: warning: function 'blogic_msg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
3474 | len = vsprintf(buf, fmt, args);
| ^~~
vim +/addr_seen +616 drivers/scsi/BusLogic.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 607
839cb99e8f7483 Khalid Aziz 2013-05-16 608 static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)
^1da177e4c3f41 Linus Torvalds 2005-04-16 609 {
839cb99e8f7483 Khalid Aziz 2013-05-16 610 struct blogic_probeinfo *pr_probeinfo =
839cb99e8f7483 Khalid Aziz 2013-05-16 611 &blogic_probeinfo_list[blogic_probeinfo_count];
839cb99e8f7483 Khalid Aziz 2013-05-16 612 int nonpr_mmindex = blogic_probeinfo_count + 1;
839cb99e8f7483 Khalid Aziz 2013-05-16 613 int nonpr_mmcount = 0, mmcount = 0;
839cb99e8f7483 Khalid Aziz 2013-05-16 614 bool force_scan_order = false;
839cb99e8f7483 Khalid Aziz 2013-05-16 615 bool force_scan_order_checked = false;
839cb99e8f7483 Khalid Aziz 2013-05-16 @616 bool addr_seen[6];
839cb99e8f7483 Khalid Aziz 2013-05-16 617 struct pci_dev *pci_device = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 618 int i;
839cb99e8f7483 Khalid Aziz 2013-05-16 619 if (blogic_probeinfo_count >= BLOGIC_MAX_ADAPTERS)
^1da177e4c3f41 Linus Torvalds 2005-04-16 620 return 0;
839cb99e8f7483 Khalid Aziz 2013-05-16 621 blogic_probeinfo_count++;
^1da177e4c3f41 Linus Torvalds 2005-04-16 622 for (i = 0; i < 6; i++)
839cb99e8f7483 Khalid Aziz 2013-05-16 623 addr_seen[i] = false;
839cb99e8f7483 Khalid Aziz 2013-05-16 624 /*
839cb99e8f7483 Khalid Aziz 2013-05-16 625 Iterate over the MultiMaster PCI Host Adapters. For each
839cb99e8f7483 Khalid Aziz 2013-05-16 626 enumerated host adapter, determine whether its ISA Compatible
839cb99e8f7483 Khalid Aziz 2013-05-16 627 I/O Port is enabled and if so, whether it is assigned the
839cb99e8f7483 Khalid Aziz 2013-05-16 628 Primary I/O Address. A host adapter that is assigned the
839cb99e8f7483 Khalid Aziz 2013-05-16 629 Primary I/O Address will always be the preferred boot device.
839cb99e8f7483 Khalid Aziz 2013-05-16 630 The MultiMaster BIOS will first recognize a host adapter at
839cb99e8f7483 Khalid Aziz 2013-05-16 631 the Primary I/O Address, then any other PCI host adapters,
839cb99e8f7483 Khalid Aziz 2013-05-16 632 and finally any host adapters located at the remaining
839cb99e8f7483 Khalid Aziz 2013-05-16 633 standard ISA I/O Addresses. When a PCI host adapter is found
839cb99e8f7483 Khalid Aziz 2013-05-16 634 with its ISA Compatible I/O Port enabled, a command is issued
839cb99e8f7483 Khalid Aziz 2013-05-16 635 to disable the ISA Compatible I/O Port, and it is noted that the
^1da177e4c3f41 Linus Torvalds 2005-04-16 636 particular standard ISA I/O Address need not be probed.
^1da177e4c3f41 Linus Torvalds 2005-04-16 637 */
839cb99e8f7483 Khalid Aziz 2013-05-16 638 pr_probeinfo->io_addr = 0;
839cb99e8f7483 Khalid Aziz 2013-05-16 639 while ((pci_device = pci_get_device(PCI_VENDOR_ID_BUSLOGIC,
839cb99e8f7483 Khalid Aziz 2013-05-16 640 PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER,
839cb99e8f7483 Khalid Aziz 2013-05-16 641 pci_device)) != NULL) {
6541932ea2f7de Khalid Aziz 2013-09-25 642 struct blogic_adapter *host_adapter = adapter;
839cb99e8f7483 Khalid Aziz 2013-05-16 643 struct blogic_adapter_info adapter_info;
839cb99e8f7483 Khalid Aziz 2013-05-16 644 enum blogic_isa_ioport mod_ioaddr_req;
839cb99e8f7483 Khalid Aziz 2013-05-16 645 unsigned char bus;
839cb99e8f7483 Khalid Aziz 2013-05-16 646 unsigned char device;
839cb99e8f7483 Khalid Aziz 2013-05-16 647 unsigned int irq_ch;
839cb99e8f7483 Khalid Aziz 2013-05-16 648 unsigned long base_addr0;
839cb99e8f7483 Khalid Aziz 2013-05-16 649 unsigned long base_addr1;
839cb99e8f7483 Khalid Aziz 2013-05-16 650 unsigned long io_addr;
839cb99e8f7483 Khalid Aziz 2013-05-16 651 unsigned long pci_addr;
839cb99e8f7483 Khalid Aziz 2013-05-16 652
839cb99e8f7483 Khalid Aziz 2013-05-16 653 if (pci_enable_device(pci_device))
^1da177e4c3f41 Linus Torvalds 2005-04-16 654 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 655
17a361b20a0f90 Christoph Hellwig 2018-10-10 656 if (dma_set_mask(&pci_device->dev, DMA_BIT_MASK(32)))
^1da177e4c3f41 Linus Torvalds 2005-04-16 657 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 658
839cb99e8f7483 Khalid Aziz 2013-05-16 659 bus = pci_device->bus->number;
839cb99e8f7483 Khalid Aziz 2013-05-16 660 device = pci_device->devfn >> 3;
839cb99e8f7483 Khalid Aziz 2013-05-16 661 irq_ch = pci_device->irq;
839cb99e8f7483 Khalid Aziz 2013-05-16 662 io_addr = base_addr0 = pci_resource_start(pci_device, 0);
839cb99e8f7483 Khalid Aziz 2013-05-16 663 pci_addr = base_addr1 = pci_resource_start(pci_device, 1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 664
839cb99e8f7483 Khalid Aziz 2013-05-16 665 if (pci_resource_flags(pci_device, 0) & IORESOURCE_MEM) {
43622697117c39 Colin Ian King 2020-01-08 666 blogic_err("BusLogic: Base Address0 0x%lX not I/O for MultiMaster Host Adapter\n", NULL, base_addr0);
43622697117c39 Colin Ian King 2020-01-08 667 blogic_err("at PCI Bus %d Device %d I/O Address 0x%lX\n", NULL, bus, device, io_addr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 668 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 669 }
839cb99e8f7483 Khalid Aziz 2013-05-16 670 if (pci_resource_flags(pci_device, 1) & IORESOURCE_IO) {
43622697117c39 Colin Ian King 2020-01-08 671 blogic_err("BusLogic: Base Address1 0x%lX not Memory for MultiMaster Host Adapter\n", NULL, base_addr1);
43622697117c39 Colin Ian King 2020-01-08 672 blogic_err("at PCI Bus %d Device %d PCI Address 0x%lX\n", NULL, bus, device, pci_addr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 673 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 674 }
839cb99e8f7483 Khalid Aziz 2013-05-16 675 if (irq_ch == 0) {
43622697117c39 Colin Ian King 2020-01-08 676 blogic_err("BusLogic: IRQ Channel %d invalid for MultiMaster Host Adapter\n", NULL, irq_ch);
43622697117c39 Colin Ian King 2020-01-08 677 blogic_err("at PCI Bus %d Device %d I/O Address 0x%lX\n", NULL, bus, device, io_addr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 678 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 679 }
839cb99e8f7483 Khalid Aziz 2013-05-16 680 if (blogic_global_options.trace_probe) {
43622697117c39 Colin Ian King 2020-01-08 681 blogic_notice("BusLogic: PCI MultiMaster Host Adapter detected at\n", NULL);
43622697117c39 Colin Ian King 2020-01-08 682 blogic_notice("BusLogic: PCI Bus %d Device %d I/O Address 0x%lX PCI Address 0x%lX\n", NULL, bus, device, io_addr, pci_addr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 683 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 684 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 685 Issue the Inquire PCI Host Adapter Information command to determine
^1da177e4c3f41 Linus Torvalds 2005-04-16 686 the ISA Compatible I/O Port. If the ISA Compatible I/O Port is
^1da177e4c3f41 Linus Torvalds 2005-04-16 687 known and enabled, note that the particular Standard ISA I/O
^1da177e4c3f41 Linus Torvalds 2005-04-16 688 Address should not be probed.
^1da177e4c3f41 Linus Torvalds 2005-04-16 689 */
6541932ea2f7de Khalid Aziz 2013-09-25 690 host_adapter->io_addr = io_addr;
6541932ea2f7de Khalid Aziz 2013-09-25 691 blogic_intreset(host_adapter);
6541932ea2f7de Khalid Aziz 2013-09-25 692 if (blogic_cmd(host_adapter, BLOGIC_INQ_PCI_INFO, NULL, 0,
839cb99e8f7483 Khalid Aziz 2013-05-16 693 &adapter_info, sizeof(adapter_info)) ==
839cb99e8f7483 Khalid Aziz 2013-05-16 694 sizeof(adapter_info)) {
839cb99e8f7483 Khalid Aziz 2013-05-16 695 if (adapter_info.isa_port < 6)
839cb99e8f7483 Khalid Aziz 2013-05-16 696 addr_seen[adapter_info.isa_port] = true;
^1da177e4c3f41 Linus Torvalds 2005-04-16 697 } else
839cb99e8f7483 Khalid Aziz 2013-05-16 698 adapter_info.isa_port = BLOGIC_IO_DISABLE;
839cb99e8f7483 Khalid Aziz 2013-05-16 699 /*
839cb99e8f7483 Khalid Aziz 2013-05-16 700 Issue the Modify I/O Address command to disable the
839cb99e8f7483 Khalid Aziz 2013-05-16 701 ISA Compatible I/O Port. On PCI Host Adapters, the
839cb99e8f7483 Khalid Aziz 2013-05-16 702 Modify I/O Address command allows modification of the
839cb99e8f7483 Khalid Aziz 2013-05-16 703 ISA compatible I/O Address that the Host Adapter
839cb99e8f7483 Khalid Aziz 2013-05-16 704 responds to; it does not affect the PCI compliant
839cb99e8f7483 Khalid Aziz 2013-05-16 705 I/O Address assigned at system initialization.
839cb99e8f7483 Khalid Aziz 2013-05-16 706 */
839cb99e8f7483 Khalid Aziz 2013-05-16 707 mod_ioaddr_req = BLOGIC_IO_DISABLE;
6541932ea2f7de Khalid Aziz 2013-09-25 708 blogic_cmd(host_adapter, BLOGIC_MOD_IOADDR, &mod_ioaddr_req,
839cb99e8f7483 Khalid Aziz 2013-05-16 709 sizeof(mod_ioaddr_req), NULL, 0);
839cb99e8f7483 Khalid Aziz 2013-05-16 710 /*
839cb99e8f7483 Khalid Aziz 2013-05-16 711 For the first MultiMaster Host Adapter enumerated,
839cb99e8f7483 Khalid Aziz 2013-05-16 712 issue the Fetch Host Adapter Local RAM command to read
839cb99e8f7483 Khalid Aziz 2013-05-16 713 byte 45 of the AutoSCSI area, for the setting of the
839cb99e8f7483 Khalid Aziz 2013-05-16 714 "Use Bus And Device # For PCI Scanning Seq." option.
839cb99e8f7483 Khalid Aziz 2013-05-16 715 Issue the Inquire Board ID command since this option is
^1da177e4c3f41 Linus Torvalds 2005-04-16 716 only valid for the BT-948/958/958D.
^1da177e4c3f41 Linus Torvalds 2005-04-16 717 */
839cb99e8f7483 Khalid Aziz 2013-05-16 718 if (!force_scan_order_checked) {
839cb99e8f7483 Khalid Aziz 2013-05-16 719 struct blogic_fetch_localram fetch_localram;
839cb99e8f7483 Khalid Aziz 2013-05-16 720 struct blogic_autoscsi_byte45 autoscsi_byte45;
839cb99e8f7483 Khalid Aziz 2013-05-16 721 struct blogic_board_id id;
839cb99e8f7483 Khalid Aziz 2013-05-16 722
839cb99e8f7483 Khalid Aziz 2013-05-16 723 fetch_localram.offset = BLOGIC_AUTOSCSI_BASE + 45;
839cb99e8f7483 Khalid Aziz 2013-05-16 724 fetch_localram.count = sizeof(autoscsi_byte45);
6541932ea2f7de Khalid Aziz 2013-09-25 725 blogic_cmd(host_adapter, BLOGIC_FETCH_LOCALRAM,
839cb99e8f7483 Khalid Aziz 2013-05-16 726 &fetch_localram, sizeof(fetch_localram),
839cb99e8f7483 Khalid Aziz 2013-05-16 727 &autoscsi_byte45,
839cb99e8f7483 Khalid Aziz 2013-05-16 728 sizeof(autoscsi_byte45));
6541932ea2f7de Khalid Aziz 2013-09-25 729 blogic_cmd(host_adapter, BLOGIC_GET_BOARD_ID, NULL, 0,
6541932ea2f7de Khalid Aziz 2013-09-25 730 &id, sizeof(id));
839cb99e8f7483 Khalid Aziz 2013-05-16 731 if (id.fw_ver_digit1 == '5')
839cb99e8f7483 Khalid Aziz 2013-05-16 732 force_scan_order =
839cb99e8f7483 Khalid Aziz 2013-05-16 733 autoscsi_byte45.force_scan_order;
839cb99e8f7483 Khalid Aziz 2013-05-16 734 force_scan_order_checked = true;
839cb99e8f7483 Khalid Aziz 2013-05-16 735 }
839cb99e8f7483 Khalid Aziz 2013-05-16 736 /*
839cb99e8f7483 Khalid Aziz 2013-05-16 737 Determine whether this MultiMaster Host Adapter has its
839cb99e8f7483 Khalid Aziz 2013-05-16 738 ISA Compatible I/O Port enabled and is assigned the
839cb99e8f7483 Khalid Aziz 2013-05-16 739 Primary I/O Address. If it does, then it is the Primary
839cb99e8f7483 Khalid Aziz 2013-05-16 740 MultiMaster Host Adapter and must be recognized first.
839cb99e8f7483 Khalid Aziz 2013-05-16 741 If it does not, then it is added to the list for probing
839cb99e8f7483 Khalid Aziz 2013-05-16 742 after any Primary MultiMaster Host Adapter is probed.
839cb99e8f7483 Khalid Aziz 2013-05-16 743 */
839cb99e8f7483 Khalid Aziz 2013-05-16 744 if (adapter_info.isa_port == BLOGIC_IO_330) {
839cb99e8f7483 Khalid Aziz 2013-05-16 745 pr_probeinfo->adapter_type = BLOGIC_MULTIMASTER;
839cb99e8f7483 Khalid Aziz 2013-05-16 746 pr_probeinfo->adapter_bus_type = BLOGIC_PCI_BUS;
839cb99e8f7483 Khalid Aziz 2013-05-16 747 pr_probeinfo->io_addr = io_addr;
839cb99e8f7483 Khalid Aziz 2013-05-16 748 pr_probeinfo->pci_addr = pci_addr;
839cb99e8f7483 Khalid Aziz 2013-05-16 749 pr_probeinfo->bus = bus;
839cb99e8f7483 Khalid Aziz 2013-05-16 750 pr_probeinfo->dev = device;
839cb99e8f7483 Khalid Aziz 2013-05-16 751 pr_probeinfo->irq_ch = irq_ch;
839cb99e8f7483 Khalid Aziz 2013-05-16 752 pr_probeinfo->pci_device = pci_dev_get(pci_device);
839cb99e8f7483 Khalid Aziz 2013-05-16 753 mmcount++;
839cb99e8f7483 Khalid Aziz 2013-05-16 754 } else if (blogic_probeinfo_count < BLOGIC_MAX_ADAPTERS) {
839cb99e8f7483 Khalid Aziz 2013-05-16 755 struct blogic_probeinfo *probeinfo =
839cb99e8f7483 Khalid Aziz 2013-05-16 756 &blogic_probeinfo_list[blogic_probeinfo_count++];
839cb99e8f7483 Khalid Aziz 2013-05-16 757 probeinfo->adapter_type = BLOGIC_MULTIMASTER;
839cb99e8f7483 Khalid Aziz 2013-05-16 758 probeinfo->adapter_bus_type = BLOGIC_PCI_BUS;
839cb99e8f7483 Khalid Aziz 2013-05-16 759 probeinfo->io_addr = io_addr;
839cb99e8f7483 Khalid Aziz 2013-05-16 760 probeinfo->pci_addr = pci_addr;
839cb99e8f7483 Khalid Aziz 2013-05-16 761 probeinfo->bus = bus;
839cb99e8f7483 Khalid Aziz 2013-05-16 762 probeinfo->dev = device;
839cb99e8f7483 Khalid Aziz 2013-05-16 763 probeinfo->irq_ch = irq_ch;
839cb99e8f7483 Khalid Aziz 2013-05-16 764 probeinfo->pci_device = pci_dev_get(pci_device);
839cb99e8f7483 Khalid Aziz 2013-05-16 765 nonpr_mmcount++;
839cb99e8f7483 Khalid Aziz 2013-05-16 766 mmcount++;
^1da177e4c3f41 Linus Torvalds 2005-04-16 767 } else
43622697117c39 Colin Ian King 2020-01-08 768 blogic_warn("BusLogic: Too many Host Adapters detected\n", NULL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 769 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 770 /*
839cb99e8f7483 Khalid Aziz 2013-05-16 771 If the AutoSCSI "Use Bus And Device # For PCI Scanning Seq."
839cb99e8f7483 Khalid Aziz 2013-05-16 772 option is ON for the first enumerated MultiMaster Host Adapter,
839cb99e8f7483 Khalid Aziz 2013-05-16 773 and if that host adapter is a BT-948/958/958D, then the
839cb99e8f7483 Khalid Aziz 2013-05-16 774 MultiMaster BIOS will recognize MultiMaster Host Adapters in
839cb99e8f7483 Khalid Aziz 2013-05-16 775 the order of increasing PCI Bus and Device Number. In that case,
839cb99e8f7483 Khalid Aziz 2013-05-16 776 sort the probe information into the same order the BIOS uses.
839cb99e8f7483 Khalid Aziz 2013-05-16 777 If this option is OFF, then the MultiMaster BIOS will recognize
839cb99e8f7483 Khalid Aziz 2013-05-16 778 MultiMaster Host Adapters in the order they are enumerated by
839cb99e8f7483 Khalid Aziz 2013-05-16 779 the PCI BIOS, and hence no sorting is necessary.
^1da177e4c3f41 Linus Torvalds 2005-04-16 780 */
839cb99e8f7483 Khalid Aziz 2013-05-16 781 if (force_scan_order)
839cb99e8f7483 Khalid Aziz 2013-05-16 782 blogic_sort_probeinfo(&blogic_probeinfo_list[nonpr_mmindex],
839cb99e8f7483 Khalid Aziz 2013-05-16 783 nonpr_mmcount);
^1da177e4c3f41 Linus Torvalds 2005-04-16 784 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 785 Iterate over the older non-compliant MultiMaster PCI Host Adapters,
^1da177e4c3f41 Linus Torvalds 2005-04-16 786 noting the PCI bus location and assigned IRQ Channel.
^1da177e4c3f41 Linus Torvalds 2005-04-16 787 */
839cb99e8f7483 Khalid Aziz 2013-05-16 788 pci_device = NULL;
839cb99e8f7483 Khalid Aziz 2013-05-16 789 while ((pci_device = pci_get_device(PCI_VENDOR_ID_BUSLOGIC,
839cb99e8f7483 Khalid Aziz 2013-05-16 790 PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC,
839cb99e8f7483 Khalid Aziz 2013-05-16 791 pci_device)) != NULL) {
839cb99e8f7483 Khalid Aziz 2013-05-16 792 unsigned char bus;
839cb99e8f7483 Khalid Aziz 2013-05-16 793 unsigned char device;
839cb99e8f7483 Khalid Aziz 2013-05-16 794 unsigned int irq_ch;
839cb99e8f7483 Khalid Aziz 2013-05-16 795 unsigned long io_addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 796
839cb99e8f7483 Khalid Aziz 2013-05-16 797 if (pci_enable_device(pci_device))
^1da177e4c3f41 Linus Torvalds 2005-04-16 798 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 799
17a361b20a0f90 Christoph Hellwig 2018-10-10 800 if (dma_set_mask(&pci_device->dev, DMA_BIT_MASK(32)))
^1da177e4c3f41 Linus Torvalds 2005-04-16 801 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 802
839cb99e8f7483 Khalid Aziz 2013-05-16 803 bus = pci_device->bus->number;
839cb99e8f7483 Khalid Aziz 2013-05-16 804 device = pci_device->devfn >> 3;
839cb99e8f7483 Khalid Aziz 2013-05-16 805 irq_ch = pci_device->irq;
839cb99e8f7483 Khalid Aziz 2013-05-16 806 io_addr = pci_resource_start(pci_device, 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 807
839cb99e8f7483 Khalid Aziz 2013-05-16 808 if (io_addr == 0 || irq_ch == 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 809 continue;
839cb99e8f7483 Khalid Aziz 2013-05-16 810 for (i = 0; i < blogic_probeinfo_count; i++) {
839cb99e8f7483 Khalid Aziz 2013-05-16 811 struct blogic_probeinfo *probeinfo =
839cb99e8f7483 Khalid Aziz 2013-05-16 812 &blogic_probeinfo_list[i];
839cb99e8f7483 Khalid Aziz 2013-05-16 813 if (probeinfo->io_addr == io_addr &&
839cb99e8f7483 Khalid Aziz 2013-05-16 814 probeinfo->adapter_type == BLOGIC_MULTIMASTER) {
839cb99e8f7483 Khalid Aziz 2013-05-16 815 probeinfo->adapter_bus_type = BLOGIC_PCI_BUS;
839cb99e8f7483 Khalid Aziz 2013-05-16 816 probeinfo->pci_addr = 0;
839cb99e8f7483 Khalid Aziz 2013-05-16 817 probeinfo->bus = bus;
839cb99e8f7483 Khalid Aziz 2013-05-16 818 probeinfo->dev = device;
839cb99e8f7483 Khalid Aziz 2013-05-16 819 probeinfo->irq_ch = irq_ch;
839cb99e8f7483 Khalid Aziz 2013-05-16 820 probeinfo->pci_device = pci_dev_get(pci_device);
^1da177e4c3f41 Linus Torvalds 2005-04-16 821 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 822 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 823 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 824 }
839cb99e8f7483 Khalid Aziz 2013-05-16 825 return mmcount;
^1da177e4c3f41 Linus Torvalds 2005-04-16 826 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 827
:::::: The code at line 616 was first introduced by commit
:::::: 839cb99e8f748391059d10388c8aea48a88c142c [SCSI] BusLogic: Fix style issues
:::::: TO: Khalid Aziz <khalid.aziz(a)oracle.com>
:::::: CC: James Bottomley <JBottomley(a)Parallels.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] mm/slab: kmalloc with GFP_DMA32 allocate from SLAB_CACHE_DMA32
by kernel test robot
Hi Jianqun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on hnaz-linux-mm/master]
url: https://github.com/0day-ci/linux/commits/Jianqun-Xu/mm-slab-kmalloc-with-...
base: https://github.com/hnaz/linux-mm master
config: x86_64-randconfig-a006-20210312 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7b153b43d3a14d76975039408c4b922beb576735)
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://github.com/0day-ci/linux/commit/93abfa9fa97332c9d5c1727fcf76b604b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jianqun-Xu/mm-slab-kmalloc-with-GFP_DMA32-allocate-from-SLAB_CACHE_DMA32/20210312-160426
git checkout 93abfa9fa97332c9d5c1727fcf76b604b6da33de
# 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 error/warnings (new ones prefixed by >>):
>> mm/slab_common.c:812:24: error: implicit declaration of function 'kmalloc_size' [-Werror,-Wimplicit-function-declaration]
unsigned int size = kmalloc_size(i);
^
>> mm/slab_common.c:813:20: error: implicit declaration of function 'kmalloc_cache_name' [-Werror,-Wimplicit-function-declaration]
const char *n = kmalloc_cache_name("dma32-kmalloc", size);
^
>> mm/slab_common.c:813:16: warning: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Wint-conversion]
const char *n = kmalloc_cache_name("dma32-kmalloc", size);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
vim +/kmalloc_size +812 mm/slab_common.c
761
762 /*
763 * Create the kmalloc array. Some of the regular kmalloc arrays
764 * may already have been created because they were needed to
765 * enable allocations for slab creation.
766 */
767 void __init create_kmalloc_caches(slab_flags_t flags)
768 {
769 int i;
770 enum kmalloc_cache_type type;
771
772 for (type = KMALLOC_NORMAL; type <= KMALLOC_RECLAIM; type++) {
773 for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) {
774 if (!kmalloc_caches[type][i])
775 new_kmalloc_cache(i, type, flags);
776
777 /*
778 * Caches that are not of the two-to-the-power-of size.
779 * These have to be created immediately after the
780 * earlier power of two caches
781 */
782 if (KMALLOC_MIN_SIZE <= 32 && i == 6 &&
783 !kmalloc_caches[type][1])
784 new_kmalloc_cache(1, type, flags);
785 if (KMALLOC_MIN_SIZE <= 64 && i == 7 &&
786 !kmalloc_caches[type][2])
787 new_kmalloc_cache(2, type, flags);
788 }
789 }
790
791 /* Kmalloc array is now usable */
792 slab_state = UP;
793
794 #ifdef CONFIG_ZONE_DMA
795 for (i = 0; i <= KMALLOC_SHIFT_HIGH; i++) {
796 struct kmem_cache *s = kmalloc_caches[KMALLOC_NORMAL][i];
797
798 if (s) {
799 kmalloc_caches[KMALLOC_DMA][i] = create_kmalloc_cache(
800 kmalloc_info[i].name[KMALLOC_DMA],
801 kmalloc_info[i].size,
802 SLAB_CACHE_DMA | flags, 0,
803 kmalloc_info[i].size);
804 }
805 }
806 #endif
807 #ifdef CONFIG_ZONE_DMA32
808 for (i = 0; i <= KMALLOC_SHIFT_HIGH; i++) {
809 struct kmem_cache *s = kmalloc_caches[KMALLOC_NORMAL][i];
810
811 if (s) {
> 812 unsigned int size = kmalloc_size(i);
> 813 const char *n = kmalloc_cache_name("dma32-kmalloc", size);
814
815 BUG_ON(!n);
816 kmalloc_caches[KMALLOC_DMA32][i] = create_kmalloc_cache(
817 n, size, SLAB_CACHE_DMA32 | flags, 0, 0);
818 }
819 }
820 #endif
821 }
822 #endif /* !CONFIG_SLOB */
823
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v3 4/6] soc/tegra: Introduce core power domain driver
by kernel test robot
Hi Dmitry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tegra/for-next]
[also build test WARNING on v5.12-rc2 next-20210311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Dmitry-Osipenko/soc-tegra-Add-de...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
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/0day-ci/linux/commit/5ff989fef87fd532be096fb0c86f7f866...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dmitry-Osipenko/soc-tegra-Add-devm_tegra_core_dev_init_opp_table/20210312-081244
git checkout 5ff989fef87fd532be096fb0c86f7f866655f34c
# 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 warnings (new ones prefixed by >>):
drivers/soc/tegra/core-power-domain.c: In function 'tegra_genpd_set_performance_state':
drivers/soc/tegra/core-power-domain.c:30:8: error: implicit declaration of function 'dev_pm_opp_find_level_ceil'; did you mean 'dev_pm_opp_find_freq_ceil'? [-Werror=implicit-function-declaration]
30 | opp = dev_pm_opp_find_level_ceil(&genpd->dev, &level);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| dev_pm_opp_find_freq_ceil
>> drivers/soc/tegra/core-power-domain.c:30:6: warning: assignment to 'struct dev_pm_opp *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
30 | opp = dev_pm_opp_find_level_ceil(&genpd->dev, &level);
| ^
drivers/soc/tegra/core-power-domain.c:38:8: error: implicit declaration of function 'dev_pm_opp_set_opp'; did you mean 'dev_pm_opp_set_bw'? [-Werror=implicit-function-declaration]
38 | err = dev_pm_opp_set_opp(&genpd->dev, opp);
| ^~~~~~~~~~~~~~~~~~
| dev_pm_opp_set_bw
drivers/soc/tegra/core-power-domain.c: In function 'tegra_core_domain_probe':
drivers/soc/tegra/core-power-domain.c:74:14: error: implicit declaration of function 'devm_pm_opp_set_regulators'; did you mean 'dev_pm_opp_set_regulators'? [-Werror=implicit-function-declaration]
74 | opp_table = devm_pm_opp_set_regulators(&pdev->dev, &rname, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| dev_pm_opp_set_regulators
>> drivers/soc/tegra/core-power-domain.c:74:12: warning: assignment to 'struct opp_table *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
74 | opp_table = devm_pm_opp_set_regulators(&pdev->dev, &rname, 1);
| ^
drivers/soc/tegra/core-power-domain.c: In function 'tegra_core_domain_set_synced':
drivers/soc/tegra/core-power-domain.c:115:8: error: implicit declaration of function 'dev_pm_opp_sync_regulators'; did you mean 'dev_pm_opp_set_regulators'? [-Werror=implicit-function-declaration]
115 | err = dev_pm_opp_sync_regulators(dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| dev_pm_opp_set_regulators
cc1: some warnings being treated as errors
vim +30 drivers/soc/tegra/core-power-domain.c
23
24 static int tegra_genpd_set_performance_state(struct generic_pm_domain *genpd,
25 unsigned int level)
26 {
27 struct dev_pm_opp *opp;
28 int err;
29
> 30 opp = dev_pm_opp_find_level_ceil(&genpd->dev, &level);
31 if (IS_ERR(opp)) {
32 dev_err(&genpd->dev, "failed to find OPP for level %u: %pe\n",
33 level, opp);
34 return PTR_ERR(opp);
35 }
36
37 mutex_lock(&tegra_core_lock);
38 err = dev_pm_opp_set_opp(&genpd->dev, opp);
39 mutex_unlock(&tegra_core_lock);
40
41 dev_pm_opp_put(opp);
42
43 if (err) {
44 dev_err(&genpd->dev, "failed to set voltage to %duV: %d\n",
45 level, err);
46 return err;
47 }
48
49 return 0;
50 }
51
52 static unsigned int
53 tegra_genpd_opp_to_performance_state(struct generic_pm_domain *genpd,
54 struct dev_pm_opp *opp)
55 {
56 return dev_pm_opp_get_level(opp);
57 }
58
59 static int tegra_core_domain_probe(struct platform_device *pdev)
60 {
61 struct generic_pm_domain *genpd;
62 struct opp_table *opp_table;
63 const char *rname = "power";
64 int err;
65
66 genpd = devm_kzalloc(&pdev->dev, sizeof(*genpd), GFP_KERNEL);
67 if (!genpd)
68 return -ENOMEM;
69
70 genpd->name = pdev->dev.of_node->name;
71 genpd->set_performance_state = tegra_genpd_set_performance_state;
72 genpd->opp_to_performance_state = tegra_genpd_opp_to_performance_state;
73
> 74 opp_table = devm_pm_opp_set_regulators(&pdev->dev, &rname, 1);
75 if (IS_ERR(opp_table))
76 return dev_err_probe(&pdev->dev, PTR_ERR(opp_table),
77 "failed to set OPP regulator\n");
78
79 err = pm_genpd_init(genpd, NULL, false);
80 if (err) {
81 dev_err(&pdev->dev, "failed to init genpd: %d\n", err);
82 return err;
83 }
84
85 /*
86 * We have a "PMC -> Core" hierarchy of the power domains where
87 * PMC needs to resume and change performance (voltage) of the
88 * Core domain from the PMC GENPD on/off callbacks, hence we need
89 * to annotate the lock in order to remove confusion from the
90 * lockdep checker when a nested access happens.
91 */
92 lockdep_set_class(&genpd->mlock, &tegra_core_domain_lock_class);
93
94 err = of_genpd_add_provider_simple(pdev->dev.of_node, genpd);
95 if (err) {
96 dev_err(&pdev->dev, "failed to add genpd: %d\n", err);
97 goto remove_genpd;
98 }
99
100 return 0;
101
102 remove_genpd:
103 pm_genpd_remove(genpd);
104
105 return err;
106 }
107
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[abelvesa:imx8mq/icc_devfreq 9/20] include/dt-bindings/interconnect/imx8mn.h:11:25: error: expected '}' before numeric constant
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux.git imx8mq/icc_devfreq
head: e7ebaf0edb2de17797056a67223f57e3e3eea0f0
commit: 6c687abfdce9847f29f938c8e5f0bbe01587a072 [9/20] interconnect: imx8: Remove the imx_icc_node_adj_desc
config: sh-allmodconfig (attached as .config)
compiler: sh4-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/abelvesa/linux.git/commit...
git remote add abelvesa https://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux.git
git fetch --no-tags abelvesa imx8mq/icc_devfreq
git checkout 6c687abfdce9847f29f938c8e5f0bbe01587a072
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
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 drivers/interconnect/imx/imx8mn.c:12:
>> include/dt-bindings/interconnect/imx8mn.h:11:25: error: expected '}' before numeric constant
11 | #define IMX8MN_ICN_NOC 1
| ^
drivers/interconnect/imx/imx.h:33:9: note: in definition of macro 'DEFINE_BUS_INTERCONNECT'
33 | .id = _id, \
| ^~~
drivers/interconnect/imx/imx8mn.c:58:4: note: in expansion of macro 'IMX8MN_ICN_NOC'
58 | IMX8MN_ICN_NOC, IMX8MN_ICS_OCRAM),
| ^~~~~~~~~~~~~~
drivers/interconnect/imx/imx.h:32:2: note: to match this '{'
32 | { \
| ^
drivers/interconnect/imx/imx8mn.c:57:2: note: in expansion of macro 'DEFINE_BUS_INTERCONNECT'
57 | DEFINE_BUS_INTERCONNECT("PL301_MAIN", IMX8MN_ICN_MAIN
| ^~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +11 include/dt-bindings/interconnect/imx8mn.h
4b54bf4763e372 Leonard Crestez 2020-04-28 10
4b54bf4763e372 Leonard Crestez 2020-04-28 @11 #define IMX8MN_ICN_NOC 1
4b54bf4763e372 Leonard Crestez 2020-04-28 12 #define IMX8MN_ICS_DRAM 2
4b54bf4763e372 Leonard Crestez 2020-04-28 13 #define IMX8MN_ICS_OCRAM 3
4b54bf4763e372 Leonard Crestez 2020-04-28 14 #define IMX8MN_ICM_A53 4
4b54bf4763e372 Leonard Crestez 2020-04-28 15
:::::: The code at line 11 was first introduced by commit
:::::: 4b54bf4763e3725dcceaac379df4ef78df3b9fcd interconnect: imx: Add platform driver for imx8mn
:::::: TO: Leonard Crestez <leonard.crestez(a)nxp.com>
:::::: CC: Georgi Djakov <georgi.djakov(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
arch/mips/loongson2ef/lemote-2f/machtype.c:10:13: warning: no previous prototype for 'mach_prom_init_machtype'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f78d76e72a4671ea52d12752d92077788b4f5d50
commit: b13812ddea615b6507beef24f76540c0c1143c5c MIPS: Loongson2ef: Disable Loongson MMI instructions
date: 6 months ago
config: mips-randconfig-r004-20210312 (attached as .config)
compiler: mips64el-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/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 b13812ddea615b6507beef24f76540c0c1143c5c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
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 >>):
>> arch/mips/loongson2ef/lemote-2f/machtype.c:10:13: warning: no previous prototype for 'mach_prom_init_machtype' [-Wmissing-prototypes]
10 | void __init mach_prom_init_machtype(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
--
>> arch/mips/loongson2ef/lemote-2f/pm.c:52:6: warning: no previous prototype for 'setup_wakeup_events' [-Wmissing-prototypes]
52 | void setup_wakeup_events(void)
| ^~~~~~~~~~~~~~~~~~~
>> arch/mips/loongson2ef/lemote-2f/pm.c:90:5: warning: no previous prototype for 'wakeup_loongson' [-Wmissing-prototypes]
90 | int wakeup_loongson(void)
| ^~~~~~~~~~~~~~~
>> arch/mips/loongson2ef/lemote-2f/pm.c:137:13: warning: no previous prototype for 'mach_suspend' [-Wmissing-prototypes]
137 | void __weak mach_suspend(void)
| ^~~~~~~~~~~~
>> arch/mips/loongson2ef/lemote-2f/pm.c:142:13: warning: no previous prototype for 'mach_resume' [-Wmissing-prototypes]
142 | void __weak mach_resume(void)
| ^~~~~~~~~~~
--
>> arch/mips/loongson2ef/common/cs5536/cs5536_ide.c:15:6: warning: no previous prototype for 'pci_ide_write_reg' [-Wmissing-prototypes]
15 | void pci_ide_write_reg(int reg, u32 value)
| ^~~~~~~~~~~~~~~~~
>> arch/mips/loongson2ef/common/cs5536/cs5536_ide.c:96:5: warning: no previous prototype for 'pci_ide_read_reg' [-Wmissing-prototypes]
96 | u32 pci_ide_read_reg(int reg)
| ^~~~~~~~~~~~~~~~
--
>> arch/mips/loongson2ef/common/cs5536/cs5536_acc.c:15:6: warning: no previous prototype for 'pci_acc_write_reg' [-Wmissing-prototypes]
15 | void pci_acc_write_reg(int reg, u32 value)
| ^~~~~~~~~~~~~~~~~
>> arch/mips/loongson2ef/common/cs5536/cs5536_acc.c:62:5: warning: no previous prototype for 'pci_acc_read_reg' [-Wmissing-prototypes]
62 | u32 pci_acc_read_reg(int reg)
| ^~~~~~~~~~~~~~~~
--
>> arch/mips/loongson2ef/common/cs5536/cs5536_ohci.c:15:6: warning: no previous prototype for 'pci_ohci_write_reg' [-Wmissing-prototypes]
15 | void pci_ohci_write_reg(int reg, u32 value)
| ^~~~~~~~~~~~~~~~~~
>> arch/mips/loongson2ef/common/cs5536/cs5536_ohci.c:70:5: warning: no previous prototype for 'pci_ohci_read_reg' [-Wmissing-prototypes]
70 | u32 pci_ohci_read_reg(int reg)
| ^~~~~~~~~~~~~~~~~
--
>> arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:84:6: warning: no previous prototype for 'pci_isa_write_bar' [-Wmissing-prototypes]
84 | void pci_isa_write_bar(int n, u32 value)
| ^~~~~~~~~~~~~~~~~
>> arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:110:5: warning: no previous prototype for 'pci_isa_read_bar' [-Wmissing-prototypes]
110 | u32 pci_isa_read_bar(int n)
| ^~~~~~~~~~~~~~~~
>> arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:134:6: warning: no previous prototype for 'pci_isa_write_reg' [-Wmissing-prototypes]
134 | void pci_isa_write_reg(int reg, u32 value)
| ^~~~~~~~~~~~~~~~~
>> arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:228:5: warning: no previous prototype for 'pci_isa_read_reg' [-Wmissing-prototypes]
228 | u32 pci_isa_read_reg(int reg)
| ^~~~~~~~~~~~~~~~
--
>> arch/mips/loongson2ef/common/cs5536/cs5536_ehci.c:15:6: warning: no previous prototype for 'pci_ehci_write_reg' [-Wmissing-prototypes]
15 | void pci_ehci_write_reg(int reg, u32 value)
| ^~~~~~~~~~~~~~~~~~
>> arch/mips/loongson2ef/common/cs5536/cs5536_ehci.c:75:5: warning: no previous prototype for 'pci_ehci_read_reg' [-Wmissing-prototypes]
75 | u32 pci_ehci_read_reg(int reg)
| ^~~~~~~~~~~~~~~~~
vim +/mach_prom_init_machtype +10 arch/mips/loongson2ef/lemote-2f/machtype.c
1b39a0bad50779 arch/mips/loongson/lemote-2f/machtype.c Wu Zhangjin 2010-01-04 9
1b39a0bad50779 arch/mips/loongson/lemote-2f/machtype.c Wu Zhangjin 2010-01-04 @10 void __init mach_prom_init_machtype(void)
:::::: The code at line 10 was first introduced by commit
:::::: 1b39a0bad50779177ebca818c6c3380463bfca7d MIPS: Loongson: Lemote-2F: Get the machine type from PMON_VER
:::::: TO: Wu Zhangjin <wuzhangjin(a)gmail.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[intel-linux-intel-lts:5.4/yocto 14766/15157] drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 1fb75387e725710ca9427292c43d24d34397e1c2
commit: 23eaaf813799b52b3df39373c4c82d81a0988816 [14766/15157] igc: Add support for PTP getcrosststamp()
config: x86_64-randconfig-s021-20210312 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://github.com/intel/linux-intel-lts/commit/23eaaf813799b52b3df39373c...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 23eaaf813799b52b3df39373c4c82d81a0988816
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
vim +457 drivers/net/ethernet/intel/igc/igc_ptp.c
441
442 static void igc_ptm_gather_report(struct igc_adapter *adapter)
443 {
444 struct igc_hw *hw = &adapter->hw;
445 u32 t2_curr_h, t2_curr_l;
446 ktime_t t1, t2_curr;
447
448 t1 = ktime_set(rd32(IGC_PTM_T1_TIM0_H),
449 rd32(IGC_PTM_T1_TIM0_L));
450
451 t2_curr_l = rd32(IGC_PTM_CURR_T2_L);
452 t2_curr_h = rd32(IGC_PTM_CURR_T2_H);
453
454 /* FIXME: There's an ambiguity on what endianness some PCIe PTM
455 * messages should use. Find a more robust way to handle this.
456 */
> 457 t2_curr_h = be32_to_cpu(t2_curr_h);
458
459 t2_curr = ((s64)t2_curr_h << 32 | t2_curr_l);
460
461 wr32(IGC_PTM_STAT, IGC_PTM_STAT_VALID);
462
463 mutex_lock(&adapter->ptm_time_lock);
464
465 /* Because get_device_system_crosststamp() requires that the
466 * historic timestamp is before the PTM device/host
467 * timestamps, we keep track of the current and previous
468 * snapshot (historic timestamp).
469 */
470 memcpy(&adapter->prev_snapshot,
471 &adapter->curr_snapshot, sizeof(adapter->prev_snapshot));
472 ktime_get_snapshot(&adapter->curr_snapshot);
473
474 adapter->ptm_device_time = t1;
475 adapter->ptm_host_time = igc_device_tstamp_to_system(t2_curr);
476 mutex_unlock(&adapter->ptm_time_lock);
477
478 mod_delayed_work(system_wq, &adapter->ptm_report,
479 msecs_to_jiffies(IGC_PTM_CYCLE_TIME_MSECS));
480 }
481
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[leon-rdma:rdma-next 13/42] drivers/infiniband/hw/mlx5/odp.c:1544 mlx5r_odp_create_eq() warn: missing error code 'err'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head: 05f9b877d9328976740745c6f5451a83685920d6
commit: 44d753250016442d012948cd500e94dfb4f1eea4 [13/42] RDMA/mlx5: Create ODP EQ only when ODP MR is created
config: arc-randconfig-m031-20210311 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/infiniband/hw/mlx5/odp.c:1544 mlx5r_odp_create_eq() warn: missing error code 'err'
Old smatch warnings:
drivers/infiniband/hw/mlx5/odp.c:264 mlx5_ib_invalidate_range() warn: should '(((1))) << (umem_odp->page_shift)' be a 64 bit type?
vim +/err +1544 drivers/infiniband/hw/mlx5/odp.c
1533
1534 int mlx5r_odp_create_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf_eq *eq)
1535 {
1536 struct mlx5_eq_param param = {};
1537 int err = 0;
1538
1539 if (eq->core)
1540 return 0;
1541
1542 mutex_lock(&dev->odp_eq_mutex);
1543 if (eq->core)
> 1544 goto unlock;
1545 INIT_WORK(&eq->work, mlx5_ib_eq_pf_action);
1546 spin_lock_init(&eq->lock);
1547 eq->dev = dev;
1548
1549 eq->pool = mempool_create_kmalloc_pool(MLX5_IB_NUM_PF_DRAIN,
1550 sizeof(struct mlx5_pagefault));
1551 if (!eq->pool) {
1552 err = -ENOMEM;
1553 goto unlock;
1554 }
1555
1556 eq->wq = alloc_workqueue("mlx5_ib_page_fault",
1557 WQ_HIGHPRI | WQ_UNBOUND | WQ_MEM_RECLAIM,
1558 MLX5_NUM_CMD_EQE);
1559 if (!eq->wq) {
1560 err = -ENOMEM;
1561 goto err_mempool;
1562 }
1563
1564 eq->irq_nb.notifier_call = mlx5_ib_eq_pf_int;
1565 param = (struct mlx5_eq_param){
1566 .irq_index = 0,
1567 .nent = MLX5_IB_NUM_PF_EQE,
1568 };
1569 param.mask[0] = 1ull << MLX5_EVENT_TYPE_PAGE_FAULT;
1570 eq->core = mlx5_eq_create_generic(dev->mdev, ¶m);
1571 if (IS_ERR(eq->core)) {
1572 err = PTR_ERR(eq->core);
1573 goto err_wq;
1574 }
1575 err = mlx5_eq_enable(dev->mdev, eq->core, &eq->irq_nb);
1576 if (err) {
1577 mlx5_ib_err(dev, "failed to enable odp EQ %d\n", err);
1578 goto err_eq;
1579 }
1580
1581 mutex_unlock(&dev->odp_eq_mutex);
1582 return 0;
1583 err_eq:
1584 mlx5_eq_destroy_generic(dev->mdev, eq->core);
1585 err_wq:
1586 eq->core = NULL;
1587 destroy_workqueue(eq->wq);
1588 err_mempool:
1589 mempool_destroy(eq->pool);
1590 unlock:
1591 mutex_unlock(&dev->odp_eq_mutex);
1592 return err;
1593 }
1594
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months