Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3911850pxf; Mon, 22 Mar 2021 19:54:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3OPR5uwoY7PGEFn5mowf/W6huc/eAb2Wrfx2cUYOH+mUkf/NoyHSPkYgEtrmpDtAQKWBy X-Received: by 2002:a17:906:81d5:: with SMTP id e21mr2691702ejx.102.1616468082219; Mon, 22 Mar 2021 19:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616468082; cv=none; d=google.com; s=arc-20160816; b=FcC0AsEu7CBpJFzuUFi1wmTnmtF8exNlSJ8j918zLo4MjsnIUQVUW7fRqspeDF0loo MtqUXQFwjsZUYkLeH0rNKfskGdXrjdvlEdimbKPe1LgFEUDGh4UWgT73qAb/LGsZe88N yARghmXdVyPiAvqKcE+RyKe5xzXEJUAjm8Aj5287jf2JWOgmGFDWC5wBnjnZh0TzIEUd zHh+suVEgxk6tiTtCEeDg+s/BxwbgpV9f+ehOChMpb2WOrIEuC1XUPu1FERExJ8Na0FE WO6fJvciXdJdzkvA6DW6wfK12RhN3sUahnjOBhjg7Q9fT2hl/nzZ14a7lamPm5YKsmWd 40MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ej7HRlFasYqlvHhH+1zcLl2Pl5ZS3nzH6lf4nYOlcvk=; b=u5abGVf43LOk7mI5f2WFLT4mpDryW3Mi5FjkkCyAJy6Y0EALPs1cA2Ud5qNQwQ2Q6P DUlg6uSnAhjkQHsdumaur4C/wTqWThwdZowlsSGxcwzI95D2Myc5xs6v/lqIDxsBKd9a 5tt7G2vRtSywa8ysb70FRlSpyx7QYh3L04LZk0zMG40rA4F3q9ZbUzjKetY9VtV00JVk dRvIdidc+BOmZf+Qurc9RDRg5mbRRZlw6uKVYq6F7sG1j+jVGn62haJDVoFd8bflp6/t 4znQmHzaN+KEG8ppatDT9esvloqvSRTwjtWHmxqphSMU1nLX7Lnaah2VbpVDqhOB7N2Z N5QA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si12959218edn.109.2021.03.22.19.54.19; Mon, 22 Mar 2021 19:54:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbhCWCvK (ORCPT + 99 others); Mon, 22 Mar 2021 22:51:10 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:14426 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbhCWCuc (ORCPT ); Mon, 22 Mar 2021 22:50:32 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4F4G5y1fLmzkcpC; Tue, 23 Mar 2021 10:48:54 +0800 (CST) Received: from vm-Yoda-Ubuntu1804.huawei.com (10.67.174.59) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Tue, 23 Mar 2021 10:50:20 +0800 From: Xu Yihang To: , , , , , , , , CC: , , , Subject: [PATCH -next] x86: Fix unused variable 'hi' Date: Tue, 23 Mar 2021 10:50:13 +0800 Message-ID: <20210323025013.191533-1-xuyihang@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210318074607.124663-1-xuyihang@huawei.com> References: <20210318074607.124663-1-xuyihang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.174.59] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes the following W=1 kernel build warning(s): arch/x86/hyperv/hv_apic.c:58:15: warning: variable ‘hi’ set but not used [-Wunused-but-set-variable] Compiled with CONFIG_HYPERV enabled: make allmodconfig ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- make W=1 arch/x86/hyperv/hv_apic.o ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- HV_X64_MSR_EOI stores on bit 31:0 and HV_X64_MSR_TPR stores in bit 7:0, which means higher 32 bits are not really used, therefore potentially cast to void in order to silent this warning. Reported-by: Hulk Robot Signed-off-by: Xu Yihang --- arch/x86/hyperv/hv_apic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c index 284e73661a18..a8b639498033 100644 --- a/arch/x86/hyperv/hv_apic.c +++ b/arch/x86/hyperv/hv_apic.c @@ -60,9 +60,11 @@ static u32 hv_apic_read(u32 reg) switch (reg) { case APIC_EOI: rdmsr(HV_X64_MSR_EOI, reg_val, hi); + (void) hi; return reg_val; case APIC_TASKPRI: rdmsr(HV_X64_MSR_TPR, reg_val, hi); + (void) hi; return reg_val; default: -- 2.17.1