[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4A3D5301.9010706@s5r6.in-berlin.de>
Date: Sat, 20 Jun 2009 23:22:09 +0200
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Sage Weil <sage@...dream.net>
CC: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
greg@...ah.com
Subject: Re: [PATCH 17/21] ceph: nfs re-export support
Sage Weil wrote:
> I've done the same thing in a bunch of other places, too, the
> big offender being decode.h, where e.g.
>
> v = le64_to_cpu(*(__le64 *)*(p)); \
> *(p) += sizeof(u64); \
>
> should be
>
> v = le64_to_cpu(get_unaligned((__le64 *)*(p))); \
> *(p) += sizeof(u64); \
Endian conversion and unaligned access can be combined, e.g.
v = get_unaligned_le64(*p);
if p is a pointer to a pointer to an unaligned __le64. These too come
via <asm/unaligned.h> and are available since 2.6.26.
--
Stefan Richter
-=====-==--= -==- =-=--
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists