lkml.org 
[lkml]   [2008]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH for 2.6.26] [WATCHDOG] Fix return value warning in hpwdt
From
Date
The return value of smbios_scan_machine() is never used, and when it
succeeds it doesn't return anything, so just make it void. This fixes:

drivers/watchdog/hpwdt.c: In function 'smbios_scan_machine':
drivers/watchdog/hpwdt.c:562: warning: control reaches end of non-void function

Signed-off-by: Roland Dreier <rolandd@cisco.com>
---
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index a2e174b..b1cd0ac 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -528,20 +528,19 @@ static int __devinit smbios_present(const char __iomem *p)
return -ENODEV;
}

-static int __devinit smbios_scan_machine(void)
+static void __devinit smbios_scan_machine(void)
{
char __iomem *p, *q;
- int rc;

if (efi_enabled) {
if (efi.smbios == EFI_INVALID_TABLE_ADDR)
- return -ENODEV;
+ return;

p = ioremap(efi.smbios, 32);
if (p == NULL)
- return -ENOMEM;
+ return;

- rc = smbios_present(p);
+ smbios_present(p);
iounmap(p);
} else {
/*
@@ -549,14 +548,12 @@ static int __devinit smbios_scan_machine(void)
*/
p = ioremap(PCI_ROM_BASE1, ROM_SIZE);
if (p == NULL)
- return -ENOMEM;
+ return;

- for (q = p; q < p + ROM_SIZE; q += 16) {
- rc = smbios_present(q);
- if (!rc) {
+ for (q = p; q < p + ROM_SIZE; q += 16)
+ if (!smbios_present(q))
break;
- }
- }
+
iounmap(p);
}
}

\
 
 \ /
  Last update: 2008-02-28 18:51    [W:0.078 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site