projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6511743
)
genetlink: make info in GENL_REQ_ATTR_CHECK() const
author
Jakub Kicinski
<kuba@kernel.org>
Thu, 22 Feb 2024 22:28:19 +0000
(14:28 -0800)
committer
Jakub Kicinski
<kuba@kernel.org>
Sat, 24 Feb 2024 02:17:36 +0000
(18:17 -0800)
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>
include/net/genetlink.h
patch
|
blob
|
blame
|
history
diff --git
a/include/net/genetlink.h
b/include/net/genetlink.h
index ecadba836ae56385bc24c05af1e4455171ecf9ad..9ece6e5a3ea8c325c6839db997112088540e570f 100644
(file)
--- 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)); \
})