Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4017039imw; Mon, 18 Jul 2022 20:05:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRrGW7IxNBl80TX1dedwBBejBjsJ0YeCIJPhpFjyE6bjxcwURTcn7tLPUzxTmIKQT9UBpT X-Received: by 2002:a05:6402:2497:b0:437:a341:9286 with SMTP id q23-20020a056402249700b00437a3419286mr41270898eda.156.1658199940558; Mon, 18 Jul 2022 20:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658199940; cv=none; d=google.com; s=arc-20160816; b=HUSyjEyxFnloLvj3unDzZTmcqaHQ8p9wOuUJlH+c7Pr6uyLjYCl6TImsA/TifF2cVJ 4RbMYSpg8ToQCvKjGWINwuCbxqAfOC1V2FkO6KmvS48VNTE9B/6u8ETnyn5q8zJY6Zui dAUFxwo76NdYQY4j24N5g/k+DxMSGTBhc8Oy28Hsg63i6rvuU/qc6CHE9e0hkxTbnkWu BKjani+L7hgYjKDjBJlZPLPFnKhpoABUrkyT0CVhzo/b3bEfLfYufxPOBknFSYlsXSTm SeZEz4Sc1bYldPamaAlNm6ZxGErSpjNghPG/2lssOBgyxc76QvMScSl17nbDA92W7JOH vJsA== 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:cc:to:from; bh=B8upiZS5al/5wRAnmjWIGAyvh6FRI4kM94MofET1E6A=; b=hyW1C1yOokdjVNSO20fbQZ9PpTkZMcpw1Dxy51G8Jite4Csw33MPWky1+vuGmzWkIG MN3BzKuaIBPa7H8Wi/Py9nfy2whj95uaSHGmhyAuk5FZDnyMTgU5KC8QzNcAhJt3l0/L MrTst1TrvAG2dgF3Uz8dboTAomcYvNA9TTG0nyYXzr5L7x46vDT2AEt+bI7eaSt8ZW4X dCgbO7is1+hx1eYjajk8uXM8YblYOdqxtCrJX/NVBeByacAxOdCA3VSnbHDMPHBrFc01 X2mV28nR9hzHQOzmjb7+RW16mGHISWjH6eMAgwftuAXfp51/HyLA060RVrVwoHGvdJe6 /J3Q== ARC-Authentication-Results: i=1; mx.google.com; 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 sb5-20020a1709076d8500b0072a8b005435si1917405ejc.414.2022.07.18.20.05.16; Mon, 18 Jul 2022 20:05:40 -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; 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 S235508AbiGSBy5 (ORCPT + 99 others); Mon, 18 Jul 2022 21:54:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbiGSBy4 (ORCPT ); Mon, 18 Jul 2022 21:54:56 -0400 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E32B8DFA1; Mon, 18 Jul 2022 18:54:54 -0700 (PDT) Received: by mail-pg1-f195.google.com with SMTP id bh13so12218234pgb.4; Mon, 18 Jul 2022 18:54:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B8upiZS5al/5wRAnmjWIGAyvh6FRI4kM94MofET1E6A=; b=bag8KY9apw2bpIcs6iF+Kc/fYfMt7GpD7pkwU8yVHFRbSDAA9vCWxkPKho9CXBsvGN MsoqoH3P6GHW06qq6+KMnNmA8W8ReDW0dIg8mQan8oRGrobOL70mIY7MT/j9ItZlniW1 2XWT2wQSqeg2/sLIBOij7W/gzVGsSpv3rJIIBkqaK2ou6H9kOqMEAfJpHiM311GSrasf kN/jZl7qMen4icwXMSz670ZDsKGYnrq90bGL0wy5lE5r6FIYZiIkN0rG2nTf32Vrl4cS 4zzGLGBFRzazaWokdy/9U6knwjYAjO89a7wSpeI7zX7QoxnO+lbB54wuhv45DQLRFiMk A7wg== X-Gm-Message-State: AJIora8GBEDSrvB19yrGmQuzxRjMEHOzuu0ZpkNuOKuW9QYpxY+I+S0L RsapG3zNJxjtNYjN8+wNzw== X-Received: by 2002:a63:500c:0:b0:412:a56c:9ac with SMTP id e12-20020a63500c000000b00412a56c09acmr27797159pgb.158.1658195694366; Mon, 18 Jul 2022 18:54:54 -0700 (PDT) Received: from localhost.localdomain ([156.146.53.107]) by smtp.gmail.com with ESMTPSA id x1-20020a656aa1000000b0041a37441825sm1822137pgu.72.2022.07.18.18.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 18:54:53 -0700 (PDT) From: sunliming To: hch@lst.de, djwong@kernel.org, dchinner@redhat.com Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, kelulanainsley@gmail.com, sunliming , kernel test robot Subject: [PATCH RESEND] xfs: fix for variable set but not used warning Date: Tue, 19 Jul 2022 09:54:42 +0800 Message-Id: <20220719015442.646442-1-sunliming@kylinos.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no 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 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 --- 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