Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3609028imm; Tue, 17 Jul 2018 07:35:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcF3IhKjlWh4ozORi1aMM9jSLDPY2tpqQqrMlC4EpUvFaIDj2RDhRGQxUjmlQQZiO6ncCUA X-Received: by 2002:a62:47c4:: with SMTP id p65-v6mr978431pfi.170.1531838105849; Tue, 17 Jul 2018 07:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531838105; cv=none; d=google.com; s=arc-20160816; b=rDclLzoFzyTxCRdrcqs0Q4bq+EF3mYodTFZq9dVBlMMRm5QgwQsusEimWxuwbBxnrD 0QDoPJ0/+l2tnZDqK50a+/kd4ND9Pq0GzHdo8iQ+YDWoMqp5CbCInQbthAEVIrzL9QsU Kt+vvMIKQTRFvhidkNTjPogh3AowBOpDqTPelkB31Z7e9+AsNwDLni6128A+QOxgBggO MW3PEEQVe3oLfPqReeR/s2qQXJeQMxMbyYFc9CSUgexwDY6gaNp1Al/oUzq4Z8oBQ0BC yQnL+lKNelD8P5CwSI1U4SQCyzJ1IYdEJs4MJiZphqY+oSJootMK70xq7z7zLcjDRcl1 tJDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=2XYmGiOS9WzYhTpy3VP68KI5voQUKHnJx3F/e6mFBZg=; b=UEYiTnUERiVzbz9FMC+vSR1aqxCMYQ8BgO7QIj1Jp+lVeq9G3VLRrR58f+bUbBjyHK XZkAXS/L4iT5xPLs6qvpAd6MH1i7TYsmLLQpn/tBMr8PurLOzA44nJTeD8DI/2Zj7TJr Ki6l3SP7Tidw+KLolwG/RemaioEWmY7WxLwBJ6BtP1VyPM2AiPdWjXaOF0IqyHgJ8xmq yFo5JmokM2aLpFj7sP8kul89LoVA8IQ9qsQLPIqzA5lkLh0Hfb68FJ7aU0n3aMtAtjTX t0OgNdgfd3g5mB+pirq+9P2nJMT0e2TAJx4KIEXFuUIMOxWSzxbHQrebv9VWe1ey1YVm Ex5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11-v6si1241911plm.143.2018.07.17.07.34.51; Tue, 17 Jul 2018 07:35:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731721AbeGQPG2 (ORCPT + 99 others); Tue, 17 Jul 2018 11:06:28 -0400 Received: from mout.gmx.net ([212.227.15.19]:39681 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729673AbeGQPG2 (ORCPT ); Tue, 17 Jul 2018 11:06:28 -0400 Received: from [0.0.0.0] ([210.140.77.29]) by mail.gmx.com (mrgmx003 [212.227.17.184]) with ESMTPSA (Nemesis) id 0MdKkd-1fO2e7105L-00IWLY; Tue, 17 Jul 2018 16:33:17 +0200 Subject: Re: [PATCH] btrfs: fix size_t format string To: Arnd Bergmann , Chris Mason , Josef Bacik , David Sterba Cc: Qu Wenruo , Nikolay Borisov , Su Yue , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180717135236.3673195-1-arnd@arndb.de> From: Qu Wenruo Openpgp: preference=signencrypt Autocrypt: addr=quwenruo.btrfs@gmx.com; prefer-encrypt=mutual; keydata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pXrJH1fN GSsRb+pKEKHKtL1803x71zQxCwLh+zLP1iXHVM5j8gX9zqupigQR/Cel2XPS44zWcDW8r7B0 q1eW4Jrv0x19p4P923voqn+joIAostyNTUjCeSrUdKth9jcdlam9X2DziA/DHDFfS5eq4fEv ABEBAAHCwHwEGAEIACYWIQQt33LlpaVbqJ2qQuHCPZHzoSX+qAUCWdWBrwIbDAUJA8JnAAAK CRDCPZHzoSX+qA3xB/4zS8zYh3Cbm3FllKz7+RKBw/ETBibFSKedQkbJzRlZhBc+XRwF61mi f0SXSdqKMbM1a98fEg8H5kV6GTo62BzvynVrf/FyT+zWbIVEuuZttMk2gWLIvbmWNyrQnzPl mnjK4AEvZGIt1pk+3+N/CMEfAZH5Aqnp0PaoytRZ/1vtMXNgMxlfNnb96giC3KMR6U0E+siA 4V7biIoyNoaN33t8m5FwEwd2FQDG9dAXWhG13zcm9gnk63BN3wyCQR+X5+jsfBaS4dvNzvQv h8Uq/YGjCoV1ofKYh3WKMY8avjq25nlrhzD/Nto9jHp8niwr21K//pXVA81R2qaXqGbql+zo Message-ID: Date: Tue, 17 Jul 2018 22:33:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180717135236.3673195-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:F1xnq0o2aptKzFU+78mvZPnsdHUk71JnT0hczhGWCLkXDQ7QZ6B 9xVytWy2KdVf1B18VJ7QGsMmm2VQjzyZry/e7GlV5Z+3xKvOhVFX3iZoczgUN9pTk0kWz2H fWJKkd8mxnWFmZ/ph7TcAWFR5XduOjxUzyo8pJDsKE27k47MXBJrggQUL2QYdRgtKP5Yf08 zdBMJM1PU8Ul2pE82ltig== X-UI-Out-Filterresults: notjunk:1;V01:K0:PVdPamnmaeo=:KaEdfiveKTMG3TNSH0JDKa RTfqyt9XLph+V9ug6S0cizi8ihmHDhevqVUPOdJOXU5wfNieUkLDTNlIF18jvgTt41rF6T4Js 5psYJLizF1Inn5WlM5A0Y4vJFKMMHbX9c9eqFpSikT2Ygt2N3TYIeV7+4wn76crzqXyPMEOif fpKicykdnE8y6QF1l5z5R3kCqCRBap/LwU949HPEnteEQifxsrBQ7y0q71ZomIOvZ44tz7+EL v0mZkzMVPacImA4OzgWHnuB817Ir6Qnmyke65Wn1Ssff8ys9klrADy4fH7wk2wJEiomkGvq8N 2y+UMaNvO8KRx86/rRD2NzC7BT62uCvvgdcXNXdCS9P1ZY47BSi0uocXvtM4UhmGL4AImaXZK W03zmzxjjX91w6bdE2Du7oDAq43YGo1bwiMKqe+KjjyJRh4F4X8LuWM5iy/l2Npm2OOeuASM0 kTAEENVxGjUcVUc7wHV4DXpPwHnYpLcd/wllJFtPKFRA/dJFI93n7lzXOIQ1RIYJqAyxIcb/+ Af4taOuanRq4JwlJCm58pECrlZmmVsFS/I1XCpZb01tlpyuuW0GmqVH40gCZc8Uz4r8OUSjKL Sf3S/HCJIDtCkXQCJJ/yJrZau6MKNGxLBlRG7tqcH6v7DinAy78wp9AutNz0iIhi+mw0C+S0j Vcd1UltZSA3CU6eqwZ8g1Ljgg/WWkG6/WHryfJv7hRrXGDgoJRGGoYVWtwFodJc9P3nE3mtaA 3NAr62kJHZHPG9GNNgIcTVrcqGasHEimIgbMLO4tNCoshqSIcQ7V6PtTDnVLWYO0K5bnTBcae 5Jkv6Gz Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018年07月17日 21:52, Arnd Bergmann wrote: > The newly added check_block_group_item() function causes a build warning > on 32-bit architectures: > > fs/btrfs/tree-checker.c: In function 'check_block_group_item': > fs/btrfs/tree-checker.c:404:41: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'unsigned int' [-Werror=format=] > > The type of a sizeof() expression is size_t, which is correctly printed > using the %zu format string. > > Fixes: 9dc16aad5660 ("btrfs: tree-checker: Verify block_group_item") My fault again. :( Is there anyway to make gcc report such problem even under x86_64? > Signed-off-by: Arnd Bergmann Reviewed-by: Qu Wenruo Thanks, Qu > --- > fs/btrfs/tree-checker.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c > index e9414c3f375e..4c82a628df85 100644 > --- a/fs/btrfs/tree-checker.c > +++ b/fs/btrfs/tree-checker.c > @@ -401,7 +401,7 @@ static int check_block_group_item(struct btrfs_fs_info *fs_info, > > if (item_size != sizeof(bgi)) { > block_group_err(fs_info, leaf, slot, > - "invalid item size, have %u expect %lu", > + "invalid item size, have %u expect %zu", > item_size, sizeof(bgi)); > return -EUCLEAN; > } >