From: Roland Dreier <rdreier@cisco.com>
To: "Mingarelli, Thomas" <Thomas.Mingarelli@hp.com>,
Wim Van Sebroeck <wim@iguana.be>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH for 2.6.26] [WATCHDOG] Fix return value warning in hpwdt
Date: Thu, 28 Feb 2008 09:48:10 -0800 [thread overview]
Message-ID: <adaabllx99h.fsf_-_@cisco.com> (raw)
In-Reply-To: <adaejaxx9p7.fsf_-_@cisco.com> (Roland Dreier's message of "Thu, 28 Feb 2008 09:38:44 -0800")
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);
}
}
next prev parent reply other threads:[~2008-02-28 17:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-27 17:08 hpwdt oops in clflush_cache_range Roland Dreier
2008-02-27 17:37 ` Mingarelli, Thomas
2008-02-27 18:14 ` Thomas Gleixner
2008-02-27 18:38 ` Roland Dreier
2008-02-27 19:48 ` Thomas Gleixner
2008-02-27 20:36 ` Ingo Molnar
2008-02-27 20:42 ` Thomas Gleixner
2008-02-27 20:44 ` Ingo Molnar
2008-02-27 20:59 ` Thomas Gleixner
2008-02-27 21:14 ` Ingo Molnar
2008-02-27 21:17 ` Roland Dreier
2008-02-27 21:35 ` Roland Dreier
2008-02-27 23:44 ` Mingarelli, Thomas
2008-02-28 0:12 ` Roland Dreier
2008-02-28 3:09 ` Mingarelli, Thomas
[not found] ` <E14D1C2A44812C4F9C3ED321127EDF6505829D5D6C@G3W0854.americas.hpqcorp.net>
2008-02-28 17:38 ` [PATCH] [WATCHDOG] Fix declaration of struct smbios_entry_point in hpwdt Roland Dreier
2008-02-28 17:48 ` Roland Dreier [this message]
2008-02-28 20:34 ` [PATCH] [WATCHDOG] hpwdt: Use dmi_walk() instead of own copy Roland Dreier
2008-02-28 21:24 ` Mingarelli, Thomas
2008-02-28 21:26 ` Wim Van Sebroeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adaabllx99h.fsf_-_@cisco.com \
--to=rdreier@cisco.com \
--cc=Thomas.Mingarelli@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.