From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E508EC10F14 for ; Fri, 19 Apr 2019 01:14:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ADC4720693 for ; Fri, 19 Apr 2019 01:14:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727151AbfDSBON (ORCPT ); Thu, 18 Apr 2019 21:14:13 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:59186 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725987AbfDSBOM (ORCPT ); Thu, 18 Apr 2019 21:14:12 -0400 Received: from DGGEMM404-HUB.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 564E82E40436F81C3093; Fri, 19 Apr 2019 09:14:09 +0800 (CST) Received: from dggeme763-chm.china.huawei.com (10.3.19.109) by DGGEMM404-HUB.china.huawei.com (10.3.20.212) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 19 Apr 2019 09:14:07 +0800 Received: from [10.134.22.195] (10.134.22.195) by dggeme763-chm.china.huawei.com (10.3.19.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 19 Apr 2019 09:14:07 +0800 Subject: Re: linux-next: build warning after merge of the block tree To: Jaegeuk Kim CC: Stephen Rothwell , Jens Axboe , Linux Next Mailing List , "Linux Kernel Mailing List" , Christoph Hellwig References: <20190417123125.3de22f73@canb.auug.org.au> <0879e11b-c84c-65b8-581f-bf7adcb5e231@huawei.com> <20190417140305.GB23731@jaegeuk-macbookpro.roam.corp.google.com> <20190418140104.GA52314@jaegeuk-macbookpro.roam.corp.google.com> From: Chao Yu Message-ID: Date: Fri, 19 Apr 2019 09:14:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190418140104.GA52314@jaegeuk-macbookpro.roam.corp.google.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-ClientProxiedBy: dggeme706-chm.china.huawei.com (10.1.199.102) To dggeme763-chm.china.huawei.com (10.3.19.109) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/4/18 22:01, Jaegeuk Kim wrote: > On 04/18, Chao Yu wrote: >> On 2019/4/17 22:03, Jaegeuk Kim wrote: >>> On 04/17, Chao Yu wrote: >>>> Hi Jaegeuk, >>>> >>>> On 2019/4/17 10:31, Stephen Rothwell wrote: >>>>> Hi all, >>>>> >>>>> After merging the block tree, today's linux-next build (x86_64 >>>>> allmodconfig) produced this warning: >>>>> >>>>> fs/f2fs/node.c: In function 'f2fs_remove_inode_page': >>>>> fs/f2fs/node.c:1193:47: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'blkcnt_t' {aka 'long long unsigned int'} [-Wformat=] >>>>> "Inconsistent i_blocks, ino:%lu, iblocks:%zu", >>>>> ~~^ >>>>> %llu >>>>> inode->i_ino, inode->i_blocks); >>>>> ~~~~~~~~~~~~~~~ >>>> >>>> Could you please help to fix that as below in your dev branch directly? >>>> >>>> "Inconsistent i_blocks, ino:%lu, iblocks:%llu", >>> >>> We can just use "%lu"? >> >> We'd better follow sample in Documentation/core-api/printk-formats.rst: >> >> If is dependent on a config option for its size (e.g., sector_t, >> blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a >> format specifier of its largest possible type and explicitly cast to it. > > Great, done. :) Thanks, :) > > Thanks, > >> >> Example:: >> >> printk("test: sector number/total blocks: %llu/%llu\n", >> (unsigned long long)sector, (unsigned long long)blockcount); >> >> Thanks, >> >>> >>>> inode->i_ino, (unsigned long long)inode->i_blocks) >>>> >>>> >>>> It looks that we need to fix below commits as well: >>>> >>>> f2fs: fix to avoid panic in dec_valid_block_count() >>>> f2fs: fix to avoid panic in dec_valid_node_count() >>>> >>>> Thanks, >>>> >>>>> >>>>> Introduced by commit >>>>> >>>>> 90ae238d9dac ("f2fs: fix to avoid panic in f2fs_remove_inode_page()") >>>>> >>>>> from the f2fs tree interacting with commit >>>>> >>>>> 72deb455b5ec ("block: remove CONFIG_LBDAF") >>>>> >>> . >>> > . >