Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3983938imw; Mon, 18 Jul 2022 19:05:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uuFxsiXob0mf2pS4uJo9PAv1syaGprM9gbRvaYvFXlpc8rotf6DBsj2wSdv7tjYPZKiSft X-Received: by 2002:a17:907:c2a:b0:72b:8119:4da9 with SMTP id ga42-20020a1709070c2a00b0072b81194da9mr27549381ejc.746.1658196352886; Mon, 18 Jul 2022 19:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658196352; cv=none; d=google.com; s=arc-20160816; b=via3B3egvquAPTaMHkIW6tYZdhQhpJP/7DRv/WvFOasl0izZKQ17QtISt0pCb4AXyH Pq72+2kJ42F/NAde4x4r5boz1cegZqCjtYd5iqGQz+U8pCV5w4jlYWVFhXTGOiNGY54p +KYL97eSE1Yv2E1ngk9zjoMlEzE0MR6zw92E05iE2PzGKGJ3VPm8ai9XrbA7ByNXbwMN EV+gu3D4wT4OVMImTNPIM4N+Ymtrmq+BccK2uCqATh8ejF/L/gwXHZXM/SWg2xu6aHFj mPcuaoKIRaYKfb/d54fMarPHffCbgeHc4V+Dz19rmewhpCEOVwdvuhBNmhvqTsP2JuHY aOYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yDElMuZTmizehcZOabc/oB1F/4uxls/j8ntm/wLmv00=; b=O4WcJCaLs6aQOm2nmNvM1TsRMH61QYBwy8XbKvXgRf/6LY5QQ2ur/CA8UPKpUGXhff 21TDO/iR7fYoZuI6RCWAPJdLE+mCVhuI+wSMJRaeOO3KC69/MtoniL/Qbh6jA9/aoXnu h6ZMn+hKA1HD+QjKQG2tQCKWoR2UR8CnEa+h+nCR8UOcRlIrtJrWdjBo8OHf5KQidNAj yHTAaI8kh9Zi1y1v6Q8nNAdOzxIWWo5lzAeZrCN/wNqTa6KPYdH5ydPw+dJgE/Ti0Ga2 W6MwErI5FkVZYFx9s1L+Dh3vS9jUFrw1x62WjRXBpEwC+gnY7AdGsqcHEjGefXhNc63O olkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CNe6jQFY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f26-20020a50d55a000000b0043743ad1af8si16996993edj.356.2022.07.18.19.05.27; Mon, 18 Jul 2022 19:05:52 -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=@kernel.org header.s=k20201202 header.b=CNe6jQFY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236629AbiGSCB3 (ORCPT + 99 others); Mon, 18 Jul 2022 22:01:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236651AbiGSCBW (ORCPT ); Mon, 18 Jul 2022 22:01:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06D833B94D; Mon, 18 Jul 2022 19:01:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 981E2B816F8; Tue, 19 Jul 2022 02:01:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 559F3C341C0; Tue, 19 Jul 2022 02:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658196078; bh=hsUkrPaFd478Emrc8EGUGtpEswMf8oLZ4LdEGp0TRUg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CNe6jQFYK4jCuCQRhAF560wteKtizVlqLCsgIEH67W8iLBNl7b1hceMlmj1v+xyVv 61eGhDbzEp/3ezsSo2Qu6za7yUxbYZ6nRDfvhd4u13GR8cPud4MDN/7Gmr5KTUHXkg NywT/2uqaiJfrVH4FIF20PqKV8s2IR0hH1LPOYUZiMoWI8WC5P4AfQoH2ebudl3jsP KUjCXWyiPJ9t1CaMSsDoPovSJEmSgeLZfQHmKu+k1KxZboXzJ7mWCDEa5FFr2OWWiK J2V8hgiubv0AeQXUSI16xvLaDPMV6IW3DDt3qPml5sqPFGn7AuKa03vvBp5jyB7tXW H8etwZ5mG/nOA== Date: Mon, 18 Jul 2022 19:01:17 -0700 From: "Darrick J. Wong" To: sunliming Cc: hch@lst.de, dchinner@redhat.com, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, kelulanainsley@gmail.com, kernel test robot Subject: Re: [PATCH RESEND] xfs: fix for variable set but not used warning Message-ID: References: <20220719015442.646442-1-sunliming@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220719015442.646442-1-sunliming@kylinos.cn> X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Tue, Jul 19, 2022 at 09:54:42AM +0800, sunliming wrote: > Fix below kernel warning: > > fs/xfs/scrub/repair.c:539:19: warning: variable 'agno' set but not used [-Wunused-but-set-variable] > > Reported-by: kernel test robot > Signed-off-by: sunliming > Reviewed-by: Darrick J. Wong Ah, right, I did forget to push it in last week's batch, sorry about that. It'll be in Thursday's posting, thank you for the reminder. --D > --- > fs/xfs/scrub/repair.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c > index a02ec8fbc8ac..032de115e373 100644 > --- a/fs/xfs/scrub/repair.c > +++ b/fs/xfs/scrub/repair.c > @@ -533,14 +533,12 @@ xrep_reap_block( > { > struct xfs_btree_cur *cur; > struct xfs_buf *agf_bp = NULL; > - xfs_agnumber_t agno; > xfs_agblock_t agbno; > bool has_other_rmap; > int error; > > - agno = XFS_FSB_TO_AGNO(sc->mp, fsbno); > agbno = XFS_FSB_TO_AGBNO(sc->mp, fsbno); > - ASSERT(agno == sc->sa.pag->pag_agno); > + ASSERT(XFS_FSB_TO_AGNO(sc->mp, fsbno) == sc->sa.pag->pag_agno); > > /* > * If we are repairing per-inode metadata, we need to read in the AGF > -- > 2.25.1 >