OSDN Git Service

ieee802154: cleanup ieee802154_le64_to_be64
authorAlexander Aring <alex.aring@gmail.com>
Wed, 11 Feb 2015 13:39:17 +0000 (14:39 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 14 Feb 2015 04:19:58 +0000 (05:19 +0100)
This patch cleanups the ieee802154_le64_to_be64 function. This patch
removes an unnecessary temporary variable.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/mac802154.h

index c5c6445..fb4e8a3 100644 (file)
@@ -244,9 +244,7 @@ static inline void ieee802154_be64_to_le64(void *le64_dst, const void *be64_src)
  */
 static inline void ieee802154_le64_to_be64(void *be64_dst, const void *le64_src)
 {
-       __be64 tmp = (__force __be64)swab64p(le64_src);
-
-       memcpy(be64_dst, &tmp, IEEE802154_EXTENDED_ADDR_LEN);
+       __put_unaligned_memmove64(swab64p(le64_src), be64_dst);
 }
 
 /* Basic interface to register ieee802154 hwice */