From: Adam Zerella <adam.zerella@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Adam Zerella <adam.zerella@gmail.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Juergen Gross <jgross@suse.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, xen-devel@lists.xenproject.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] x86/xen/efi: Fix EFI variable 'name' type conversion
Date: Sun, 1 Sep 2019 16:58:28 +1000 [thread overview]
Message-ID: <20190901065828.7762-1-adam.zerella@gmail.com> (raw)
This resolves a type conversion from 'char *' to 'unsigned short'.
and static usage warning as hinted by Sparse.
Signed-off-by: Adam Zerella <adam.zerella@gmail.com>
---
arch/x86/xen/efi.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/x86/xen/efi.c b/arch/x86/xen/efi.c
index 0d3365cb64de..1d4eff6c6f06 100644
--- a/arch/x86/xen/efi.c
+++ b/arch/x86/xen/efi.c
@@ -118,8 +118,8 @@ static enum efi_secureboot_mode xen_efi_get_secureboot(void)
unsigned long size;
size = sizeof(secboot);
- status = efi.get_variable(L"SecureBoot", &efi_variable_guid,
- NULL, &size, &secboot);
+ status = efi.get_variable((efi_char16_t *)L"SecureBoot",
+ &efi_variable_guid, NULL, &size, &secboot);
if (status == EFI_NOT_FOUND)
return efi_secureboot_mode_disabled;
@@ -128,8 +128,8 @@ static enum efi_secureboot_mode xen_efi_get_secureboot(void)
goto out_efi_err;
size = sizeof(setupmode);
- status = efi.get_variable(L"SetupMode", &efi_variable_guid,
- NULL, &size, &setupmode);
+ status = efi.get_variable((efi_char16_t *)L"SetupMode",
+ &efi_variable_guid, NULL, &size, &setupmode);
if (status != EFI_SUCCESS)
goto out_efi_err;
@@ -139,8 +139,8 @@ static enum efi_secureboot_mode xen_efi_get_secureboot(void)
/* See if a user has put the shim into insecure mode. */
size = sizeof(moksbstate);
- status = efi.get_variable(L"MokSBStateRT", &shim_guid,
- NULL, &size, &moksbstate);
+ status = efi.get_variable((efi_char16_t *)L"MokSBStateRT",
+ &shim_guid, NULL, &size, &moksbstate);
/* If it fails, we don't care why. Default to secure. */
if (status != EFI_SUCCESS)
@@ -158,7 +158,7 @@ static enum efi_secureboot_mode xen_efi_get_secureboot(void)
return efi_secureboot_mode_unknown;
}
-void __init xen_efi_init(struct boot_params *boot_params)
+static void __init xen_efi_init(struct boot_params *boot_params)
{
efi_system_table_t *efi_systab_xen;
--
2.21.0
next reply other threads:[~2019-09-01 6:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-01 6:58 Adam Zerella [this message]
2019-09-02 7:54 ` [Xen-devel] [PATCH] x86/xen/efi: Fix EFI variable 'name' type conversion Jan Beulich
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=20190901065828.7762-1-adam.zerella@gmail.com \
--to=adam.zerella@gmail.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sstabellini@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).