From patchwork Thu Oct 12 15:25:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 152034 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1311443vqb; Thu, 12 Oct 2023 08:26:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZyHL5VErkcgGqSq0e5CGNaKZWjtosWtx5VCwYMaz1gOsDPijJaO5VJVWDJ3Iemzf/7oFG X-Received: by 2002:a05:6a00:2d1b:b0:68e:3eff:e93a with SMTP id fa27-20020a056a002d1b00b0068e3effe93amr26229701pfb.2.1697124408396; Thu, 12 Oct 2023 08:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697124408; cv=none; d=google.com; s=arc-20160816; b=w2qVzAb3jDsvvBWGOJKTNgTw6sKaaSgQonEPSzc5nGAPPYn0YjkCuE0mijFO3lfX3b P4iReFlUHV/HRFt2YvD9BKAsk4s2t3oMKxT3LaBD+45OsWh4gK5Ax7dhgiYhp7JX58vt C5YlygyLJg/nh1shquYBE7XmZtlQYN9xnIKfJBGxTuL4JxDfyQDhmlU8oC2qYnHAkACc FxaTXksP9wV3xkEScrGCS8P/Lp1Om/0XRDs2xSr1BGbsITN9+BI9pN21qv5Pgi2TT9wV AUDaggivP1gr7XTViosJMk2FgfroFJeFdCF3IkYcrLgO1grH+jZFrLBFi+dDxWLp5hfV KSGw== 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 :message-id:date:subject:to:from:dkim-signature; bh=cs1o+DwAGyODW8d7hRFJi9bCRLXi/YB/dSLR1lX7C9s=; fh=4N0ilCeWNPUMy3p+fwQEcpDcSktLq8IMxbqwLAweA1k=; b=O1prvUGWeRSwiUolPMrruIoYMfSKtHRSlN3Cqnj87E+m2rC0CVlivL9LbjWwVeXaIs +xPzPXTs0XI+XxOzte/6VpM19bEBSDVyz9S1F3wNZom4JYOTHglyYtogNinNEx9dkoCy 88uH04qRzuTucM1utR54Gj694tYiAOKnRxua+aY7bQNO+gFnDoXsqkLgOFb22Jn3G7d6 JC491HevJLzcpt0g9TUNfLaM60cwBgsj0kZxuL/RtTzT5ZVRDrQsRKkaioNMIL7qk7Mv Fpww1zmKgwuU2cNSe4+bmi1JWsMDSuDH2k2yP957felKvCm4K5o/rvrml2anzoTm7Cbo d0Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bm4xDw15; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o10-20020a056a001bca00b0068fca4405aasi14324151pfw.338.2023.10.12.08.26.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 08:26:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bm4xDw15; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id ACDE7822D1D0; Thu, 12 Oct 2023 08:26:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379315AbjJLP0n (ORCPT + 19 others); Thu, 12 Oct 2023 11:26:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbjJLP0m (ORCPT ); Thu, 12 Oct 2023 11:26:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A087ECA for ; Thu, 12 Oct 2023 08:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697124355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cs1o+DwAGyODW8d7hRFJi9bCRLXi/YB/dSLR1lX7C9s=; b=bm4xDw15FRiMTc50DFwABDBxRHTkU4mHx+2CRTqLDelo/qukawmnvyshB2cbYuIaxFG8Wv an7NXPwDF2GGwmfCNTuf2RGvDi6172x0DIYnvKuLdgjNPj3yxlkDwrSxfv9aXl/ZG+otdp 7JsvPf7xaBKvbw/X2r1IwbbOiTk+hME= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-83-Fwi8M2Y8OcKBL3zTdA-blQ-1; Thu, 12 Oct 2023 11:25:43 -0400 X-MC-Unique: Fwi8M2Y8OcKBL3zTdA-blQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7ABC328AC1C6; Thu, 12 Oct 2023 15:25:43 +0000 (UTC) Received: from virtlab511.virt.lab.eng.bos.redhat.com (virtlab511.virt.lab.eng.bos.redhat.com [10.19.152.198]) by smtp.corp.redhat.com (Postfix) with ESMTP id 63B4F400F5B; Thu, 12 Oct 2023 15:25:43 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH] KVM: MIPS: fix -Wunused-but-set-variable warning Date: Thu, 12 Oct 2023 11:25:42 -0400 Message-Id: <20231012152542.1355621-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 12 Oct 2023 08:26:47 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779563923849552867 X-GMAIL-MSGID: 1779563923849552867 The variable is completely unused, remove it. Signed-off-by: Paolo Bonzini --- arch/mips/kvm/mmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c index 7b2ac1319d70..467ee6b95ae1 100644 --- a/arch/mips/kvm/mmu.c +++ b/arch/mips/kvm/mmu.c @@ -592,7 +592,7 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, gfn_t gfn = gpa >> PAGE_SHIFT; int srcu_idx, err; kvm_pfn_t pfn; - pte_t *ptep, entry, old_pte; + pte_t *ptep, entry; bool writeable; unsigned long prot_bits; unsigned long mmu_seq; @@ -664,7 +664,6 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, entry = pfn_pte(pfn, __pgprot(prot_bits)); /* Write the PTE */ - old_pte = *ptep; set_pte(ptep, entry); err = 0;