Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4033246ybc; Tue, 26 Nov 2019 02:41:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxFt642s52i35GTy1BwOkWmu4djKBeG8dluL5WGrZ/LomU/27e1nzjJeqFJGL1lkFXtuJCP X-Received: by 2002:a17:906:2552:: with SMTP id j18mr43325600ejb.244.1574764916952; Tue, 26 Nov 2019 02:41:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574764916; cv=none; d=google.com; s=arc-20160816; b=axXrOdVZe2qr3/k2kuexbggSTo7mH+/zPdEGtND2+YFH1YFv0UyJgrd7+/dt/4otlx l4nlSLeQl0sfrtPgqVsUDgdGeDEynGssPbOIWj4MmodzW/FmIrjr9gIxkUyE/zwiz/7v EN8tzeBAlQNebT2TWLb0+tCvXrSLUjTKWOwH7sbcU6rU5O/u6ickwrA0FUSMpNg/5YVZ NGRNmsZpT73VUvs0av9eeVZSZHCzMVmQqIoMJAnVFa1k5CG8FvJpM4SWIbgLqpM1utev N8vSq89+W+QL/hdqT39mwg4GrLreOKPyfU0shEXdWv1eDFgfw/gRVzknuyqBPvljMFro SEZg== 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:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=l3xaaXw1kGt+22CwPw8qtfBHqIfk4YDybYNeQ5nTy2w=; b=fo/B3R2TK767YxDCZIN8UntUltkesZJEX5YUfuCZzb85DF8FnaLrKRx5mCzgN8njJs 4a02umgyU4qKDaPUp7KsUzZLcMyyG5UNvZ2bQg5KDNAdiNa1+UTmnB+R6f7Fr3NWqctV 79sZGchY9SNIbqJTvW77CA4RdHAqEay6FXF7iZON4M8Zl1PXECUztfmc5j+DT3MlyhvZ KBSKKllkeb2Z4QNAn50ds5GHmPADoZHy1RGvkBd5JxduoWz8GBgbamfZgfLDkMo2YtH5 XfUcng43LKZfXWOJXAI381Vj9h6nqxzDBWkUUIcwKHcglvUpWeezQPiWLyKqEH9iU3Bn B+CQ== 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 l10si7867588edk.212.2019.11.26.02.41.29; Tue, 26 Nov 2019 02:41:56 -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 S1727857AbfKZKhK convert rfc822-to-8bit (ORCPT + 99 others); Tue, 26 Nov 2019 05:37:10 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:42105 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727815AbfKZKhK (ORCPT ); Tue, 26 Nov 2019 05:37:10 -0500 Received: by mail-oi1-f195.google.com with SMTP id o12so16142341oic.9; Tue, 26 Nov 2019 02:37:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=zopcK9DsIvrRMoKJaFBKq6wC/oxcFlyic0ael7BkN/8=; b=ZwVGY8zZHU5ZLlSEHGkPOB3WBZlU+FiSvWqw44quKppgl1s6DVA0XOwR/NoRmZKAqp G9F7+R3vQgynRQndg27qMClcfGPlquhPu1hT8D/dAQaWhaPBKgoTm34N4ntgWccIWQ66 avgX31kibPnRfWKhTm34CXTORtTEovoNsD1wiQCEmCsw3tTtMySmX8jYycJ6NTQuLfyg XRfU14g70wJgEAV1xQg15my1zL8ZBMpNz8kzq8DNWUfc9JQ4K93SAMe+0OzcVLlbq1V8 R1FfmF1LJZGZstb861SXWChE3arTel8q8w2JMU6VsR2HzmZWWifSa4QD9OjM2DGRPSM2 bq9A== X-Gm-Message-State: APjAAAUV6hPUiPm7vpIBV5oeArCblh2/6Lieo2R4Ae/47reKO//92F8W kIi13oOB9oe5X+t5lupMA7abLXK2qBez588NsHI= X-Received: by 2002:a05:6808:5d9:: with SMTP id d25mr3047363oij.54.1574764629163; Tue, 26 Nov 2019 02:37:09 -0800 (PST) MIME-Version: 1.0 References: <20191108213853.16635-1-afaerber@suse.de> <20191108213853.16635-2-afaerber@suse.de> <20191111183158.GT3001@twin.jikos.cz> In-Reply-To: <20191111183158.GT3001@twin.jikos.cz> From: Geert Uytterhoeven Date: Tue, 26 Nov 2019 11:36:58 +0100 Message-ID: Subject: Re: [PATCH next 1/2] btrfs: tree-checker: Fix error format string To: David Sterba , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Qu Wenruo , David Sterba , Johannes Thumshirn , Chris Mason , Josef Bacik , linux-btrfs , Linux ARM , Linux Kernel Mailing List 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 Hi David, On Mon, Nov 11, 2019 at 7:32 PM David Sterba wrote: > 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. Yep. On 64-bit, size_t _is_ unsigned long. So you have to compile for both 32-bit and 64-bit. Acked-by: Geert Uytterhoeven > > 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 It indeed is not: Fixes: 153a6d299956983d ("btrfs: tree-checker: Check item size before reading file extent type") > and I'll fold the change to to the patch. Thanks. Apparently that was forgotten, and now the issue is part of Linus' tree. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds