diff mbox series

[net-next] genetlink: make info in GENL_REQ_ATTR_CHECK() const

Message ID 20240222222819.156320-1-kuba@kernel.org (mailing list archive)
State Accepted
Commit 5fd5403964ecf047b03a9608a339bdc26a109f33
Delegated to: Netdev Maintainers
Headers show
Series [net-next] genetlink: make info in GENL_REQ_ATTR_CHECK() const | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
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: 992 this patch: 992
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 958 this patch: 958
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: 1009 this patch: 1009
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 1 this patch: 1
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-23--18-00 (tests: 1457)

Commit Message

Jakub Kicinski Feb. 22, 2024, 10:28 p.m. UTC
Make the local variable in GENL_REQ_ATTR_CHECK() const.
genl_info_dump() returns a const pointer, so the macro
is currently hard to use in genl dumps.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
---
 include/net/genetlink.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 24, 2024, 3:10 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 22 Feb 2024 14:28:19 -0800 you wrote:
> Make the local variable in GENL_REQ_ATTR_CHECK() const.
> genl_info_dump() returns a const pointer, so the macro
> is currently hard to use in genl dumps.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> 
> [...]

Here is the summary with links:
  - [net-next] genetlink: make info in GENL_REQ_ATTR_CHECK() const
    https://git.kernel.org/netdev/net-next/c/5fd5403964ec

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index ecadba836ae5..9ece6e5a3ea8 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -153,7 +153,7 @@  static inline void *genl_info_userhdr(const struct genl_info *info)
 
 /* Report that a root attribute is missing */
 #define GENL_REQ_ATTR_CHECK(info, attr) ({				\
-	struct genl_info *__info = (info);				\
+	const struct genl_info *__info = (info);			\
 									\
 	NL_REQ_ATTR_CHECK(__info->extack, NULL, __info->attrs, (attr)); \
 })