提交 7caaf7ef 编写于 作者: A Anton Vorontsov

ARM: cns3xxx: Fix newly introduced warnings in the PCIe code

commit d5341942 ("PCI: Make the struct
pci_dev * argument of pci_fixup_irqs const") did not change argument
of pdev_to_cnspci(), and thus introduced the following warnings:

  CHECK   arch/arm/mach-cns3xxx/pcie.c
pcie.c:177:60: warning: incorrect type in argument 1 (different modifiers)
pcie.c:177:60:    expected struct pci_dev *dev
pcie.c:177:60:    got struct pci_dev const *dev
  CC      arch/arm/mach-cns3xxx/pcie.o
pcie.c: In function 'cns3xxx_pcie_map_irq':
pcie.c:177: warning: passing argument 1 of 'pdev_to_cnspci' discards qualifiers from pointer target type
pcie.c:52: note: expected 'struct pci_dev *' but argument is of type 'const struct pci_dev *'

This patch fixes the issue.
Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
上级 83a497ca
...@@ -49,7 +49,7 @@ static struct cns3xxx_pcie *sysdata_to_cnspci(void *sysdata) ...@@ -49,7 +49,7 @@ static struct cns3xxx_pcie *sysdata_to_cnspci(void *sysdata)
return &cns3xxx_pcie[root->domain]; return &cns3xxx_pcie[root->domain];
} }
static struct cns3xxx_pcie *pdev_to_cnspci(struct pci_dev *dev) static struct cns3xxx_pcie *pdev_to_cnspci(const struct pci_dev *dev)
{ {
return sysdata_to_cnspci(dev->sysdata); return sysdata_to_cnspci(dev->sysdata);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册