Hi Kishon, FYI, the error/warning still remains. tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-android-linux-4.19.y head: 20d9ad36f92141a98a70087e892db61e3454d5cf commit: 49d0c5ab68e9f78904a0b582b18300c1e786a0ff [14919/22923] PCI: cadence: Avoid using phys_to_virt() for reading MSI-X table config: i386-randconfig-s001-20210108 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-208-g46a52ca4-dirty git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git git fetch --no-tags ti ti-android-linux-4.19.y git checkout 49d0c5ab68e9f78904a0b582b18300c1e786a0ff # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/pci/controller/pcie-cadence-ep.c: In function 'cdns_pcie_ep_send_msix_irq': >> drivers/pci/controller/pcie-cadence-ep.c:619:33: warning: variable 'vec_ctrl' set but not used [-Wunused-but-set-variable] 619 | u32 tbl_offset, msg_data, reg, vec_ctrl; | ^~~~~~~~ vim +/vec_ctrl +619 drivers/pci/controller/pcie-cadence-ep.c 613 614 static int cdns_pcie_ep_send_msix_irq(struct cdns_pcie_ep *ep, u8 fn, u8 vfn, 615 u16 interrupt_num) 616 { 617 u32 sriov_cap = CDNS_PCIE_EP_FUNC_SRIOV_CAP_OFFSET; 618 u32 cap = CDNS_PCIE_EP_FUNC_MSIX_CAP_OFFSET; > 619 u32 tbl_offset, msg_data, reg, vec_ctrl; 620 struct cdns_pcie *pcie = &ep->pcie; 621 struct pci_epf_msix_tbl *msix_tbl; 622 struct pci_epf_bar *epf_bar; 623 u32 first_vf_offset, stride; 624 struct cdns_pcie_epf *epf; 625 u64 pci_addr_mask = 0xff; 626 u64 msg_addr; 627 u16 flags; 628 u8 bir; 629 630 epf = &ep->epf[fn]; 631 632 if (vfn > 0) { 633 first_vf_offset = cdns_pcie_ep_fn_readw(pcie, fn, sriov_cap + 634 PCI_SRIOV_VF_OFFSET); 635 stride = cdns_pcie_ep_fn_readw(pcie, fn, sriov_cap + 636 PCI_SRIOV_VF_STRIDE); 637 fn = fn + first_vf_offset + ((vfn - 1) * stride); 638 epf = &epf->epf[vfn - 1]; 639 } 640 641 /* Check whether the MSI-X feature has been enabled by the PCI host. */ 642 flags = cdns_pcie_ep_fn_readw(pcie, fn, cap + PCI_MSIX_FLAGS); 643 if (!(flags & PCI_MSIX_FLAGS_ENABLE)) 644 return -EINVAL; 645 646 reg = cap + PCI_MSIX_TABLE; 647 tbl_offset = cdns_pcie_ep_fn_readl(pcie, fn, reg); 648 bir = tbl_offset & PCI_MSIX_TABLE_BIR; 649 tbl_offset &= PCI_MSIX_TABLE_OFFSET; 650 651 epf_bar = epf->epf_bar[bir]; 652 msix_tbl = epf_bar->addr; 653 msix_tbl = (struct pci_epf_msix_tbl *)((char *)msix_tbl + tbl_offset); 654 655 msg_addr = msix_tbl[(interrupt_num - 1)].msg_addr; 656 msg_data = msix_tbl[(interrupt_num - 1)].msg_data; 657 vec_ctrl = msix_tbl[(interrupt_num - 1)].vector_ctrl; 658 659 /* Set the outbound region if needed. */ 660 if (unlikely(ep->irq_pci_addr != (msg_addr & ~pci_addr_mask) || 661 ep->irq_pci_fn != fn)) { 662 /* First region was reserved for IRQ writes. */ 663 cdns_pcie_set_outbound_region(pcie, fn, 0, 664 false, 665 ep->irq_phys_addr, 666 msg_addr & ~pci_addr_mask, 667 pci_addr_mask + 1); 668 ep->irq_pci_addr = (msg_addr & ~pci_addr_mask); 669 ep->irq_pci_fn = fn; 670 } 671 writel(msg_data, ep->irq_cpu_addr + (msg_addr & pci_addr_mask)); 672 673 return 0; 674 } 675 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org