powerpc: Fix warning in pci_64.c
PATCH 1/1 powerpc: Fix warning in pci_64.c
Fix a warning due to unused result from device_create_file in arch/powerpc/kernel/pci_64.c
arch/powerpc/kernel/pci_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/kernel/pci_64.c +2 -1
@@ -878,7 +878,8 @@ static DEVICE_ATTR(devspec, S_IRUGO, pcivoid pcibios_add_platform_entries (struct pci_dev *pdev) { -device_create_file (&pdev->dev, &dev_attr_devspec); +int rc =device_create_file (&pdev->dev, &dev_attr_devspec); +WARN_ON (rc !=0 ); }#define ISA_SPACE_MASK 0x1
arch/powerpc/kernel/pci_64.c static DEVICE_ATTR(devspec, S_IRUGO, pci · line 882
Quoted 6 lines · On Tue, 15 May 2007 14:16:35 +1000 Benjamin Herrenschmidt…
void
pcibios_add_platform_entries(struct pci_dev *pdev){arch/powerpc/kernel/pci_64.c +2
-1-device_create_file (&pdev->dev, &dev_attr_devspec); +int rc =device_create_file (&pdev->dev, &dev_attr_devspec); +WARN_ON (rc !=0 );
If we really don't care if the file is not created, then it is probably worth a comment as to why ...
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/
Quoted 10 lines · Stephen Rothwell
arch/powerpc/kernel/pci_64.c static DEVICE_ATTR(devspec, S_IRUGO, pci · line 882
Quoted 6 lines · On Tue, 15 May 2007 14:16:35 +1000 Benjamin Herrenschmidt…
void
pcibios_add_platform_entries(struct pci_dev *pdev){arch/powerpc/kernel/pci_64.c +2
-1-device_create_file (&pdev->dev, &dev_attr_devspec); +int rc =device_create_file (&pdev->dev, &dev_attr_devspec); +WARN_ON (rc !=0 );If we really don't care if the file is not created, then it is probably worth a comment as to why ...
Greg already has a patch from me to fix that.
cheers
Signature · 8 lines
Michael Ellerman OzLabs, IBM Australia Development Lab wwweb: http://michael.ellerman.id.au phone: +61 2 6212 1183 (tie line 70 21183) We do not inherit the earth from our ancestors, we borrow it from our children. - S.M.A.R.T Person
Quoted 10 lines · Stephen Rothwell
arch/powerpc/kernel/pci_64.c static DEVICE_ATTR(devspec, S_IRUGO, pci · line 882
Quoted 6 lines · On Tue, 15 May 2007 14:16:35 +1000 Benjamin Herrenschmidt…
void
pcibios_add_platform_entries(struct pci_dev *pdev){arch/powerpc/kernel/pci_64.c +2
-1-device_create_file (&pdev->dev, &dev_attr_devspec); +int rc =device_create_file (&pdev->dev, &dev_attr_devspec); +WARN_ON (rc !=0 );If we really don't care if the file is not created, then it is probably worth a comment as to why ...
Well, if it's not created, then something is badly wrong thus a WARN_ON ... Do you think I should do more ?
Ben.
Quoted 12 lines · Benjamin Herrenschmidt
Quoted 10 lines · Stephen Rothwell
arch/powerpc/kernel/pci_64.c static DEVICE_ATTR(devspec, S_IRUGO, pci · line 882
Quoted 6 lines · On Tue, 15 May 2007 14:16:35 +1000 Benjamin Herrenschmidt…
void
pcibios_add_platform_entries(struct pci_dev *pdev){arch/powerpc/kernel/pci_64.c +2
-1-device_create_file (&pdev->dev, &dev_attr_devspec); +int rc =device_create_file (&pdev->dev, &dev_attr_devspec); +WARN_ON (rc !=0 );If we really don't care if the file is not created, then it is probably worth a comment as to why ...
Quoted 2 lines
Well, if it's not created, then something is badly wrong thus a
WARN_ON... Do you think I should do more ?
Yes, fix the pci_32.c version of this as well (if it hasn't been) :)
- k