Skip to content

Commit

Permalink
genetlink: make info in GENL_REQ_ATTR_CHECK() const
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Kicinski committed Feb 24, 2024
1 parent 6511743 commit 5fd5403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)); \
})
Expand Down

0 comments on commit 5fd5403

Please sign in to comment.