Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3077512ybx; Fri, 8 Nov 2019 13:42:04 -0800 (PST) X-Google-Smtp-Source: APXvYqy5j8STVCtGD1vJmqGpJawGCbgCm/F8qzENCctjMeQqcWc2bJtksHAMDE91FdbZWGLPb9+3 X-Received: by 2002:a05:6402:b02:: with SMTP id bm2mr12937859edb.130.1573249324896; Fri, 08 Nov 2019 13:42:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573249324; cv=none; d=google.com; s=arc-20160816; b=IPVgVrEbKxSL2rauePR1bFtzXy6cjwDAbY8mRX4d1rMPgYc+wpsYPLQu7YRL/CojjC ZG99c7r2vEnsbvLiFHl49eKJZoykBVCnv2EtrNlCC3+75JOHV5lI2dzDS1JhWFoYCPK8 IIke3bD+iuV3ShzXWg/Zq0etVHMGDPlXHoWwVh/k0NLoWM0Nom2E6xN57UakphN9GA+d c7PMVAq/T2a0eeja1QYXAI91dP/NxEsgD/gz1HvveTKMbuB0eBCY39eNEnPT20xP+hCm bDg0eVG7ADXnd726KIneirgrv25D0RSCKDP0RtMTdQ7Q/m6njPO+dnGdufeOv6bCNd4m pcbA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ruAMYIjz6wX5NOvYcLYpAfGckTd1Q36sMes4TswonAM=; b=CJ4P0ZefQUqt62mrq64d6uvC0pHsSqCcgkZZyUpHh9xCrulvYutJhAOUPCXmmpiuCg CvDQTOETj6Dh8m93nTHQhA/Hn7X1Gxjc3Pmor1PDC/kcOaap7UpLB/kVBO8qewgJmbRV VR8xWJ74Y1TAiTCg7z5fUC8mccmWIeddXZSfc+cAT3L7FI6o70FUk1YCraiqu5BcZNKK Y3qyNaKa08UAzoG8XXlL94dtzmJcJLXmgU9jPigY/aEnBDRLo9vX3FRWbDMmJ3KeJFZB XjWtBN03XZAcUnqXvGXqo173GJlvkAS0/DI1THGaPENoJIt4iXQBs0Do56p4dxzzs2Up ZYZQ== 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 nf6si4606159ejb.406.2019.11.08.13.41.40; Fri, 08 Nov 2019 13:42:04 -0800 (PST) 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 S2388638AbfKHVjA (ORCPT + 99 others); Fri, 8 Nov 2019 16:39:00 -0500 Received: from mx2.suse.de ([195.135.220.15]:45870 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731097AbfKHVi6 (ORCPT ); Fri, 8 Nov 2019 16:38:58 -0500 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=20F=C3=A4rber?= To: Qu Wenruo , David Sterba Cc: Johannes Thumshirn , Chris Mason , Josef Bacik , linux-btrfs@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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)); -- 2.16.4