Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1617665rwr; Thu, 20 Apr 2023 18:58:47 -0700 (PDT) X-Google-Smtp-Source: AKy350ae3d/ApE8ORL/42YS6hWdxRAGLO3MttpKRrTZK2iRr/6ig2JgKHxb+XRUeRY+IQPaQmK5c X-Received: by 2002:a05:6a00:1408:b0:63d:3339:e967 with SMTP id l8-20020a056a00140800b0063d3339e967mr3926204pfu.19.1682042326804; Thu, 20 Apr 2023 18:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682042326; cv=none; d=google.com; s=arc-20160816; b=x328f1/KRD7i2VZIdsOiceRxaZNkWFbRHeju0o2xYVAymHBJBVryjqnmqxVCt28H92 vuzoB0UCmD/tS0Gpq6uPE5/J9zEvOZTPZ/ZTINtcHxpZFNFg1uRD+rnUAF18axxivv29 P4LGJk3iw2Yomwqse468rX7Hz3BaLZA05gYGsNY7j9e4OWg2A8LXYie7ikVRQ2ktKq9N kDHTQpZoVkGZmjHNplcgV8oapnuW0UwK70UDbRBqWAgtC3bAP0ZTg9PX9MwFck5qhShD qUkMTf76EbOt53oF8Nxb5PpQxSPlptvXjQZRXQAVpE3vudhjahYvexeBNfM6MhFIbf/D /23g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=p82RnPO2v/lYjjyoZp1EPuTzkbROtjQsT5hssH2qgUI=; b=A8zqBYBUax/8Enlt+95HbXynu82b3e2iZHakNpxOvGXhu0c8kLN35wMyzTsM0/fEFw qgCGhkkFI1jlaEU16GvYrSST2n0ViEV+oF8c8zBNmAysQ/fR28M/oUCo7y1EP/E4yAQs sda1nFG1nheY/rHWKzHIdjoDtB983U8yesL36CBD3JNVxT1byRkG2C81uY8CnKUQtCge WU1gv9Y2lsZjJxgyQqFqlevYDY8M8PfZvv9+pNZZz/12udnRikiqLuGiUt3TV7JwfZx6 IDIxo69SP4lHK91RHjrUbyPaHQ0CmyoD4+bxMkoKHrzM9uF6upypHZlTHkS5PIpaL+XU aJZw== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i26-20020a056a00005a00b0063b1421d10fsi3247878pfk.222.2023.04.20.18.58.33; Thu, 20 Apr 2023 18:58:46 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233404AbjDUBws (ORCPT + 99 others); Thu, 20 Apr 2023 21:52:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233094AbjDUBwr (ORCPT ); Thu, 20 Apr 2023 21:52:47 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA860172C; Thu, 20 Apr 2023 18:52:39 -0700 (PDT) Received: from canpemm100004.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Q2cqw3rH1zSmkt; Fri, 21 Apr 2023 09:48:28 +0800 (CST) Received: from [10.174.179.14] (10.174.179.14) by canpemm100004.china.huawei.com (7.192.105.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 21 Apr 2023 09:52:37 +0800 Subject: Re: [PATCH] ext4: Fix unused iterator variable warnings To: Nathan Chancellor , , CC: , References: <20230420-ext4-unused-variables-super-c-v1-1-138b6db6c21c@kernel.org> From: Jason Yan Message-ID: Date: Fri, 21 Apr 2023 09:52:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20230420-ext4-unused-variables-super-c-v1-1-138b6db6c21c@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.14] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm100004.china.huawei.com (7.192.105.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 2023/4/21 0:51, Nathan Chancellor wrote: > When CONFIG_QUOTA is disabled, there are warnings around unused iterator > variables: > > fs/ext4/super.c: In function 'ext4_put_super': > fs/ext4/super.c:1262:13: error: unused variable 'i' [-Werror=unused-variable] > 1262 | int i, err; > | ^ > fs/ext4/super.c: In function '__ext4_fill_super': > fs/ext4/super.c:5200:22: error: unused variable 'i' [-Werror=unused-variable] > 5200 | unsigned int i; > | ^ > cc1: all warnings being treated as errors > > The kernel has updated to gnu11, allowing the variables to be declared > within the for loop. Do so to clear up the warnings. > > Fixes: dcbf87589d90 ("ext4: factor out ext4_flex_groups_free()") > Signed-off-by: Nathan Chancellor > --- > fs/ext4/super.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) Thanks for the fix: Reviewed-by: Jason Yan