Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1197300rwd; Thu, 1 Jun 2023 11:49:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5jjm88pANF72cGaHoY5yl0w5pLYZ4zjiVsorVqXoXI+Amu5b0j756CE86f/xvlHdw9Clsl X-Received: by 2002:a05:6358:6f8e:b0:123:1a41:3d8 with SMTP id s14-20020a0563586f8e00b001231a4103d8mr6377315rwn.29.1685645365510; Thu, 01 Jun 2023 11:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685645365; cv=none; d=google.com; s=arc-20160816; b=I1RIj6iTKwcSZsdaHiTcpxSVDlEnXe8CgvvbL8q9jJxzvUVxrHXAE/3lLqE4VsRJMi GUZJ7UcMF5+8S02KJfi4sjZy9z4eVs918UhecDsQkhYFTmuEbQv4+ih3ubuXVtAvD3g2 rOBCd555O78MtYCE/hKt67xbW7o6PV8gVuctbfYbX/MMEFAVrt40p+IcVrRciThCRaEw +FzoN63v5rlbDU8WtXzJv4igqnZdixJqg0jAxnGFXtmtq0uq2NnL0CITuaB+ezdeGAHp KcDch7lOyCtvFy/5o8iZxHUjo0Yd75X4htNz15eMbC47G71phxLE0DEh9GKsK3uUWDTf 7J1w== 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=LbLFFMZmX6aGxOD/fXYqnB93DqiAoRDFcJzWy/msIHE=; b=OLHR1QHa1ucUvEbtmcaZeLU7uNW27o7K5dD55Jo7ahR2fAkhfVs+YmAfQgRuXRmo+R Jts59g9Ja4IRfHJjlSU6U6aiNacjkh8+WBKfXWLrVd5OTS+G9VVlALKYaTzmDuUZx4Fr lVvR2hvA24zqoWseqPY2w4kAUE+kjOwfRGKck1I5QOeu5rFcvvJsmB/KU1Xfh2U4BJVQ LR6ou5FL7Av6GAzU74DxNteoo79fbjjkBNbniWrmHNKhJxAJ0O9HclZG0UvEQnPXZjbK fU+idWcTk7Nw3/+0bkbIRhmzd0HkJYRPqGjsxrfSl3SZp1GM2RuVOdPzDS7YhqfLtl+J hiAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M1BM/Cro"; 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 j19-20020a633c13000000b0051b423d966csi3311346pga.280.2023.06.01.11.49.10; Thu, 01 Jun 2023 11:49:25 -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="M1BM/Cro"; 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 S230151AbjFASai (ORCPT + 99 others); Thu, 1 Jun 2023 14:30:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231659AbjFASab (ORCPT ); Thu, 1 Jun 2023 14:30:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5149FE2; Thu, 1 Jun 2023 11:30:01 -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 dfw.source.kernel.org (Postfix) with ESMTPS id C96456176F; Thu, 1 Jun 2023 18:30:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5194C433D2; Thu, 1 Jun 2023 18:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685644200; bh=UKT2wYQFWgvPbCbqBLMp8QEpivL9N56qu2Yss1i+ZVo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M1BM/CroNCh2R0eax14T9KqzLie9WGDtS1GCw551HpQqmYREtKmxLtR0E8WDDDOBi TPksTHiSnmWFBZyxbs3omQZjX/u4USJV4h1kIcNzkQ9Ar4XPxPeVCfffWoiCPQsmOW E1k5Kz/AtjSGlVXxbxjgGCgGORnb/IW9/o2GtfRTq8KWMc/k1sUo9at1liSi4VFQvE yFg47Ny6an38UFxF2hPjPhaMUnKjYE4uRkZDGJILHJOvi6p3ZyhTjBMyp4e7S6fSz/ sq20o1pBYZ3Oy9ATv8UQmsHbTVbHbfcs99n9ynthg5urlpnZ+l1KqgPBQsly8Y0pYm ePCMQTbu434xA== Date: Thu, 1 Jun 2023 11:29:57 -0700 From: Nathan Chancellor To: Tom Rix Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, ndesaulniers@google.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] btrfs: remove unused variable pages_processed Message-ID: <20230601182957.GA3028824@dev-arch.thelio-3990X> References: <20230530142154.3341677-1-trix@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230530142154.3341677-1-trix@redhat.com> X-Spam-Status: No, score=-7.3 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,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 Tue, May 30, 2023 at 10:21:54AM -0400, Tom Rix wrote: > clang with W=1 reports > fs/btrfs/extent_io.c:230:16: error: variable > 'pages_processed' set but not used [-Werror,-Wunused-but-set-variable] > unsigned long pages_processed = 0; > ^ > This variable is not used so remove it. > > Signed-off-by: Tom Rix Caused by commit 6d6a31e7fc99 ("btrfs: split page locking out of __process_pages_contig"). It is worth noting that while -Wunused-but-set-variable is normally under W=1, btrfs explicitly enables it in their Makefile, so this warning is visible during a normal build, which breaks the build with CONFIG_WERROR. Reviewed-by: Nathan Chancellor > --- > fs/btrfs/extent_io.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c > index 89e093ae1c33..6919409c1183 100644 > --- a/fs/btrfs/extent_io.c > +++ b/fs/btrfs/extent_io.c > @@ -227,7 +227,6 @@ static void __process_pages_contig(struct address_space *mapping, > pgoff_t start_index = start >> PAGE_SHIFT; > pgoff_t end_index = end >> PAGE_SHIFT; > pgoff_t index = start_index; > - unsigned long pages_processed = 0; > struct folio_batch fbatch; > int i; > > @@ -242,7 +241,6 @@ static void __process_pages_contig(struct address_space *mapping, > > process_one_page(fs_info, &folio->page, locked_page, > page_ops, start, end); > - pages_processed += folio_nr_pages(folio); > } > folio_batch_release(&fbatch); > cond_resched(); > -- > 2.27.0 >