From patchwork Tue Jul 17 13:52:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 142147 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3691799ljj; Tue, 17 Jul 2018 06:53:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfQHA/xv5nnvGsGD9Cu8xh+wVRT/uuU8HZ0rRjKfK8ZEKRHQh3pS/m09bGAZRPdj7UDaJj6 X-Received: by 2002:a63:fa48:: with SMTP id g8-v6mr1716732pgk.224.1531835606515; Tue, 17 Jul 2018 06:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531835606; cv=none; d=google.com; s=arc-20160816; b=Ifv9wHp+nt+KzqMirp4Clu+nFuM9rHf281HCZJoB4zWWyxAKEMmRidAOIEiWkRDyyk xvDKME5UNB0B0wYge9WDSihiEodAryso+1Q28Zosyi2YrNIIwxC97Kd+MGvKItvZQF0X rx18C0tOOFTNdjsIOW0Mzt1TNi+h6iBHxo4SDUEYzRIWMs9LcMHooolYbW/an9YoyqMg 9Pa0IISiHm6MvQs9YGUy/UVHzzSPenJ2GfQCzmpzUojy9hDMCleFpzqrrhNPH3kzcTUn gNyocLuj0+CWHLWMGAaaWyaM5bJMeeot1dbCr4ib7kN7rdYC0DXhh7SwvUUZSNzcq3Ix tDLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=kBcq0Pgf4u8Y/eccEn7EsTveq1nRHgcHu/BIZxdJsfk=; b=qzGItOTEU5TofNNgP/QP3Zv1rU1DobT9rbz8F9ZRelHQfX1JH/uJYaMNk/r40D1k4l K7qoYOdcS3A/O0SMyu0lzwNu91uL2hrffGsHU6WtUm8+esVy6XbwWDlBHkh5/l5Gn0RS 5a2Fkxv9tM9e7HaEk97+gRdgbJ5cquxNEbIwMJL63iXZ21piaKXh13AXE9IRW2BGpJhc +piTswJ4B/1Z82l7V6JZK2fzFVM5yzcZP9KkuGNuegRyrjZX0pUhhQef4rcDcLEDkSWq aF7DAX/6oLuTM8/zIGK2OU9VqsTQXnJpofRICCBke1Vpcq9wX7xedPFpO6mbxBhMBeHJ LPfA== 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 p62-v6si923584pfb.274.2018.07.17.06.53.26; Tue, 17 Jul 2018 06:53:26 -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 S1731821AbeGQO0K (ORCPT + 31 others); Tue, 17 Jul 2018 10:26:10 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:57787 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731655AbeGQO0K (ORCPT ); Tue, 17 Jul 2018 10:26:10 -0400 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0LgSHJ-1gQFoB0Ybt-00nxB3; Tue, 17 Jul 2018 15:52:38 +0200 From: Arnd Bergmann To: Chris Mason , Josef Bacik , David Sterba Cc: Arnd Bergmann , Qu Wenruo , Nikolay Borisov , Su Yue , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: fix size_t format string Date: Tue, 17 Jul 2018 15:52:27 +0200 Message-Id: <20180717135236.3673195-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:JyOdYsiPIyHvDRUYcZbth9ln505lBrfeOoym1L7Eu6yYKCDUoM9 n+Ggtg7fWOzfvQljM9aL+Ry+VV2RKws3qVqcGKI2931SPr+8yvX7UB2xb9xuClk3EDODPu0 Z69tm4631fUDH3gX6PlUqQpDZAkliNmsoSzYBrKwJ7rBlSUzAbLJHIUSrCfQH7Rt6s5BBdl EE0igGuWxXJnZuuBzNsGA== X-UI-Out-Filterresults: notjunk:1; V01:K0:ulCBUS9ZOzE=:UmmKXZ0exd1Yw64irmBxui FfCzA7KiUwT1LQRzAA1VJV7fUtHLWhfDaOOdH/EZ8xAqYTOOJD9Y/Ipw68m2kjsvgO7CF2VIN Dq3L+hACZ3XdnBKXt+GEQe+vZAVxri7iBV/yQjH5tib9HD20vidH/QoErd9bFlxVCFsA6YNRS zFtepNyplzn5ZEyNEfasmtZdcdHIvXY0ZLDUTcWgA4N3V4RH3LfMQpLW/zWxvlJLewhT5A1dD b6cQ/w5Xn/zSYeMNufp5tFoEAG7sxoIBulJ8VidH4Ud0GjmVR1UeUI8EOgKjl2/4G2mWX5yHk 9V5QmEMQju0tGUVv0ddT/bOaTONG0ZSYyzzOgoVBmcxJD7A3VvwZIUHKoUluhuxhQ8My0/H5I NlkCSJnXGZ4EibQmERCshDWESKsKqKlgEVQtthkkBS+9zcK0kfgs5eygVsjur48Gd0T1hrObd Ng855zSxsyLDEBr96kuZBbFUbLqaFpybPnoSgvUMEcIZgZk16LW7kAYnx8TTLZ314zQoGvRrk j7u0xXyGa/GOp3YHrGsVpesVmLrHIg95Damc6FhsXWDYs0TRHzLyZU5plFrvWTMQnLK6MMXpZ OmF4nb9KJeMXYllmftVBF4gmScvcJjRVFUUB0BWfH0MiobCIDnMZEAN3IQmZCbZkUgSvhK+r0 Cf6eZfHISE2bWoNVxoH3LihyJXHJz9JYOaOGqPgAjCoNlDEwxcCFVMA6/E3kuJydfY54= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") Signed-off-by: Arnd Bergmann --- fs/btrfs/tree-checker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 Reviewed-by: Qu Wenruo 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; }