Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1066966rdg; Fri, 13 Oct 2023 09:13:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGCtcNClseLwQqUDLOZR3hgrNGa/JH91nNPmTyWf0AKnPZQrjTTiEIAIe0JUKLBEpAi5TGk X-Received: by 2002:a17:902:7d98:b0:1c9:cf1e:f907 with SMTP id a24-20020a1709027d9800b001c9cf1ef907mr7288752plm.57.1697213619133; Fri, 13 Oct 2023 09:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697213619; cv=none; d=google.com; s=arc-20160816; b=LiJgg9DF0N/p/5pUHLSBcjeWBcDjJmKC8Gqqrk4tDT9XmBYCJBV+AqoAeT6N4RUw8T WVdShAJ0FZScYCHaRFFwP5lU4zIDZTcNAq+YfnjZ8ZV9uebpKvoYr4D2JIlcC8Q+yZLH EmfvfdZJe4uV9DKZ7seuivrSxHjc+QLpzlQKSsKENII7GExoszmQwTxO673/ipXaqZhW /viAGjPA9wbwlsdRg0L+DtYL/NplFTHoORIs3HnfQZ0XmnNgLywxwNVjLMD29y2wfII7 Yv9a8oCpcUYsYbXPtuzM52Z3JMX8qqaZ91un3nutGgXpRhuALmVpCP/qC+8h58t3cYYU p01w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=5jpQKDWlX2FMxNrIBcRrOyniIIs22PEbqHRQyt5DVnY=; fh=XU568gU2eB+Q96a6i+4ZK75LQ4b7Fg2BGrAGwiR00G8=; b=AL9p+f0WdxhuxV4BTdGCizE6qOy8Hp+FumzQrKVDyL10dmWKb0/bATQNn76b0qCmGY e90oWdTVv1Qqa+H2ATqKPq2+8zyavCEUNjoTwkXhRvaG/0YyXPF34IsZWRfcjSth/FoJ LoxLgJCOMJasKMiPHnn0vGrOPg1ZjJzhtufUBE64KTU71cJPae+YDxOcgG8EhA6EbnMp tv3q76SDHfi/zzTkIe4SoYReAieJjNLxpbGFgqW1E/iqjYLTCrABgKKBv/3bPqA0rBvG LRFv5N8UvApF1q7pIDwpArr68r0yRNEkOHD6mgDZF8boGyblQGg3bUBbhIEVpsuUOTZ5 73yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="OS/P6lni"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id j9-20020a170902da8900b001c3ea2bbebcsi4863065plx.322.2023.10.13.09.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 09:13:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="OS/P6lni"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C3153828789D; Fri, 13 Oct 2023 09:13:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232405AbjJMQLj (ORCPT + 99 others); Fri, 13 Oct 2023 12:11:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232689AbjJMQLe (ORCPT ); Fri, 13 Oct 2023 12:11:34 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5564A4EFD for ; Fri, 13 Oct 2023 09:09:20 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5a7d261a84bso35917607b3.3 for ; Fri, 13 Oct 2023 09:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697213330; x=1697818130; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=5jpQKDWlX2FMxNrIBcRrOyniIIs22PEbqHRQyt5DVnY=; b=OS/P6lnipweaR9lkIl2sv/lVVCO/HW8DzlkJurqfmlsTCcRwOC7G1FacUVRXdk7EFC fWi4MxicySmAkNK850XetT65hgXDWKOJdPFZNxzuovKPPOxtkoBmQKD3PZ8GSNsQ6n50 J1YMOyxUSd5vBeCYl1Zpgsmp300vexSETUGu2nE/LOdn/QEelN7bSetYElcdua4S8EMG e2HpmgCkxSnEtKr0zYQ0G/9Vrkq7gFLwpMu0/z6t8v83lZ2g82r+I2+5fUVe4+bG2rYQ NQV9ByJmvYLCxq8GGzbgJPSNl2Ce/oMfgbIh5/42kMnhUuMV960Ka3wWvDYtX1pHRKJf Tj7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697213330; x=1697818130; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5jpQKDWlX2FMxNrIBcRrOyniIIs22PEbqHRQyt5DVnY=; b=kCLs8XDXCE2DKm6fQxv6am7b6l7S9rY2kUksYhgdue+UzpPb+XbfyvKMnFgizbEzab RMcYadLKMz1y7upALGlBxGGopwWcWKMKE2DoUEz+y6O0BJpz4REnMqOCbzYm4xKrIc5z bxvsbspwDrQHtBnul1y/R6lFci3GIvzIfZ12UWIoXns5O1+eLDRx/YvOggGeYWOVheOE 9Umm+EhcQ8o2+V+6MaVHFdjDI/vpSkp3f27xAKjt/Bs5CA0kVIIUS/Gbh6Q7VqGo3RXU bP+Y8BqWCo2SZiCFScHVErvNCEPi6D+4QSVx1R0y4GF6gaq3sEBMSj/4Awvn1V9q4y5O E+GQ== X-Gm-Message-State: AOJu0Yw4w1HGv+g7Klgz6CoZ+PZkcFdYC1uPrTQ5cvPgAkbl27dZO1vZ qweq9Ik59hrpmJ8xRj5FzvEyp9nmXKk= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6902:138d:b0:d9a:4e29:6353 with SMTP id x13-20020a056902138d00b00d9a4e296353mr268090ybu.0.1697213330411; Fri, 13 Oct 2023 09:08:50 -0700 (PDT) Date: Fri, 13 Oct 2023 09:08:48 -0700 In-Reply-To: <20231012152542.1355621-1-pbonzini@redhat.com> Mime-Version: 1.0 References: <20231012152542.1355621-1-pbonzini@redhat.com> Message-ID: Subject: Re: [PATCH] KVM: MIPS: fix -Wunused-but-set-variable warning From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Huacai Chen , Thomas Bogendoerfer , "Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?=" Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Fri, 13 Oct 2023 09:13:14 -0700 (PDT) On Thu, Oct 12, 2023, Paolo Bonzini wrote: > 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); Heh, 7 year old bug gets two fixes within a few days :-) https://lore.kernel.org/all/20231010085434.2678144-1-chenhuacai@loongson.cn