[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YfvxGXNB8cCUT/Ia@zn.tnic>
Date: Thu, 3 Feb 2022 16:13:29 +0100
From: Borislav Petkov <bp@...en8.de>
To: Brijesh Singh <brijesh.singh@....com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
linux-efi@...r.kernel.org, platform-driver-x86@...r.kernel.org,
linux-coco@...ts.linux.dev, linux-mm@...ck.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Joerg Roedel <jroedel@...e.de>,
Tom Lendacky <thomas.lendacky@....com>,
"H. Peter Anvin" <hpa@...or.com>, Ard Biesheuvel <ardb@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Jim Mattson <jmattson@...gle.com>,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Sergio Lopez <slp@...hat.com>, Peter Gonda <pgonda@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
David Rientjes <rientjes@...gle.com>,
Dov Murik <dovmurik@...ux.ibm.com>,
Tobin Feldman-Fitzthum <tobin@....com>,
Michael Roth <michael.roth@....com>,
Vlastimil Babka <vbabka@...e.cz>,
"Kirill A . Shutemov" <kirill@...temov.name>,
Andi Kleen <ak@...ux.intel.com>,
"Dr . David Alan Gilbert" <dgilbert@...hat.com>,
brijesh.ksingh@...il.com, tony.luck@...el.com, marcorr@...gle.com,
sathyanarayanan.kuppuswamy@...ux.intel.com
Subject: Re: [PATCH v9 26/43] x86/compressed/acpi: Move EFI config table
lookup to helper
On Fri, Jan 28, 2022 at 11:17:47AM -0600, Brijesh Singh wrote:
> +int efi_get_conf_table(struct boot_params *boot_params, unsigned long *cfg_tbl_pa,
> + unsigned int *cfg_tbl_len)
> +{
> + unsigned long sys_tbl_pa = 0;
> + enum efi_type et;
> + int ret;
> +
> + if (!cfg_tbl_pa || !cfg_tbl_len)
> + return -EINVAL;
> +
> + sys_tbl_pa = efi_get_system_table(boot_params);
> + if (!sys_tbl_pa)
> + return -EINVAL;
> +
> + /* Handle EFI bitness properly */
> + et = efi_get_type(boot_params);
> + if (et == EFI_TYPE_64) {
> + efi_system_table_64_t *stbl =
> + (efi_system_table_64_t *)sys_tbl_pa;
> +
> + *cfg_tbl_pa = stbl->tables;
> + *cfg_tbl_len = stbl->nr_tables;
> + } else if (et == EFI_TYPE_32) {
> + efi_system_table_32_t *stbl =
> + (efi_system_table_32_t *)sys_tbl_pa;
You don't have to break those assignment lines - the 80 cols rule is not
a hard one. Readability is more important.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists