[linux-next:master 5823/6789] drivers/gpu/drm/radeon/radeon_bios.c:614:12: warning: 'radeon_acpi_vfct_match' defined but not used
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b8809969e1d7a591e0f49dd464a5d04b3cf02ab1 commit: 33a18ecd2fbf6bcbf803836e94eb31c26f4c7f41 [5823/6789] drm/radeon: Fix VFCT bus number matching with soft filter config: openrisc-allmodconfig (https://download.01.org/0day-ci/archive/20260718/[email protected]/config) compiler: or1k-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260718/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): >> drivers/gpu/drm/radeon/radeon_bios.c:614:12: warning: 'radeon_acpi_vfct_match' defined but not used [-Wunused-function] 614 | static int radeon_acpi_vfct_match(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~~~~~ vim +/radeon_acpi_vfct_match +614 drivers/gpu/drm/radeon/radeon_bios.c 598 599 /** 600 * radeon_acpi_vfct_match() - Check if a VFCT entry matches the device 601 * @rdev: Radeon device 602 * @vhdr: VFCT image header to check 603 * 604 * VFCT entries contain the PCI bus number as recorded during BIOS POST. 605 * On systems where the kernel renumbers PCI buses (e.g. pci=realloc or 606 * resource conflicts), the runtime bus number may differ from the POST 607 * value. Match by device identity (vendor + device + function) and use 608 * the bus number as a preference: exact bus match is preferred, but when 609 * the bus numbers disagree we accept the entry if the device identity 610 * matches. 611 * 612 * Returns: 0 on match, -ENODEV on no match 613 */ > 614 static int radeon_acpi_vfct_match(struct radeon_device *rdev, 615 VFCT_IMAGE_HEADER *vhdr) 616 { 617 /* Vendor and device IDs must always match */ 618 if (vhdr->VendorID != rdev->pdev->vendor || 619 vhdr->DeviceID != rdev->pdev->device) 620 return -ENODEV; 621 622 if (vhdr->PCIDevice != PCI_SLOT(rdev->pdev->devfn) || 623 vhdr->PCIFunction != PCI_FUNC(rdev->pdev->devfn)) 624 return -ENODEV; 625 626 /* Exact bus number match - preferred */ 627 if (vhdr->PCIBus == rdev->pdev->bus->number) 628 return 0; 629 630 /* Bus mismatch but device identity matches (PCI renumbering case) */ 631 dev_notice(&rdev->pdev->dev, 632 "VFCT bus number mismatch: table %u != runtime %u, matching by device identity (vendor 0x%04x device 0x%04x)\n", 633 vhdr->PCIBus, rdev->pdev->bus->number, 634 rdev->pdev->vendor, rdev->pdev->device); 635 return 0; 636 } 637 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki