All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"kernel test robot" <lkp@intel.com>
Subject: [PATCH v3 1/4] block: constify partition prober array
Date: Tue, 30 May 2023 19:09:57 +0200	[thread overview]
Message-ID: <20230419-const-partition-v3-1-4e14e48be367@weissschuh.net> (raw)
In-Reply-To: <20230419-const-partition-v3-0-4e14e48be367@weissschuh.net>

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>
---
 block/partitions/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/partitions/core.c b/block/partitions/core.c
index 49e0496ff23c..650603dbe557 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -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.

-- 
2.40.1


  reply	other threads:[~2023-05-30 17:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 17:09 [PATCH v3 0/4] block: constify some structures of partitions/core.c Thomas Weißschuh
2023-05-30 17:09 ` Thomas Weißschuh [this message]
2023-05-30 17:09 ` [PATCH v3 2/4] block: constify struct part_type part_type Thomas Weißschuh
2023-05-30 17:09 ` [PATCH v3 3/4] block: constify struct part_attr_group Thomas Weißschuh
2023-05-30 17:10 ` [PATCH v3 4/4] block: constify the whole_disk device_attribute Thomas Weißschuh
2023-05-30 17:13 ` [PATCH v3 0/4] block: constify some structures of partitions/core.c Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230419-const-partition-v3-1-4e14e48be367@weissschuh.net \
    --to=linux@weissschuh.net \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.