From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shaohua Li Subject: Re: [PATCH] md: uuid debug statement now in processor byte order. Date: Wed, 24 May 2017 16:17:27 -0700 Message-ID: <20170524231727.uqugqyrb72zggryn@kernel.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-raid-owner@vger.kernel.org To: Kyungchan Koh Cc: linux-raid@vger.kernel.org, Kernel-team@fb.com List-Id: linux-raid.ids 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 > --- > 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 >