Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6536138ybx; Mon, 11 Nov 2019 10:33:48 -0800 (PST) X-Google-Smtp-Source: APXvYqy/USzo12zbH5xYWK7iLsktTdJFYlEJOfwTvwgjy+ZTCzlHCJA5Isx5d1eLyXS23HYBSUQ3 X-Received: by 2002:a17:906:234e:: with SMTP id m14mr23372205eja.94.1573497228363; Mon, 11 Nov 2019 10:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573497228; cv=none; d=google.com; s=arc-20160816; b=FklGZrTn/EkjA/62yZAtLLWDorrG2PjNrnImmtRzs4GzJi9UwG9BwCRPBWPTvVNEBY 6/RTFaKnG0gGMysx/wfmc0u2J3QLzx27I1281OuhCFeFxTLZGwURrjnWCnzycPzrJutO DckvcstCAb5J6yD+w7dFyWRt2K8Lwht9wAFdV9Te2yfbiwWRdCzLH1OVeeKg8XZZMGPQ Gcrx0+E87vmAE8zXR1uF4WCWBiLMdr9M4oXepfFbygugly5onJTUOqRCgn1Sv0BLFDCU ao2jWkt48mnyjNroE1esnrgB4kOKRC24ZU6tYb5mANrC+8CiOu+VFjPO20W4ddlqvloX kEcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:reply-to:message-id:subject:cc:to:from :date; bh=uP/+DiHBm0NxtB1Cuxkj01RQ+PR3/P6N/OhutIR2+XI=; b=s5X08e/HZLpC7rZSnMh2ekWIlZlTMkoXzp/ztLs6ZJpw07SZ5B/6wwQcjmspiOHgOj fmYoAYb3Y92kAdhwcQv2b609x7zoLXT0vokwthwy1dsagFVAAFjiNTQTWMeBp8LzoRjf 6JgZdkICF7keF9OqrzXe0erJe/uhLMnwJF1v4oLqAMvJIrWtgXT8SBTWMYCmC66d0FAf bi6dY/epB/sNtRvdYM7ZrdJurapvf+8gry32EQZMsuI6cxNh/JNs6Zje5DQXECrUo2AQ KKN4Dp7CFk5FTARIuQdJTV4HkX1hMwHs8kKFBL1ZwdSX+c+395+YP0+bFUKA2VESe+yi V1cQ== 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 p13si8889218eju.398.2019.11.11.10.33.24; Mon, 11 Nov 2019 10:33:48 -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 S1727815AbfKKSb5 (ORCPT + 99 others); Mon, 11 Nov 2019 13:31:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:45288 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727770AbfKKSbz (ORCPT ); Mon, 11 Nov 2019 13:31:55 -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 14E12B2E3; Mon, 11 Nov 2019 18:31:54 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 48398DA7AF; Mon, 11 Nov 2019 19:31:58 +0100 (CET) Date: Mon, 11 Nov 2019 19:31:58 +0100 From: David Sterba To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Qu Wenruo , David Sterba , Johannes Thumshirn , Chris Mason , Josef Bacik , linux-btrfs@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH next 1/2] btrfs: tree-checker: Fix error format string Message-ID: <20191111183158.GT3001@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Andreas =?iso-8859-1?Q?F=E4rber?= , Qu Wenruo , David Sterba , Johannes Thumshirn , Chris Mason , Josef Bacik , linux-btrfs@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20191108213853.16635-1-afaerber@suse.de> <20191108213853.16635-2-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191108213853.16635-2-afaerber@suse.de> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 08, 2019 at 10:38:52PM +0100, Andreas F?rber wrote: > From: Andreas F?rber > > Argument BTRFS_FILE_EXTENT_INLINE_DATA_START is defined as offsetof(), > which returns type size_t, so we need %zu instead of %lu. > > This fixes a build warning on 32-bit arm: > > ../fs/btrfs/tree-checker.c: In function 'check_extent_data_item': > ../fs/btrfs/tree-checker.c:230:43: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=] > 230 | "invalid item size, have %u expect [%lu, %u)", > | ~~^ > | | > | long unsigned int > | %u Is there a gcc warning option that can catch that on 64bit too? -Wformat=2 does not and I don't see any other of the option family to do that. We've had fixups of the size_t printk formats and I'd like to catch that when the patches are added to the devel branches. I can't run 32bit build check each time but this seems to be the only way so far. > Fixes: a31ccb4b7ba2 ("btrfs: tree-checker: Check item size before reading file extent type") As the patch is still in the devel branch, the commit id is not stable and I'll fold the change to to the patch. Thanks.