dyndbg: constify opt_array
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 9 Jul 2023 21:17:58 +0000 (23:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 13:28:40 +0000 (15:28 +0200)
It is never modified, so mark it const.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20230709-dyndbg-filename-v2-1-fd83beef0925@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/dynamic_debug.c

index fdd6d98..71b22d2 100644 (file)
@@ -88,7 +88,7 @@ static inline const char *trim_prefix(const char *path)
        return path + skip;
 }
 
-static struct { unsigned flag:8; char opt_char; } opt_array[] = {
+static const struct { unsigned flag:8; char opt_char; } opt_array[] = {
        { _DPRINTK_FLAGS_PRINT, 'p' },
        { _DPRINTK_FLAGS_INCL_MODNAME, 'm' },
        { _DPRINTK_FLAGS_INCL_FUNCNAME, 'f' },