From: Shaohua Li <shli@kernel.org>
To: Kyungchan Koh <kkc6196@fb.com>
Cc: linux-raid@vger.kernel.org, Kernel-team@fb.com
Subject: Re: [PATCH] md: uuid debug statement now in processor byte order.
Date: Wed, 24 May 2017 16:17:27 -0700 [thread overview]
Message-ID: <20170524231727.uqugqyrb72zggryn@kernel.org> (raw)
In-Reply-To: <b8df704c40a411e783200002c9dfb610-1a1976b0@d534dd3d68affa13903f5fb3ca3863d112c51930cd4dca1fc26760790e4487f4>
On Wed, May 24, 2017 at 10:16:27AM -0700, Kyungchan Koh wrote:
> Previously, the uuid debug statements were printed in little-endian
> format, which wasn't consistent in machines that might not be in
> little-endian byte order. With this change, the output will be
> consistent for all machines with different byte-ordering.
applied, thanks!
> Signed-off-by: Kyungchan Koh <kkc6196@fb.com>
> ---
> drivers/md/bitmap.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> index bf7419a..f4eace5 100644
> --- a/drivers/md/bitmap.c
> +++ b/drivers/md/bitmap.c
> @@ -485,10 +485,10 @@ void bitmap_print_sb(struct bitmap *bitmap)
> pr_debug(" magic: %08x\n", le32_to_cpu(sb->magic));
> pr_debug(" version: %d\n", le32_to_cpu(sb->version));
> pr_debug(" uuid: %08x.%08x.%08x.%08x\n",
> - *(__u32 *)(sb->uuid+0),
> - *(__u32 *)(sb->uuid+4),
> - *(__u32 *)(sb->uuid+8),
> - *(__u32 *)(sb->uuid+12));
> + le32_to_cpu(*(__u32 *)(sb->uuid+0)),
> + le32_to_cpu(*(__u32 *)(sb->uuid+4)),
> + le32_to_cpu(*(__u32 *)(sb->uuid+8)),
> + le32_to_cpu(*(__u32 *)(sb->uuid+12)));
> pr_debug(" events: %llu\n",
> (unsigned long long) le64_to_cpu(sb->events));
> pr_debug("events cleared: %llu\n",
> --
> 2.9.3
>
next parent reply other threads:[~2017-05-24 23:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <b8df704c40a411e783200002c9dfb610-1a1976b0@d534dd3d68affa13903f5fb3ca3863d112c51930cd4dca1fc26760790e4487f4>
2017-05-24 23:17 ` Shaohua Li [this message]
2017-05-24 17:16 [PATCH] md: uuid debug statement now in processor byte order Kyungchan Koh
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=20170524231727.uqugqyrb72zggryn@kernel.org \
--to=shli@kernel.org \
--cc=Kernel-team@fb.com \
--cc=kkc6196@fb.com \
--cc=linux-raid@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