From patchwork Fri Nov 8 21:38:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11235643 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 856B91390 for ; Fri, 8 Nov 2019 21:39:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6428820650 for ; Fri, 8 Nov 2019 21:39:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hOyg2XpL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6428820650 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0W8qHWXkvf8+F+ifIECJI+4eyARsZvnOGAROKYuPgrc=; b=hOyg2XpLI5BCI5 jQNWLtoWjUnI2hH65EWwHcqx0b+6gGWLPqrBTDU1WmdIuneYpiahnZzN9X+cL7sCbkQfgIpUkUGag 2IeFT8c6JfY3T8MPzVs2Fo6BQQXQhKrRMPx87DY5b0wwwBcN5OTKJwch+lBTawW6jhJJtIzlPVOBD hSfp9WENSlart1F8npJdlMyKah0AO3YsBmwhZB5+7ARPYOmO4peaZPXjc2SWE1Bxk6HklUIaf8nSZ oT8Qn0MRHaXzB5QlPqvNPIIOamSnzgwjBJHsQVvxxI+GUVpZq/uzUDL+01I2J1g1UF/WVMK4F6VzK rlEQ6OA4pBVXmn5PqgoA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTBy9-0001NO-3O; Fri, 08 Nov 2019 21:39:01 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTBy5-0001Lz-R6 for linux-arm-kernel@lists.infradead.org; Fri, 08 Nov 2019 21:38:59 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 735B3B19A; Fri, 8 Nov 2019 21:38:56 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: Qu Wenruo , David Sterba Subject: [PATCH next 2/2] btrfs: extent-tree: Fix error format string Date: Fri, 8 Nov 2019 22:38:53 +0100 Message-Id: <20191108213853.16635-3-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191108213853.16635-1-afaerber@suse.de> References: <20191108213853.16635-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191108_133858_033907_7A3C369C X-CRM114-Status: GOOD ( 11.80 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Josef Bacik , Chris Mason , linux-btrfs@vger.kernel.org, Johannes Thumshirn , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Andreas Färber sizeof() returns type size_t, thus we need %zu instead of %lu. This fixes the following build warning on 32-bit arm: In file included from ../include/linux/printk.h:7, from ../include/linux/kernel.h:15, from ../include/asm-generic/bug.h:19, from ../arch/arm/include/asm/bug.h:60, from ../include/linux/bug.h:5, from ../include/linux/thread_info.h:12, from ../include/asm-generic/current.h:5, from ./arch/arm/include/generated/asm/current.h:1, from ../include/linux/sched.h:12, from ../fs/btrfs/extent-tree.c:6: ../fs/btrfs/extent-tree.c: In function '__btrfs_free_extent': ../include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'unsigned int' [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ../include/linux/kern_levels.h:10:19: note: in expansion of macro 'KERN_SOH' 10 | #define KERN_CRIT KERN_SOH "2" /* critical conditions */ | ^~~~~~~~ ../fs/btrfs/ctree.h:2986:24: note: in expansion of macro 'KERN_CRIT' 2986 | btrfs_printk(fs_info, KERN_CRIT fmt, ##args) | ^~~~~~~~~ ../fs/btrfs/extent-tree.c:3207:4: note: in expansion of macro 'btrfs_crit' 3207 | btrfs_crit(info, | ^~~~~~~~~~ ../fs/btrfs/extent-tree.c:3208:83: note: format string is defined here 3208 | "invalid extent item size for key (%llu, %u, %llu) owner %llu, has %u expect >= %lu", | ~~^ | | | long unsigned int | %u Fixes: 0c171e9095e4 ("btrfs: extent-tree: Kill BUG_ON() in __btrfs_free_extent() and do better comment") Cc: Qu Wenruo Cc: David Sterba Signed-off-by: Andreas Färber --- fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 7c7a3e30e917..631c9743ddc7 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3205,7 +3205,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_tree_block_info *bi; if (unlikely(item_size < sizeof(*ei) + sizeof(*bi))) { btrfs_crit(info, -"invalid extent item size for key (%llu, %u, %llu) owner %llu, has %u expect >= %lu", +"invalid extent item size for key (%llu, %u, %llu) owner %llu, has %u expect >= %zu", key.objectid, key.type, key.offset, owner_objectid, item_size, sizeof(*ei) + sizeof(*bi));