From: Eric Sandeen <sandeen@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Chris Mason <chris.mason@fusionio.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/12] Btrfs: Remove superfluous casts from u64 to unsigned long long
Date: Tue, 20 Aug 2013 09:17:49 -0500 [thread overview]
Message-ID: <52137A8D.40805@redhat.com> (raw)
In-Reply-To: <52137A5A.8060207@redhat.com>
On 8/20/13 9:16 AM, Eric Sandeen wrote:
> On 8/20/13 6:20 AM, Geert Uytterhoeven wrote:
>> u64 is "unsigned long long" on all architectures now, so there's no need to
>> cast it when formatting it using the "ll" length modifier.
>>
>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> ---
>> fs/btrfs/backref.c | 24 ++--
>> fs/btrfs/check-integrity.c | 294 ++++++++++++++-----------------------------
>> fs/btrfs/compression.c | 5 +-
>> fs/btrfs/ctree.c | 6 +-
>> fs/btrfs/delayed-inode.c | 10 +-
>> fs/btrfs/dev-replace.c | 2 +-
>> fs/btrfs/disk-io.c | 25 ++--
>> fs/btrfs/extent-tree.c | 47 +++----
>> fs/btrfs/extent_io.c | 30 ++---
>> fs/btrfs/file-item.c | 4 +-
>> fs/btrfs/free-space-cache.c | 6 +-
>> fs/btrfs/inode.c | 24 ++--
>> fs/btrfs/ioctl.c | 10 +-
>> fs/btrfs/ordered-data.c | 11 +-
>> fs/btrfs/print-tree.c | 80 +++++-------
>> fs/btrfs/qgroup.c | 10 +-
>> fs/btrfs/relocation.c | 7 +-
>> fs/btrfs/root-tree.c | 3 +-
>> fs/btrfs/scrub.c | 16 +--
>> fs/btrfs/super.c | 10 +-
>> fs/btrfs/transaction.c | 3 +-
>> fs/btrfs/volumes.c | 19 ++-
>> 22 files changed, 222 insertions(+), 424 deletions(-)
>>
>> diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
>> index 8bc5e8c..c1a518e 100644
>> --- a/fs/btrfs/backref.c
>> +++ b/fs/btrfs/backref.c
>> @@ -295,10 +295,9 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,
>> ret = btrfs_search_old_slot(root, &ref->key_for_search, path, time_seq);
>> pr_debug("search slot in root %llu (level %d, ref count %d) returned "
>> "%d for key (%llu %u %llu)\n",
>> - (unsigned long long)ref->root_id, level, ref->count, ret,
>> - (unsigned long long)ref->key_for_search.objectid,
>> - ref->key_for_search.type,
>> - (unsigned long long)ref->key_for_search.offset);
>> + ref->root_id, level, ref->count, ret,
>> + ref->key_for_search.objectid, ref->key_for_search.type,
>> + ref->key_for_search.offset);
>> if (ret < 0)
>> goto out;
>>
>> @@ -1326,8 +1325,7 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical,
>> found_key->type != BTRFS_METADATA_ITEM_KEY) ||
>> found_key->objectid > logical ||
>> found_key->objectid + size <= logical) {
>> - pr_debug("logical %llu is not within any extent\n",
>> - (unsigned long long)logical);
>> + pr_debug("logical %llu is not within any extent\n", logical);
>
> ...
>
> Many platforms use "long" for u64, so without these casts, they'll generate
> compile-time printf-format warnings. See int-l64.h, and the various
> arch/*/include/uapi/asm/types.h files that include it - ia64, ppc, etc.
Sorry, should have read your commit message first ;) I didn't know that this
had changed...
-Eric
> -Eric
>
next prev parent reply other threads:[~2013-08-20 14:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 11:20 [PATCH 00/12] Btrfs: cast cleanups Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 01/12] Btrfs: Remove superfluous casts from u64 to unsigned long long Geert Uytterhoeven
2013-08-20 14:16 ` Eric Sandeen
2013-08-20 14:17 ` Eric Sandeen [this message]
2013-08-20 11:20 ` [PATCH 02/12] Btrfs: Make BTRFS_DEV_REPLACE_DEVID an unsigned long long constant Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 03/12] Btrfs: Format PAGE_SIZE as unsigned long Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 04/12] Btrfs: Format mirror_num as int Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 05/12] Btrfs: Make btrfs_device_uuid() return unsigned long Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 06/12] Btrfs: Make btrfs_device_fsid() " Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 07/12] Btrfs: Make btrfs_dev_extent_chunk_tree_uuid() " Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 08/12] Btrfs: Make btrfs_header_fsid() " Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 09/12] Btrfs: Make btrfs_header_chunk_tree_uuid() " Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 10/12] Btrfs: PAGE_CACHE_SIZE is already " Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 11/12] Btrfs: Do not truncate sector_t on 32-bit with CONFIG_LBDAF=y Geert Uytterhoeven
2013-08-20 11:20 ` [PATCH 12/12] Btrfs: Use %z to format size_t Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52137A8D.40805@redhat.com \
--to=sandeen@redhat.com \
--cc=chris.mason@fusionio.com \
--cc=geert@linux-m68k.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).