diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-02-11 08:39:16 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-02-13 23:19:58 -0500 |
commit | ba5bf17e8343c0b5b87a1240aa75c35c76b88e5e (patch) | |
tree | 2d1404ec28b5f1be4a02477607602f483c48d92b /include/net | |
parent | 306f7aa1807be7588f115d7cafa475f65e72e3d1 (diff) |
ieee802154: cleanup ieee802154_be64_to_le64
This patch cleanups the ieee802154_be64_to_le64 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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/mac802154.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/net/mac802154.h b/include/net/mac802154.h index 850647811749..c5c64455bcfa 100644 --- a/include/net/mac802154.h +++ b/include/net/mac802154.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <net/af_ieee802154.h> | 19 | #include <net/af_ieee802154.h> |
20 | #include <linux/ieee802154.h> | 20 | #include <linux/ieee802154.h> |
21 | #include <linux/skbuff.h> | 21 | #include <linux/skbuff.h> |
22 | #include <linux/unaligned/memmove.h> | ||
22 | 23 | ||
23 | #include <net/cfg802154.h> | 24 | #include <net/cfg802154.h> |
24 | 25 | ||
@@ -233,9 +234,7 @@ struct ieee802154_ops { | |||
233 | */ | 234 | */ |
234 | static inline void ieee802154_be64_to_le64(void *le64_dst, const void *be64_src) | 235 | static inline void ieee802154_be64_to_le64(void *le64_dst, const void *be64_src) |
235 | { | 236 | { |
236 | __le64 tmp = (__force __le64)swab64p(be64_src); | 237 | __put_unaligned_memmove64(swab64p(be64_src), le64_dst); |
237 | |||
238 | memcpy(le64_dst, &tmp, IEEE802154_EXTENDED_ADDR_LEN); | ||
239 | } | 238 | } |
240 | 239 | ||
241 | /** | 240 | /** |