* [PATCH] frv: pci-frv: fix build warning
@ 2017-01-12 21:27 Sudip Mukherjee
0 siblings, 0 replies; only message in thread
From: Sudip Mukherjee @ 2017-01-12 21:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Sudip Mukherjee
The build of frv defconfig gives warning:
arch/frv/mb93090-mb00/pci-frv.c:176:5: warning:
ignoring return value of 'pci_assign_resource',
declared with attribute warn_unused_result
Just print an error message to silence the warning. We can not do much
here on error.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
arch/frv/mb93090-mb00/pci-frv.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c
index 34bb4b1..c452ddb 100644
--- a/arch/frv/mb93090-mb00/pci-frv.c
+++ b/arch/frv/mb93090-mb00/pci-frv.c
@@ -147,7 +147,7 @@ static void __init pcibios_allocate_resources(int pass)
static void __init pcibios_assign_resources(void)
{
struct pci_dev *dev = NULL;
- int idx;
+ int idx, err;
struct resource *r;
for_each_pci_dev(dev) {
@@ -172,8 +172,13 @@ static void __init pcibios_assign_resources(void)
* the BIOS forgot to do so or because we have decided the old
* address was unusable for some reason.
*/
- if (!r->start && r->end)
- pci_assign_resource(dev, idx);
+ if (!r->start && r->end) {
+ err = pci_assign_resource(dev, idx);
+ if (err)
+ dev_err(&dev->dev,
+ "Failed to assign new address to %d\n",
+ idx);
+ }
}
}
}
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-12 21:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 21:27 [PATCH] frv: pci-frv: fix build warning Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®