genetlink: make _genl_cmd_to_str static
authorChristoph Böhmwalder <christoph.boehmwalder@linbit.com>
Thu, 30 Mar 2023 10:27:38 +0000 (12:27 +0200)
committerJens Axboe <axboe@kernel.dk>
Sun, 2 Apr 2023 02:27:55 +0000 (20:27 -0600)
Primarily to silence warnings like:
warning: no previous prototype for 'xxx_genl_cmd_to_str' [-Wmissing-prototypes]

Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link: https://lore.kernel.org/r/20230330102744.2128122-2-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/genl_magic_func.h

index 4a4b387181ade4e7296e8a1da540a6b8d61818e4..2984b0cb24b16183498f735c2d6993fc2fb98121 100644 (file)
@@ -209,7 +209,7 @@ static int s_name ## _from_attrs_for_change(struct s_name *s,               \
  * Magic: define op number to op name mapping                          {{{1
  *                                                                     {{{2
  */
-const char *CONCAT_(GENL_MAGIC_FAMILY, _genl_cmd_to_str)(__u8 cmd)
+static const char *CONCAT_(GENL_MAGIC_FAMILY, _genl_cmd_to_str)(__u8 cmd)
 {
        switch (cmd) {
 #undef GENL_op