Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2793734ybl; Sun, 1 Sep 2019 00:02:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxc6uKhZ3icQs9ld9NuGfbVUh3seuVYw/sm0JCYahhBAfvtXXDw/mnmPMi3spYShOS7SOnE X-Received: by 2002:a17:90a:f986:: with SMTP id cq6mr7199823pjb.48.1567321333911; Sun, 01 Sep 2019 00:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567321333; cv=none; d=google.com; s=arc-20160816; b=wmiTePMEiOwhx0Feiq7jG2OstT/km0FqGgxGugRh4Gv+suC4neiErx55OfAl2MaBPq XpWXArI6C/Xs8JqG3q/qh2s6s6h9d+JJS2XFwgicFAgpx2WuOQLFZlsJsFKhyk5zq+k5 P44Ghh+yIhDWNutMTZDudeINLyJRIf2NmscFZHS7I4sxlvwof0Im6GXCVIdg3LIdWeCs TlOTVjzSdr00dLFmUgOTMHgZGpMoz/Sic2GprIN6IOm5l04PbUvOZ6SCv2nFeMfPYkCl RZ9fVSmeqkKK/2uilDvItIW9hvh88gYlnqOu35PIwXa2gTgZRrIe7j4rrwwAZaR2eVQZ IlhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=ksunGhRAcBahaT7W6iFOAG/wY/nv2ICL8Nw4My/hTvE=; b=EAaELslWLblG/dFeCv4nGPzuvb+ei8GY8e66g6UN24grVicLe+qWgcaKpWysGazvdJ MujzM6p0NYk72da1nFXeenq/DNihNycLcwS9vAlZ7M6qZokQ/HVwtuuWlM/cWzRfp/Vc H10+W4Lu1NInD4TaX1Hkq26RRL0QmdldYrEt4ldsFxGhT9cwHyUls8UiVSRHd2x48uxo rJT7mEnd6eeQYCtJilB13APKIQ34qnKfOInho7yyVA4rL013iRn4ne/XYxo1y4+Fdsau /TsnbBLuIrKhcVkiIVBpX7TBnIElf/0NWCy1idKYRD8XWniuhk9dsFzKpvJqr/l6a2aT VlBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MIuk7Q+K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32si8920990pla.178.2019.09.01.00.01.58; Sun, 01 Sep 2019 00:02:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MIuk7Q+K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728753AbfIAG7p (ORCPT + 99 others); Sun, 1 Sep 2019 02:59:45 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44272 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727083AbfIAG7o (ORCPT ); Sun, 1 Sep 2019 02:59:44 -0400 Received: by mail-pg1-f195.google.com with SMTP id i18so5630822pgl.11 for ; Sat, 31 Aug 2019 23:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ksunGhRAcBahaT7W6iFOAG/wY/nv2ICL8Nw4My/hTvE=; b=MIuk7Q+K0WGao5uA3+VT0F2UNG7iwCxqBSE3s47K4thfifDSTYwyUFGzXF/qoFpSBX z3brLVeOyzjpV8s2XT1vH+xfHi3Xk5b/bNVvYDbcL7im++/PERMrJLdfY1eTyGKvxoGa 9eRAO748Aku/xxXieY04PW/9NSWhsVTk9dDiAesdTlqJ97ky109hWip/JU5/RI0xjc+k ccUjrK3gp8td295bQnEGbwoPJf29paBnNDB+dBu3QGBDo80SiWzr2U4V9dc9I5oA5oR4 xCDChSYDqOBLbqsFNp1Db3FmpOlaJltxDG1YJPiAUxt+YmtWBB9VUPKMar0qExkrvx7D HfNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ksunGhRAcBahaT7W6iFOAG/wY/nv2ICL8Nw4My/hTvE=; b=qrX/SzyuLXN3IIHuhXCEtRIY8+3is1o2blpj4BtFGEQP16lgCsORoXeAEvYRzFi5IL hTgIhpbH1TmadwJZn4caFaiTBomOmEd03UZO2JqgpCuVez/W7bMTe1e9q14lXC4YL+Pw mDsO6cadnEC/8ic+BpOMkUxJ0BYfP17KRcuyHll6jGvQUPxtuaBQDLxdS3+njAX/AMvI GeEUpFXyaa7tTbsxzXjDTgCBDcMvw1wYdUKj8XySxpeO/mnnHS6dte6QfjZFkkt1tSNl sHa/PxysY1V5xm4jjQvvLjfYalWie9bpH9pdzYS6QwKwVHfJcV9gnn0ggWM+0SwvXrSc ue4Q== X-Gm-Message-State: APjAAAXVE4i4xzRh3FCOgGhWkgL4iaZkx+o72rJk5yV7Q4gpIluxbQmm 9DdodWnZivUtWVZWbxk8R/I= X-Received: by 2002:aa7:809a:: with SMTP id v26mr28118651pff.82.1567321184092; Sat, 31 Aug 2019 23:59:44 -0700 (PDT) Received: from localhost.localdomain (ip-103-85-38-221.syd.xi.com.au. [103.85.38.221]) by smtp.gmail.com with ESMTPSA id i6sm3326055pfq.20.2019.08.31.23.59.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2019 23:59:43 -0700 (PDT) From: Adam Zerella Cc: Adam Zerella , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , 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 Message-Id: <20190901065828.7762-1-adam.zerella@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This resolves a type conversion from 'char *' to 'unsigned short'. and static usage warning as hinted by Sparse. Signed-off-by: Adam Zerella --- 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