Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1851410rwb; Fri, 19 Aug 2022 10:25:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR713tAGTvM2mGY1ygtWuCJmItciwTqcIZu/aCBGy4S0WY7JZF13WyYUJ5AOZCnu0det6sai X-Received: by 2002:aa7:81c6:0:b0:535:2aea:e29f with SMTP id c6-20020aa781c6000000b005352aeae29fmr8851307pfn.78.1660929953249; Fri, 19 Aug 2022 10:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660929953; cv=none; d=google.com; s=arc-20160816; b=JZ/tBcNaSBzRzfzCjbJ736KxkcmSsXZ52rXI0qcHoUHOmsChvmHMFi6GI2OKWpqqnH UtGVcItXnrwHDlKx5DeArh8iTzN+g6FQHogrZKysmFEnZTeJbf5oC3vsCYxRHiyGRu3j CTmLFaE8eZzU0fpfQGrwgGAIfWfSWmtau6+GapOZwgAk8ybuecqUg+My+7V11tFfY5id SsCi4DvsemXFnv+9ZOxk8qws96pdeIz0avv+LROqElz8zBkNycsaT9YgGX4Oi4mNjKA6 Qvne3fLkq5TJ9lHhxjqyMyPC5o3JRCASJuN7+bFAKz1GoKttyjP//ONBmPzYD69fuJMU 8oXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XijIKPSG6kvk8NxvmjtmY8phogA8Jwg+9VLOMKAfxBo=; b=CpodbdcScxcYSs2AMyanjr0nn4hwCCxofuypis8KCeXkYgZSz65VXnxjQU4VXwjJdw z/Hwr/mY8tv76GdXLTptq7C+15UOhSII9XQdkfPrfjY5nH4NbfZsUSp71OE0pijljbqz 9CyAvyLfzMBdk6ODgP01M3E3J8kN1OkT6fHqW3odGt0RYOHGkRhyhzUC6U2H7XaMNh9I 7SJXT+wymM2dZtJovVGo9ZSCd3u+94dcypwJgsq5jAudDoRAHb+b2nPPkjW360Mkj3Og pneCKEzfgXNKP+jps55MTuby1VESzAn8bkFqClQbDBWOC9ZCWQfbjSeUzK9Z8nogQWEd +fuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=KoQdAvLd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i137-20020a639d8f000000b0042190539470si4651985pgd.327.2022.08.19.10.25.41; Fri, 19 Aug 2022 10:25:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=KoQdAvLd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353944AbiHSQsn (ORCPT + 99 others); Fri, 19 Aug 2022 12:48:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354188AbiHSQqH (ORCPT ); Fri, 19 Aug 2022 12:46:07 -0400 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45E8B12AC35 for ; Fri, 19 Aug 2022 09:12:15 -0700 (PDT) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-333a4a5d495so133371157b3.10 for ; Fri, 19 Aug 2022 09:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=XijIKPSG6kvk8NxvmjtmY8phogA8Jwg+9VLOMKAfxBo=; b=KoQdAvLdqtvHerjKo8zZBjTL/cHkXCa4FZvixhiHnVBVmGjebrzzmMPcNii2PopeJ3 jSRjeiydxGpUrOqqd7ApmQYIVlnt4yfIbWSCa6jbq2bOlXUppHIzLKc5X58O03S/GmBf 4Y5oQycOJCylvDSGcTTYOwIP3IrmdyTzegkl8VYWTdOpbRSdMfqytx4M336a9/8L9DR/ aXvpM9EL5VVLIuXP2Cwz9Wi0w7PPNMB09fppbAHD4GeqhOhQsJhaKGSTGt2bhIEPHK3T C5zBz/NHIPWjZdrf+xzBg/cz4L+Q8pzRn//FLLD38Iny+JGgkAP/WYob23oW/00WNtp4 aCWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=XijIKPSG6kvk8NxvmjtmY8phogA8Jwg+9VLOMKAfxBo=; b=ZFpTeQCg1JrVjhBy2B8MIUCIY5joQyLQg78XIPw4acBL6Yxf/dqZ6dI+7yZiXspY61 YStaU56brAF/tDQ9CWf0r/GjTK0BkRN5GelSiSLoOZnXPIFqRegPEhWD+CBfiQS6d8vG y8wRSOtmtXcG8jzPP2F+XNBAbdV/YJtAslamfXZC7fHq7vJIoAL7EB0GN8zxRv7nO5e+ Na9Z2yKHsSw357H+hMxzHvtWGxNRkvi7LxSmxSRaWXXlS4xvV+Cv/ms0LxR3ikHhtPJ0 PPk45dqyPM2KTd4IefTSnBxkqovO2Bid3TJW9ceEn0qauuuG0k1u18J9lbP+pdex/WRi KRUw== X-Gm-Message-State: ACgBeo1xqB2V1qqwvIf4U1tCu76uEEwrqY2U1yzwkitjpEKOAbyENQ8A zk40eicgVK9hcMgk32tfVm9HtNxJslD92mhhgrAmdw== X-Received: by 2002:a05:6902:70a:b0:695:6d71:ecd6 with SMTP id k10-20020a056902070a00b006956d71ecd6mr318886ybt.619.1660925518203; Fri, 19 Aug 2022 09:11:58 -0700 (PDT) MIME-Version: 1.0 References: <20220814141237.493457-1-mail@conchuod.ie> <20220814141237.493457-2-mail@conchuod.ie> In-Reply-To: <20220814141237.493457-2-mail@conchuod.ie> From: Anup Patel Date: Fri, 19 Aug 2022 21:41:46 +0530 Message-ID: Subject: Re: [PATCH 1/4] riscv: kvm: vcpu_timer: fix unused variable warnings To: Conor Dooley Cc: Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Guo Ren , Vincent Chen , Xianting Tian , Heiko Stuebner , Kefeng Wang , Tong Tiangen , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 14, 2022 at 7:42 PM Conor Dooley wrote: > > From: Conor Dooley > > In two places, csr is set but never used: > > arch/riscv/kvm/vcpu_timer.c:302:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable] > struct kvm_vcpu_csr *csr; > ^ > arch/riscv/kvm/vcpu_timer.c:327:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable] > struct kvm_vcpu_csr *csr; > ^ > > Remove the variable. > > Fixes: 8f5cb44b1bae ("RISC-V: KVM: Support sstc extension") > Signed-off-by: Conor Dooley I have queued this fix for 6.0-rc1 Thanks, Anup > --- > arch/riscv/kvm/vcpu_timer.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/arch/riscv/kvm/vcpu_timer.c b/arch/riscv/kvm/vcpu_timer.c > index 16f50c46ba39..185f2386a747 100644 > --- a/arch/riscv/kvm/vcpu_timer.c > +++ b/arch/riscv/kvm/vcpu_timer.c > @@ -299,7 +299,6 @@ static void kvm_riscv_vcpu_update_timedelta(struct kvm_vcpu *vcpu) > > void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu) > { > - struct kvm_vcpu_csr *csr; > struct kvm_vcpu_timer *t = &vcpu->arch.timer; > > kvm_riscv_vcpu_update_timedelta(vcpu); > @@ -307,7 +306,6 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu) > if (!t->sstc_enabled) > return; > > - csr = &vcpu->arch.guest_csr; > #if defined(CONFIG_32BIT) > csr_write(CSR_VSTIMECMP, (u32)t->next_cycles); > csr_write(CSR_VSTIMECMPH, (u32)(t->next_cycles >> 32)); > @@ -324,13 +322,11 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu) > > void kvm_riscv_vcpu_timer_save(struct kvm_vcpu *vcpu) > { > - struct kvm_vcpu_csr *csr; > struct kvm_vcpu_timer *t = &vcpu->arch.timer; > > if (!t->sstc_enabled) > return; > > - csr = &vcpu->arch.guest_csr; > t = &vcpu->arch.timer; > #if defined(CONFIG_32BIT) > t->next_cycles = csr_read(CSR_VSTIMECMP); > -- > 2.37.1 >