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

mac802154: fix byteorder issues

Running make C=2 occurs these warnings:

cast from restricted __be64
incorrect type in argument 1 (different base types)
expected unsigned long long[unsigned] [usertype] val
got restricted __be64 [usertype]<noident>
cast from restricted __be64
cast to restricted __le64

This patch fix these warnings by forcing to __le64 type and using swabp64
instead swab64.
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Reported-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent c28bee84
...@@ -215,12 +215,12 @@ struct ieee802154_ops { ...@@ -215,12 +215,12 @@ struct ieee802154_ops {
}; };
/** /**
* ieee802154_netdev_to_extended_addr - convert __be64 u8 pointer to __le64 * ieee802154_netdev_to_extended_addr - convert big endian 64 byte void pointer to __le64
* @dev_addr: big endian address pointer like netdevice dev_addr attribute * @dev_addr: big endian address pointer like netdevice dev_addr attribute
*/ */
static inline __le64 ieee802154_netdev_to_extended_addr(const u8 *dev_addr) static inline __le64 ieee802154_netdev_to_extended_addr(const void *dev_addr)
{ {
return (__le64)swab64(*((__be64 *)dev_addr)); return (__force __le64)swab64p(dev_addr);
} }
/* Basic interface to register ieee802154 hwice */ /* Basic interface to register ieee802154 hwice */
......
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