summaryrefslogtreecommitdiff
path: root/include/net/genetlink.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-02-23 01:28:19 +0300
committerJakub Kicinski <kuba@kernel.org>2024-02-24 05:17:36 +0300
commit5fd5403964ecf047b03a9608a339bdc26a109f33 (patch)
tree352b0864d79e2d6452d79fb4f324453bcea36f45 /include/net/genetlink.h
parent6511743e01faa2220c758882d250a2217bde8d0b (diff)
downloadlinux-5fd5403964ecf047b03a9608a339bdc26a109f33.tar.xz
genetlink: make info in GENL_REQ_ATTR_CHECK() const
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. Link: https://lore.kernel.org/r/20240222222819.156320-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/genetlink.h')
-rw-r--r--include/net/genetlink.h2
1 files changed, 1 insertions, 1 deletions
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)); \
})