summaryrefslogtreecommitdiff
path: root/include/linux/etherdevice.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-06 18:06:58 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-07 13:39:51 +0100
commit8017c4d8173cfe086420dc5710d631cabd03ef67 (patch)
treec2bf02641bbbf8eef2b8bf3c2c494ecb9ffe57cf /include/linux/etherdevice.h
parent433baf0719d6a81d0587ea27545a120a3880abf6 (diff)
eth: fwnode: change the return type of mac address helpers
fwnode_get_mac_address() and device_get_mac_address() return a pointer to the buffer that was passed to them on success or NULL on failure. None of the callers care about the actual value, only if it's NULL or not. These semantics differ from of_get_mac_address() which returns an int so to avoid confusion make the device helpers return an errno. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/etherdevice.h')
-rw-r--r--include/linux/etherdevice.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 39f0758274ae..8299f1cd9175 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -31,9 +31,8 @@ struct fwnode_handle;
int eth_platform_get_mac_address(struct device *dev, u8 *mac_addr);
unsigned char *arch_get_platform_mac_address(void);
int nvmem_get_mac_address(struct device *dev, void *addrbuf);
-void *device_get_mac_address(struct device *dev, char *addr, int alen);
-void *fwnode_get_mac_address(struct fwnode_handle *fwnode,
- char *addr, int alen);
+int device_get_mac_address(struct device *dev, char *addr, int alen);
+int fwnode_get_mac_address(struct fwnode_handle *fwnode, char *addr, int alen);
u32 eth_get_headlen(const struct net_device *dev, const void *data, u32 len);
__be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev);