Skip to content

Commit 4ac7b82

Browse files
sravnborgdavem330
authored andcommitted
sparc64: fix sparse warning in pci.c
Fix following warning: pci.c:886:5: warning: symbol 'pci64_dma_supported' was not declared. Should it be static? Add proper prototype in kernel.h and delete local prototype in iommu.c Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a0c54a2 commit 4ac7b82

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎arch/sparc/kernel/iommu.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <asm/iommu.h>
2222

2323
#include "iommu_common.h"
24+
#include "kernel.h"
2425

2526
#define STC_CTXMATCH_ADDR(STC, CTX) \
2627
((STC)->strbuf_ctxmatch_base + ((CTX) << 3))
@@ -840,8 +841,6 @@ static struct dma_map_ops sun4u_dma_ops = {
840841
struct dma_map_ops *dma_ops = &sun4u_dma_ops;
841842
EXPORT_SYMBOL(dma_ops);
842843

843-
extern int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask);
844-
845844
int dma_supported(struct device *dev, u64 device_mask)
846845
{
847846
struct iommu *iommu = dev->archdata.iommu;

‎arch/sparc/kernel/kernel.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ void __irq_entry smp_new_mmu_context_version_client(int irq, struct pt_regs *reg
4141
void __irq_entry smp_penguin_jailcell(int irq, struct pt_regs *regs);
4242
void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs);
4343

44+
/* pci.c */
45+
int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask);
46+
4447
#endif
4548

4649
#ifdef CONFIG_SPARC32

‎arch/sparc/kernel/pci.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <asm/apb.h>
2929

3030
#include "pci_impl.h"
31+
#include "kernel.h"
3132

3233
/* List of all PCI controllers found in the system. */
3334
struct pci_pbm_info *pci_pbm_root = NULL;

0 commit comments

Comments
 (0)