* [PATCH] x86: check function status in EDD boot code
@ 2008-07-18 12:35 Jan Beulich
2008-07-18 21:33 ` H. Peter Anvin
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2008-07-18 12:35 UTC (permalink / raw)
To: mingo, tglx, hpa; +Cc: linux-kernel
Without checking the return value of get_edd_info() and adding the
entry only in the success case, 6 devices show up under
/sys/firmware/edd/, no matter how many devices are actually present.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
arch/x86/boot/edd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.26/arch/x86/boot/edd.c 2008-07-13 23:51:29.000000000 +0200
+++ 2.6.26-x86-edd/arch/x86/boot/edd.c 2008-07-15 19:20:52.000000000 +0200
@@ -167,9 +167,8 @@ void query_edd(void)
* Scan the BIOS-supported hard disks and query EDD
* information...
*/
- get_edd_info(devno, &ei);
-
- if (boot_params.eddbuf_entries < EDDMAXNR) {
+ if (!get_edd_info(devno, &ei)
+ && boot_params.eddbuf_entries < EDDMAXNR) {
memcpy(edp, &ei, sizeof ei);
edp++;
boot_params.eddbuf_entries++;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: check function status in EDD boot code
2008-07-18 12:35 [PATCH] x86: check function status in EDD boot code Jan Beulich
@ 2008-07-18 21:33 ` H. Peter Anvin
0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2008-07-18 21:33 UTC (permalink / raw)
To: Jan Beulich; +Cc: mingo, tglx, linux-kernel
Jan Beulich wrote:
> Without checking the return value of get_edd_info() and adding the
> entry only in the success case, 6 devices show up under
> /sys/firmware/edd/, no matter how many devices are actually present.
>
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
Applied to x86/setup, thanks.
-hpa
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-18 21:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 12:35 [PATCH] x86: check function status in EDD boot code Jan Beulich
2008-07-18 21:33 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).