Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3136406pxf; Sun, 21 Mar 2021 20:56:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGkP0DDpksV0IqO93RJ2xYru0xZbaVtFdqS8ioAoKayCoSN/t+wBWU10uKsD5pSEApsubh X-Received: by 2002:a17:906:3a94:: with SMTP id y20mr16907188ejd.35.1616385389483; Sun, 21 Mar 2021 20:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616385389; cv=none; d=google.com; s=arc-20160816; b=RVZe+VnkpDZ9iJytl725ENRlqEwMW39YEg3962eS6k7KjHWDBXh2Bn6C83+x5ghomV 8KjWufORzIMAK35Ue5EWzo/BcxJVPvmwS5pyzvid6zI1KA80eOajrzbRvjPnLNkNhE1T DXhKaXpYHoAdMYpuTBI2St/i6zvMg3727w/3vO+QACvYy3SYNOyJ0LPXzFqDQ65NDjOy 0tMbpNu0RFbSM+OIsQpvpSOwbQcpncfbE4m7kQZEUBD8Lw0k5TKpYd9/DkG3Z0Cy07JP WjSpFkOPy0HOTg3cgIhF88ka6HfiqmgAU3uxPLVwsjop8DP1t52rl0wslx2/Rj5VK8xd GLlA== 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=8CuWuMVVnB2bvigVFMQozMJ3lIekaqj8/thd1VlJcwQ=; b=YQbAH1fwbeQvVibtsxGczbMcqCW6RU22npo9zu8tAF3Bf5I/XX3VI2LYoa4QzlwTuY OqXlSMkaHF/ztNVvmyjsSUNwo9AeNIuwAsUmnPLmOKWlbkf0n8CdrSGOovTrtYhBcdOH JN7wrP2s1zU8RwUcy6N2L8h/QqcTaEI0S94v3TLpm3jNn6JkVbEN3kC4/ccyXn8RwrE2 r2pXj7n3LLrZanCia/PcZcMYszrQT/s09n/XFkLuLZ/7nW7F04wp2S2eqKxgVpLyDvua Vl7Qg9KLMFPhacKNfbdzhhthbLbXyyEwYrsfWUPUh7Rj66CvXZwtBjjZskV0p7vP+Lum qDGg== 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 k16si10185577eje.579.2021.03.21.20.56.07; Sun, 21 Mar 2021 20:56:29 -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 S229771AbhCVDzQ (ORCPT + 99 others); Sun, 21 Mar 2021 23:55:16 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13652 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229995AbhCVDyq (ORCPT ); Sun, 21 Mar 2021 23:54:46 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F3gYW0HphznTlH; Mon, 22 Mar 2021 11:52:15 +0800 (CST) Received: from vm-Yoda-Ubuntu1804.huawei.com (10.67.174.59) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Mon, 22 Mar 2021 11:54:34 +0800 From: Xu Yihang To: , , , , , , , , CC: , , , Subject: [PATCH -next] x86: Fix unused variable 'hi' Date: Mon, 22 Mar 2021 11:54:26 +0800 Message-ID: <20210322035426.71169-2-xuyihang@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210322035426.71169-1-xuyihang@huawei.com> References: <20210318074607.124663-1-xuyihang@huawei.com> <20210322035426.71169-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 __maybe_unused added. Reported-by: Hulk Robot Signed-off-by: Xu Yihang --- arch/x86/hyperv/hv_apic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c index 284e73661a18..c0b0a5774f31 100644 --- a/arch/x86/hyperv/hv_apic.c +++ b/arch/x86/hyperv/hv_apic.c @@ -55,7 +55,8 @@ static void hv_apic_icr_write(u32 low, u32 id) static u32 hv_apic_read(u32 reg) { - u32 reg_val, hi; + u32 hi __maybe_unused; + u32 reg_val; switch (reg) { case APIC_EOI: -- 2.17.1