Commit 40af35fd authored by Jakub Kicinski's avatar Jakub Kicinski

netdevice: demote the type of some dev_addr_set() helpers

__dev_addr_set() and dev_addr_mod() and pretty low level,
let the arguments be void, there's no chance for confusion
in callers converted to use them. Keep u8 in dev_addr_set()
because some of the callers are converted from a loop
and we want to make sure assignments are not from an array
of a different type.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fe83fe73
...@@ -4643,7 +4643,7 @@ void __hw_addr_init(struct netdev_hw_addr_list *list); ...@@ -4643,7 +4643,7 @@ void __hw_addr_init(struct netdev_hw_addr_list *list);
/* Functions used for device addresses handling */ /* Functions used for device addresses handling */
static inline void static inline void
__dev_addr_set(struct net_device *dev, const u8 *addr, size_t len) __dev_addr_set(struct net_device *dev, const void *addr, size_t len)
{ {
memcpy(dev->dev_addr, addr, len); memcpy(dev->dev_addr, addr, len);
} }
...@@ -4655,7 +4655,7 @@ static inline void dev_addr_set(struct net_device *dev, const u8 *addr) ...@@ -4655,7 +4655,7 @@ static inline void dev_addr_set(struct net_device *dev, const u8 *addr)
static inline void static inline void
dev_addr_mod(struct net_device *dev, unsigned int offset, dev_addr_mod(struct net_device *dev, unsigned int offset,
const u8 *addr, size_t len) const void *addr, size_t len)
{ {
memcpy(&dev->dev_addr[offset], addr, len); memcpy(&dev->dev_addr[offset], 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