Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1361322pxb; Thu, 24 Mar 2022 18:45:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyDyZfFxiA2feq3hC8jrdvWcq4D4xrAJGlnnlF0AVYLm+DZOrWnB3PbHP+Dt6hr4gkTqoE X-Received: by 2002:a17:907:334c:b0:6cd:76b7:3948 with SMTP id yr12-20020a170907334c00b006cd76b73948mr9104528ejb.55.1648172732928; Thu, 24 Mar 2022 18:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648172732; cv=none; d=google.com; s=arc-20160816; b=OeYYTJDRYoWurXVWhsZ12DvkhtkmolYYbsSmztwupNU0NGh6397XkRDHjt7oIFmWjd cU9wzzwetQrvR7FPbnq+H7kmFjP7kuyFM0Z4aCbouaCv9+DOIhMu29l1vJhv7dxTqgso FtW04Ogn03BC4Tdb+wGPMh86ZET5kygWR7MoQJqfRMh17nngWxAK3YJ3EKj+HKbzZxPt s8gbBTlUBPKLz7MqhnvXRZbBqQyTqZxWtmRHyCU5msFRLGVMJHMteGPKcXLl5qtxNcL/ Gf9aWFyN3MuGV7n27hIY0EC8nGDFewZNok5PCRtpK7H7yXuI2/aKDCWkZN8LSs10XzKW u/LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=mxmc7ediERSNp/9oSucpGCHIBIwx+Z1tUQd5pDNQoeU=; b=PwWWkRjZsSnrdBvC1Vtl//n1iLIqcQh/n/uYNP5I0hfHJvB3vMDohkxJWOk3C1JF5Q LT7hK85uuLZZA2mstJC7NRswB1TzOTkuDvZ5NVM/02iicCL0tRPJ1ixZLA5GSx8w4Rgl s2xk50LS9bCUecgVy/egFlPKeeL80rPGtZUbs0n6zT8yojw+FmbA5IGvcpAN8tehFeTG OvMSxbADOQ4ujgtbKdwOgckUO8yEEcAn31MadA5G49HJoOCHV8AjZxZ6M4+5h/XmCIbu 3SuhatsRc00s+30T2Thh4BCYMNEk3EWBokVtZdjWCI53uClCUkkSDiwQRB/X9vmeLicE BoBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="SMSoMF/b"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=eMzOJ5+V; 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 et21-20020a170907295500b006df76385b9asi1091954ejc.58.2022.03.24.18.45.08; Thu, 24 Mar 2022 18:45:32 -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=@suse.cz header.s=susede2_rsa header.b="SMSoMF/b"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=eMzOJ5+V; 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 S1352757AbiCXSzI (ORCPT + 99 others); Thu, 24 Mar 2022 14:55:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347682AbiCXSzF (ORCPT ); Thu, 24 Mar 2022 14:55:05 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 135B924F17; Thu, 24 Mar 2022 11:53:32 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 471AF1F745; Thu, 24 Mar 2022 18:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1648148011; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mxmc7ediERSNp/9oSucpGCHIBIwx+Z1tUQd5pDNQoeU=; b=SMSoMF/bJ+WqVhBx2VnpeAnW0h2DTDGFa9k9yn4j+F4XRJKrDOc+P2fd/xeQt+brez3zWc JY/CjJl/fgfGO/ApgJdVrZMSWY168n+17fPnUEYnZyoSeUxlMIgpiywo6Lp8GnaOWaZdN0 dA4ZPr2vF/Un2Kj4efMQCJtlKq7f+d0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1648148011; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mxmc7ediERSNp/9oSucpGCHIBIwx+Z1tUQd5pDNQoeU=; b=eMzOJ5+VRV5jfX49BQ5f1H4FKDb83yFqWdTeugv9hJpSYxyxtBQRx5YUXrRnWcS58rzWld cgeOet6JGELJgVAw== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 3106CA3B82; Thu, 24 Mar 2022 18:53:31 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 36686DA7F3; Thu, 24 Mar 2022 19:49:36 +0100 (CET) Date: Thu, 24 Mar 2022 19:49:36 +0100 From: David Sterba To: Nathan Chancellor Cc: Chris Mason , Josef Bacik , David Sterba , Nick Desaulniers , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, stable@vger.kernel.org Subject: Re: [PATCH] btrfs: Remove unused variable in btrfs_{start,write}_dirty_block_groups() Message-ID: <20220324184936.GL2237@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Nathan Chancellor , Chris Mason , Josef Bacik , David Sterba , Nick Desaulniers , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, stable@vger.kernel.org References: <20220324153644.4079376-1-nathan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220324153644.4079376-1-nathan@kernel.org> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Thu, Mar 24, 2022 at 08:36:45AM -0700, Nathan Chancellor wrote: > Clang's version of -Wunused-but-set-variable recently gained support for > unary operations, which reveals two unused variables: > > fs/btrfs/block-group.c:2949:6: error: variable 'num_started' set but not used [-Werror,-Wunused-but-set-variable] > int num_started = 0; > ^ > fs/btrfs/block-group.c:3116:6: error: variable 'num_started' set but not used [-Werror,-Wunused-but-set-variable] > int num_started = 0; > ^ > 2 errors generated. > > These variables appear to be unused from their introduction, so just > remove them to silence the warnings. > > Cc: stable@vger.kernel.org > Fixes: c9dc4c657850 ("Btrfs: two stage dirty block group writeout") > Fixes: 1bbc621ef284 ("Btrfs: allow block group cache writeout outside critical section in commit") > Link: https://github.com/ClangBuiltLinux/linux/issues/1614 > Signed-off-by: Nathan Chancellor Added to misc-next, thanks. > I am requesting a stable backport because this is visible with > allmodconfig, which enables CONFIG_WERROR, breaking the build. Yeah warning fixes are accepted in stable trees and we care about warning-free builds. My gcc 11.1 does not produce any warning with -Wunused-but-set-variable and we have extended the set of warnings in the directory fs/btrfs/ that also includes that one. > To quote Linus: > > "EVERYBODY should have CONFIG_WERROR=y on at least x86-64 and other > serious architectures, unless you have some completely random > experimental (and broken) compiler." I have CONFIG_WERROR disabled, for own development it's quite annoying when build fails outside of the code I care about, while I apply visual checks of warning-free builds.