Subject: Re: linux-next: build warnings after merge of the pci tree

From: Philipp Stanner <[email-masked]>
Date: Tue, 06 Feb 2024 21:21:46 +0100

Hi,

On Mon, 2024-02-05 at 16:09 +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the pci tree, today's linux-next build (htmldocs)
> produced
> these warnings:
> 
> Documentation/driver-api/pci/pci.rst:27: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:27.
> Declaration is '.. c:function:: void __iomem *pci_iomap_range(struct
> pci_dev *dev, int bar, unsigned long offset, unsigned long maxlen)'.
> Documentation/driver-api/pci/pci.rst:27: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:27.
> Declaration is '.. c:None:: struct pci_dev *dev'.
> Documentation/driver-api/pci/pci.rst:27: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:27.
> Declaration is '.. c:None:: int bar'.
> Documentation/driver-api/pci/pci.rst:27: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:27.
> Declaration is '.. c:None:: unsigned long offset'.
> Documentation/driver-api/pci/pci.rst:27: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:27.
> Declaration is '.. c:None:: unsigned long maxlen'.
> Documentation/driver-api/pci/pci.rst:67: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:67.
> Declaration is '.. c:function:: void __iomem
> *pci_iomap_wc_range(struct pci_dev *dev, int bar, unsigned long
> offset, unsigned long maxlen)'.
> Documentation/driver-api/pci/pci.rst:67: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:67.
> Declaration is '.. c:None:: struct pci_dev *dev'.
> Documentation/driver-api/pci/pci.rst:67: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:67.
> Declaration is '.. c:None:: int bar'.
> Documentation/driver-api/pci/pci.rst:67: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:67.
> Declaration is '.. c:None:: unsigned long offset'.
> Documentation/driver-api/pci/pci.rst:67: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:67.
> Declaration is '.. c:None:: unsigned long maxlen'.
> Documentation/driver-api/pci/pci.rst:110: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:110.
> Declaration is '.. c:function:: void __iomem *pci_iomap(struct
> pci_dev *dev, int bar, unsigned long maxlen)'.
> Documentation/driver-api/pci/pci.rst:110: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:110.
> Declaration is '.. c:None:: struct pci_dev *dev'.
> Documentation/driver-api/pci/pci.rst:110: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:110.
> Declaration is '.. c:None:: int bar'.
> Documentation/driver-api/pci/pci.rst:110: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:110.
> Declaration is '.. c:None:: unsigned long maxlen'.
> Documentation/driver-api/pci/pci.rst:131: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:131.
> Declaration is '.. c:function:: void __iomem *pci_iomap_wc(struct
> pci_dev *dev, int bar, unsigned long maxlen)'.
> Documentation/driver-api/pci/pci.rst:131: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:131.
> Declaration is '.. c:None:: struct pci_dev *dev'.
> Documentation/driver-api/pci/pci.rst:131: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:131.
> Declaration is '.. c:None:: int bar'.
> Documentation/driver-api/pci/pci.rst:131: WARNING: Duplicate C
> declaration, also defined at driver-api/device-io:131.
> Declaration is '.. c:None:: unsigned long maxlen'.
> 
> Introduced by commit
> 
>   fbcc7d7f7948 ("PCI: Move pci_iomap.c to drivers/pci/")

Oh oh – Mea culpa. Will fix this.

I'd just ask for some direction how to fix it. My instinct would be to
just remove it from device-io.rst, since it's very PCI-specific; What
do you think?

P.