block: constify partition prober array
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 30 May 2023 17:09:57 +0000 (19:09 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 30 May 2023 17:12:43 +0000 (11:12 -0600)
The array is never modified so it can be const.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202304191640.SkNk7kVN-lkp@intel.com/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20230419-const-partition-v3-1-4e14e48be367@weissschuh.net
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/core.c

index 49e0496ff23c1ebce6bcc822fd75257e0b06b485..650603dbe557d57717914106d1c37be0b3993732 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/raid/detect.h>
 #include "check.h"
 
-static int (*check_part[])(struct parsed_partitions *) = {
+static int (*const check_part[])(struct parsed_partitions *) = {
        /*
         * Probe partition formats with tables at disk address 0
         * that also have an ADFS boot block at 0xdc0.