Commit ba5bf17e authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann

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: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 306f7aa1
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <net/af_ieee802154.h> #include <net/af_ieee802154.h>
#include <linux/ieee802154.h> #include <linux/ieee802154.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/unaligned/memmove.h>
#include <net/cfg802154.h> #include <net/cfg802154.h>
...@@ -233,9 +234,7 @@ struct ieee802154_ops { ...@@ -233,9 +234,7 @@ struct ieee802154_ops {
*/ */
static inline void ieee802154_be64_to_le64(void *le64_dst, const void *be64_src) static inline void ieee802154_be64_to_le64(void *le64_dst, const void *be64_src)
{ {
__le64 tmp = (__force __le64)swab64p(be64_src); __put_unaligned_memmove64(swab64p(be64_src), le64_dst);
memcpy(le64_dst, &tmp, IEEE802154_EXTENDED_ADDR_LEN);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment