diff mbox series

[net-next,v2,1/2] net: document return value of dev_getbyhwaddr_rcu()

Message ID 20250210-arm_fix_selftest-v2-1-ba84b5bc58c8@debian.org (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: core: improvements to device lookup by hardware address. | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next, async
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 2 this patch: 2
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 5 this patch: 5
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 79 this patch: 78
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-02-11--00-00 (tests: 889)

Commit Message

Breno Leitao Feb. 10, 2025, 11:56 a.m. UTC
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@debian.org>
---
 net/core/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kuniyuki Iwashima Feb. 11, 2025, 12:53 a.m. UTC | #1
From: Breno Leitao <leitao@debian.org>
Date: Mon, 10 Feb 2025 03:56:13 -0800
> 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

nit: We usually use

  Link: https://.... [1]

, a bare space (not %20) indicates the end of URL.


> Signed-off-by: Breno Leitao <leitao@debian.org>

Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
diff mbox series

Patch

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)
 {