From nobody Mon May 6 12:35:27 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1567349439; cv=none; d=zoho.com; s=zohoarc; b=PoMXQBwz6V6RVIGjZJEufHuElnszIap0oxT+YvGbALi9NVqaLDbnNp08u1sBgrhjhN6vowi6cwn5MeVCy+USux5xJTzutB/4QklWU0EKUutTsAbwmqVmcl6hhJ4T21q2xJ58bcg/OerafDjveXEwYtZH+GjGKe0FmRiTcYjABzk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567349439; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:ARC-Authentication-Results; bh=E0FUe8x9Z3x6CtKDDfAmW1F2+fqGYtqjity+1NKvyQg=; b=lyzsLiOC9tYUEdq3lu49QsPgnE9z+H3xAM5qZoXsaEQQC5rSKpDkGb66j+LusHNs+0yahObMBX8gBvoh8BVQMbTmRFhE1mKl7RaKbWBaJaiMtNmux1Pfo0SexUv5iy40omlfoILkCJjxjtiFcBG57CC9w1rQ5GvTlioL682VFAE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1567349439279354.4203075349868; Sun, 1 Sep 2019 07:50:39 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i4RAe-000370-1D; Sun, 01 Sep 2019 14:49:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i4Jpx-00018G-IV for xen-devel@lists.xenproject.org; Sun, 01 Sep 2019 06:59:45 +0000 Received: from mail-pg1-x541.google.com (unknown [2607:f8b0:4864:20::541]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1405dd66-cc86-11e9-ac23-bc764e2007e4; Sun, 01 Sep 2019 06:59:44 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id n9so5657175pgc.1 for ; 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) X-Inumbo-ID: 1405dd66-cc86-11e9-ac23-bc764e2007e4 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=P1sHCKxw+uwyXRWHxCwbUfcKHxs+fmOuQ8JwqI34W57oaEzRxfu5Mw09kNNSxI4s92 /SXTNmdZrW8whykynNOVZ07A5sVyu3gTVqMraeqHS+eeqqDxN0Wx2G6Q3UOkLnTM2X1m uvlQ1ys+7m5P+ZHxl42rs2IPsxAw6scPt4/nD6YYzYoFdKyABVWnWw5x/R2mvbOu2vwq ykgvmdytc2l3RfUmVZKEkhfTaf7G1uPp4LcTQmMwgD9G81UcCV24dZkEoH8Q68v/IFt5 ICc4UxI1BJAI5nNJN/7XrVHUg8trS4o65aOatr0g2ytcUuo2yaaNW+RUzrL5T9Jt9zdY UgaA== X-Gm-Message-State: APjAAAUSJ5b22snAQt5Pai3zMlNPvVcZ4odOlmG1DijTXvqfpQ7FFbVS 2G6zmCm9iiNxkLvB4HyGYuU= X-Google-Smtp-Source: APXvYqyw3yfPJHl7dWO6wj8ONfTdvPpAfPr2Wvs2WIpDI5auHtERzSlOOZc8ng3grq9X4d+6S+qU9g== X-Received: by 2002:aa7:809a:: with SMTP id v26mr28118651pff.82.1567321184092; Sat, 31 Aug 2019 23:59:44 -0700 (PDT) From: Adam Zerella To: 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 X-Mailman-Approved-At: Sun, 01 Sep 2019 14:49:34 +0000 Subject: [Xen-devel] [PATCH] x86/xen/efi: Fix EFI variable 'name' type conversion X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Adam Zerella , x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , xen-devel@lists.xenproject.org, Boris Ostrovsky , Thomas Gleixner Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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; =20 size =3D sizeof(secboot); - status =3D efi.get_variable(L"SecureBoot", &efi_variable_guid, - NULL, &size, &secboot); + status =3D efi.get_variable((efi_char16_t *)L"SecureBoot", + &efi_variable_guid, NULL, &size, &secboot); =20 if (status =3D=3D 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; =20 size =3D sizeof(setupmode); - status =3D efi.get_variable(L"SetupMode", &efi_variable_guid, - NULL, &size, &setupmode); + status =3D efi.get_variable((efi_char16_t *)L"SetupMode", + &efi_variable_guid, NULL, &size, &setupmode); =20 if (status !=3D EFI_SUCCESS) goto out_efi_err; @@ -139,8 +139,8 @@ static enum efi_secureboot_mode xen_efi_get_secureboot(= void) =20 /* See if a user has put the shim into insecure mode. */ size =3D sizeof(moksbstate); - status =3D efi.get_variable(L"MokSBStateRT", &shim_guid, - NULL, &size, &moksbstate); + status =3D efi.get_variable((efi_char16_t *)L"MokSBStateRT", + &shim_guid, NULL, &size, &moksbstate); =20 /* If it fails, we don't care why. Default to secure. */ if (status !=3D EFI_SUCCESS) @@ -158,7 +158,7 @@ static enum efi_secureboot_mode xen_efi_get_secureboot(= void) return efi_secureboot_mode_unknown; } =20 -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; =20 --=20 2.21.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel