Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp91903rwe; Tue, 23 Aug 2022 19:12:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR5CjchbOPrZOfDQ/4VahYKui7M7wr0k8gEuOnKRuaSsntuAKuWkpNeJHsne92Hq8SdwE8Qz X-Received: by 2002:a17:907:9706:b0:73d:a869:3551 with SMTP id jg6-20020a170907970600b0073da8693551mr1475291ejc.665.1661307147328; Tue, 23 Aug 2022 19:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661307147; cv=none; d=google.com; s=arc-20160816; b=XtapIh57FxTe5HkHEGnIWz+5qQWw50oNGQ6cTtbQLgIW6gZhVejxSxz5q1I/2lqj3i FQpQYpTuSR4wVtpKMmwTq6f7ojBD0SomIek12JdiWjQ7gevZw+24TKzpRrrkh18DAa2m YqAsb2H8iElsIgVgWnR4jNz7geQ1BfOE2V+3EzKqAgQgx+i8kgFTNLV1AputURQUC0Ia 0uTgUyYGCGcw67/qA3xGJfo1Gbc6VUgNru6wvaFOekIXT3yjZb4S+XjS2xIki1Vnk3Q/ VCRp61sY4jA8ZUMmAku8DClI7vtSrB0YnYmHbatQc/zPep1vYeEuDxkKa8XXmCOlIkRQ 49GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:cc:from :references:to:subject:user-agent:mime-version:date:message-id; bh=AjAJaYFgWVfRf+mbnvWDAQh+iMVRt2tcgOFSQ6MBegY=; b=rR9OcD6bBxdG0bx58F7W6PPPRWFJ9IyC7oEGoD5X/VJdY1FX+/TQQlPssegg4ukuUK fJIb3jxvV8YDDaDcEKjCf+i+SqJNSWk/aIqgqs1g/Cex7Q5Ord8Eszr+49cwAUSK08L+ njMcGTYMlJeIx0vK0Ub3+gbilcYEWnkvTyJHRWNp655KTU0gYe+Js9Zc9IIaHnMNZ7kP w/gFmBrDYiHmCNANRIcEL1kfuQg6W7p7xrhbCRVSokKCQkVWiIl53rUgWG6rEwCdGHmg A6nsjkjQ1hGwhJXOgdDUBxfyomvX/6CP7sxHDXxW+hIh8AQUNouD60NlVTYYuMPxtDbM ZAQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht22-20020a170907609600b0073d7ce7e954si1011771ejc.695.2022.08.23.19.12.01; Tue, 23 Aug 2022 19:12:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232898AbiHXBzB (ORCPT + 99 others); Tue, 23 Aug 2022 21:55:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232883AbiHXBzA (ORCPT ); Tue, 23 Aug 2022 21:55:00 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14AD274358 for ; Tue, 23 Aug 2022 18:54:59 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MC8FC3r2LzXdvf; Wed, 24 Aug 2022 09:50:39 +0800 (CST) Received: from [10.174.179.163] (10.174.179.163) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 24 Aug 2022 09:54:42 +0800 Message-ID: Date: Wed, 24 Aug 2022 09:54:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH -next] xfs: remove "%Lu" which doesn't meet C standard To: "Darrick J. Wong" References: <20220823015517.4160583-1-zengheng4@huawei.com> From: Zeng Heng CC: In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.163] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500022.china.huawei.com (7.185.36.162) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yes, I'm pleasure send more similar patches if they were a bit helpful for xfs. Besides, I'm just a rookie in XFS, and have read about your edition of . Just let you know, it's a good job. Best Regards, Zeng Heng 在 2022/8/23 22:27, Darrick J. Wong 写道: > On Tue, Aug 23, 2022 at 09:55:17AM +0800, Zeng Heng wrote: >> The "%Lu" specifier, which represents long long unsigned, >> doesn't meet C language standard, and even more, >> it makes people easily mistake with "%lu", which represent >> long unsigned. So replace "%Lu" with "llu". >> >> Signed-off-by: Zeng Heng > Yesss finally fixing this > Reviewed-by: Darrick J. Wong > > --D > >> --- >> fs/xfs/xfs_inode.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c >> index 28493c8e9bb2..b3eeeae3afe1 100644 >> --- a/fs/xfs/xfs_inode.c >> +++ b/fs/xfs/xfs_inode.c >> @@ -3119,7 +3119,7 @@ xfs_iflush( >> if (XFS_TEST_ERROR(dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC), >> mp, XFS_ERRTAG_IFLUSH_1)) { >> xfs_alert_tag(mp, XFS_PTAG_IFLUSH, >> - "%s: Bad inode %Lu magic number 0x%x, ptr "PTR_FMT, >> + "%s: Bad inode %llu magic number 0x%x, ptr "PTR_FMT, >> __func__, ip->i_ino, be16_to_cpu(dip->di_magic), dip); >> goto flush_out; >> } >> @@ -3129,7 +3129,7 @@ xfs_iflush( >> ip->i_df.if_format != XFS_DINODE_FMT_BTREE, >> mp, XFS_ERRTAG_IFLUSH_3)) { >> xfs_alert_tag(mp, XFS_PTAG_IFLUSH, >> - "%s: Bad regular inode %Lu, ptr "PTR_FMT, >> + "%s: Bad regular inode %llu, ptr "PTR_FMT, >> __func__, ip->i_ino, ip); >> goto flush_out; >> } >> @@ -3140,7 +3140,7 @@ xfs_iflush( >> ip->i_df.if_format != XFS_DINODE_FMT_LOCAL, >> mp, XFS_ERRTAG_IFLUSH_4)) { >> xfs_alert_tag(mp, XFS_PTAG_IFLUSH, >> - "%s: Bad directory inode %Lu, ptr "PTR_FMT, >> + "%s: Bad directory inode %llu, ptr "PTR_FMT, >> __func__, ip->i_ino, ip); >> goto flush_out; >> } >> @@ -3158,7 +3158,7 @@ xfs_iflush( >> if (XFS_TEST_ERROR(ip->i_forkoff > mp->m_sb.sb_inodesize, >> mp, XFS_ERRTAG_IFLUSH_6)) { >> xfs_alert_tag(mp, XFS_PTAG_IFLUSH, >> - "%s: bad inode %Lu, forkoff 0x%x, ptr "PTR_FMT, >> + "%s: bad inode %llu, forkoff 0x%x, ptr "PTR_FMT, >> __func__, ip->i_ino, ip->i_forkoff, ip); >> goto flush_out; >> } >> -- >> 2.25.1 >>