[PATCH net-next v2 1/2] net: document return value of dev_getbyhwaddr_rcu()
From: Breno Leitao
Date: Mon Feb 10 2025 - 06:57:24 EST
Add missing return value documentation in the kernel-doc comment for
dev_getbyhwaddr_rcu(), clarifying that it returns either a pointer to
net_device or NULL if no matching device is found.
This fix a warning found in NIPA[1]:
net/core/dev.c:1141: warning: No description found for return value of 'dev_getbyhwaddr_rcu'
[1] Link: https://netdev.bots.linux.dev/static/nipa/931564/13964899/kdoc/summary
Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index c41d1e1cbf62e0c5778c472cdb947b6f140f6064..c7e726f81406ece98801441dce3d683c8e0c9d99 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1133,8 +1133,8 @@ int netdev_get_name(struct net *net, char *name, int ifindex)
* The returned device has not had its ref count increased
* and the caller must therefore be careful about locking
*
+ * Return: pointer to the net_device, or NULL if not found
*/
-
struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type,
const char *ha)
{
--
2.43.5