From nobody Thu May 7 23:11:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D34ACC433EF for ; Mon, 16 May 2022 18:42:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345051AbiEPSmV (ORCPT ); Mon, 16 May 2022 14:42:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344840AbiEPSmS (ORCPT ); Mon, 16 May 2022 14:42:18 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D553E0FE; Mon, 16 May 2022 11:42:17 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id g6so30402587ejw.1; Mon, 16 May 2022 11:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zD2cmGDI0QDaqSfgSS+PWLZ7wv6vJ0pT7+KKvGrmgP0=; b=Dk2VcD6Ob6Wxl0s29Saxdiyu0Qu3p694+/N78XobvJrelMJB8BXXDiRmVSmBmwvDYE IojUp80BBI6A97IKXY7uqG30Ny5AtPNdQF1/QdLOmgf/9o4KMS+5DP0JRxsiOz2t+3XY rw7wIFgLQdwKnPt5X6jU6mniNq27Rb0h9SwQ6heZC+Ovsf1xjpaiNbIE3F1TfDV2GghW Ktu8ECff5J6EiGGPUH90iZ1zASj2F7W7SHOaWyQB7t/MWVmQdV7mRTMe8qIYFjtUbkzU XLyKnjsYG4401GkbW9txkTQh5+RD3LUsfnJxJMLEo31MEfWDcpWtiHQnA+Ga2E+Y5vPQ b/CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zD2cmGDI0QDaqSfgSS+PWLZ7wv6vJ0pT7+KKvGrmgP0=; b=msjOucJFbi1sbI4o+QpJTHE6T1x+lVHkDIUg/UcceB280edBT03gAjQ4rkJ77mKVop ETGh0iHAKz9nuEE5wU1be79XbItW99MiCnrGo6BTI+f0aLhb1AT3zjU8AZGetqkd/oaT RUDdGIqZsTirczGb2if5cUTRZQ9YA7elqc0bjGIsz0gUHjztGWgT4kCiJ23OzkZKU2fn PWKu8W8I2BA5wSaG1cIYGGnWHMEgXUGgOXMQS2kpDj5+WqmDslzGdRsa9IqT/q33aaDi IbzkVWiX2F2dZMDCT4MtJF2abSbEcg6AnRye+DXfFY5FPK93uJ6m3WF7pfF0mBVtMm4X RsXw== X-Gm-Message-State: AOAM53072B3J1MoWRT7uMs9Zh8XcCCsa6eXzwgHf8wEqfr1ei+Hb88Zp SZNEOubTR2FPPZUUw6+5vyw= X-Google-Smtp-Source: ABdhPJzb1nqIQPTNpO3v0ie6TXYdW89dGFEy1HflmPgEo6VRypohARbg8nRbkKkYvK0t2yIAENCBHg== X-Received: by 2002:a17:907:3da3:b0:6f4:4292:6d6 with SMTP id he35-20020a1709073da300b006f4429206d6mr16584110ejc.162.1652726536490; Mon, 16 May 2022 11:42:16 -0700 (PDT) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id eo10-20020a1709069b0a00b006f3ef214e36sm45823ejc.156.2022.05.16.11.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 11:42:15 -0700 (PDT) From: Colin Ian King To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Brijesh Singh , linux-kernel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org Subject: [PATCH] x86/sev: remove duplicated assignment to variable info Date: Mon, 16 May 2022 19:42:15 +0100 Message-Id: <20220516184215.51841-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable info is being assigned the same value twice, remove the redundant duplicate. Also assign variable v in the declaration. Cleans up clang scan warning: warning: Value stored to 'info' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King --- arch/x86/kernel/sev-shared.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/kernel/sev-shared.c b/arch/x86/kernel/sev-shared.c index 2b4270d5559e..b478edf43bec 100644 --- a/arch/x86/kernel/sev-shared.c +++ b/arch/x86/kernel/sev-shared.c @@ -201,10 +201,7 @@ static enum es_result verify_exception_info(struct ghc= b *ghcb, struct es_em_ctxt =20 if (ret =3D=3D 1) { u64 info =3D ghcb->save.sw_exit_info_2; - unsigned long v; - - info =3D ghcb->save.sw_exit_info_2; - v =3D info & SVM_EVTINJ_VEC_MASK; + unsigned long v =3D info & SVM_EVTINJ_VEC_MASK; =20 /* Check if exception information from hypervisor is sane. */ if ((info & SVM_EVTINJ_VALID) && --=20 2.35.1