From: Dave Young <dyoung@redhat.com>
To: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: vgoyal@redhat.com
Subject: [PATCH] EFI: use nr_tables param directly in efi_config_init
Date: Thu, 12 Sep 2013 16:45:28 +0800 [thread overview]
Message-ID: <20130912084528.GA13448@dhcp-16-126.nay.redhat.com> (raw)
efi_config_init has the parameter nr_tables. Just use it instead of
dereference efi.systab->nr_tables.
Signed-off-by: Dave Young <dyoung@redhat.com>
---
arch/x86/platform/efi/efi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- linux-2.6.orig/arch/x86/platform/efi/efi.c
+++ linux-2.6/arch/x86/platform/efi/efi.c
@@ -599,7 +599,7 @@ static int __init efi_config_init(u64 ta
tablep = config_tables;
pr_info("");
- for (i = 0; i < efi.systab->nr_tables; i++) {
+ for (i = 0; i < nr_tables; i++) {
efi_guid_t guid;
unsigned long table;
@@ -612,8 +612,7 @@ static int __init efi_config_init(u64 ta
if (table64 >> 32) {
pr_cont("\n");
pr_err("Table located above 4GB, disabling EFI.\n");
- early_iounmap(config_tables,
- efi.systab->nr_tables * sz);
+ early_iounmap(config_tables, nr_tables * sz);
return -EINVAL;
}
#endif
@@ -648,7 +647,7 @@ static int __init efi_config_init(u64 ta
tablep += sz;
}
pr_cont("\n");
- early_iounmap(config_tables, efi.systab->nr_tables * sz);
+ early_iounmap(config_tables, nr_tables * sz);
return 0;
}
next reply other threads:[~2013-09-12 8:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 8:45 Dave Young [this message]
2013-09-17 15:49 ` Matt Fleming
2013-09-18 1:37 ` Dave Young
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=20130912084528.GA13448@dhcp-16-126.nay.redhat.com \
--to=dyoung@redhat.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.com \
/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 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®