mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] EFI: use nr_tables param directly in efi_config_init
@ 2013-09-12  8:45 Dave Young
  2013-09-17 15:49 ` Matt Fleming
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Young @ 2013-09-12  8:45 UTC (permalink / raw)
  To: linux-efi, linux-kernel; +Cc: vgoyal

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;
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] EFI: use nr_tables param directly in efi_config_init
  2013-09-12  8:45 [PATCH] EFI: use nr_tables param directly in efi_config_init Dave Young
@ 2013-09-17 15:49 ` Matt Fleming
  2013-09-18  1:37   ` Dave Young
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Fleming @ 2013-09-17 15:49 UTC (permalink / raw)
  To: Dave Young; +Cc: linux-efi, linux-kernel, vgoyal

On Thu, 12 Sep, at 04:45:28PM, Dave Young wrote:
> 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;
>  }

Thanks Dave, but this patch should no longer be necessary because of the
changes sitting in the 'next' branch at,

  git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git

-- 
Matt Fleming, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] EFI: use nr_tables param directly in efi_config_init
  2013-09-17 15:49 ` Matt Fleming
@ 2013-09-18  1:37   ` Dave Young
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Young @ 2013-09-18  1:37 UTC (permalink / raw)
  To: Matt Fleming; +Cc: linux-efi, linux-kernel, vgoyal

On 09/17/13 at 04:49pm, Matt Fleming wrote:
> On Thu, 12 Sep, at 04:45:28PM, Dave Young wrote:
> > 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;
> >  }
> 
> Thanks Dave, but this patch should no longer be necessary because of the
> changes sitting in the 'next' branch at,
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git

Ok, no problem. Thanks for letting me know.

Will write patches based on the above tree next time.

> 
> -- 
> Matt Fleming, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-18  1:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-12  8:45 [PATCH] EFI: use nr_tables param directly in efi_config_init Dave Young
2013-09-17 15:49 ` Matt Fleming
2013-09-18  1:37   ` Dave Young

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®