Skip to contentSkip to conversation

linux-next: build warning after merge of the iommu tree

PATCH New Stephen Rothwell 2 participants 3 messages Feb 27, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Joerg,

After merging the iommu tree, today's linux-next build (arm multi_v7_defconfig) produced this warning:

In file included from drivers/pci/pci.c:32:
include/linux/pci-ats.h:70:12: warning: 'pci_prg_resp_pasid_required' defined but not used [-Wunused-function]
static int pci_prg_resp_pasid_required(struct pci_dev *pdev)

            ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduced by commit

e5567f5f6762 ("PCI/ATS: Add pci_prg_resp_pasid_required() interface.")

The non CONFIG_PCI_PASID version needs an "inline".

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi,

Quoted 8 lines · Stephen Rothwell

Hi Joerg,

After merging the iommu tree, today's linux-next build (arm multi_v7_defconfig) produced this warning:

In file included from drivers/pci/pci.c:32:
include/linux/pci-ats.h:70:12: warning: 'pci_prg_resp_pasid_required' defined but not used [-Wunused-function]
static int pci_prg_resp_pasid_required(struct pci_dev *pdev)

Quoted 7 lines
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduced by commit

   e5567f5f6762 ("PCI/ATS: Add pci_prg_resp_pasid_required() interface.")

The non CONFIG_PCI_PASID version needs an "inline".

I can submit the fix, but do we need a new patch to fix it or the original patch can be updated ?

Quoted 1 line
Signature · 2 lines
Sathyanarayanan Kuppuswamy
Linux kernel developer
#2 lore raw

PATCH 1/1 PCI/ATS: Add inline to pci_prg_resp_pasid_required()

In reply to Stephen Rothwell

Fix unused function warning when compiled with CONFIG_PCI_PASID disabled.

Fixes e5567f5f6762 ("PCI/ATS: Add pci_prg_resp_pasid_required() interface.")
---
 include/linux/pci-ats.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/pci-ats.h +1 -1
index facfd6a18fe1..1ebb88e7c184 100644
@@ -67,7 +67,7 @@ static inline int pci_max_pasids(struct pci_dev *pdev)
 	return -EINVAL;
 }
 
-static int pci_prg_resp_pasid_required(struct pci_dev *pdev)
+static inline int pci_prg_resp_pasid_required(struct pci_dev *pdev)
 {
 	return 0;
 }
Signature · 1 line
2.20.1