Linux Device Mapper development
 help / color / mirror / Atom feed
* [PATCH] dm ioctl: constify ioctl lookup table
@ 2017-06-22 18:33 Eric Biggers
  0 siblings, 0 replies; only message in thread
From: Eric Biggers @ 2017-06-22 18:33 UTC (permalink / raw)
  To: dm-devel; +Cc: Mike Snitzer, Alasdair Kergon, Eric Biggers

From: Eric Biggers <ebiggers@google.com>

Constify the lookup table for device-mapper ioctls so that it is placed
in .rodata.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 drivers/md/dm-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 41852ae287a5..8e9a1eff25d3 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1604,7 +1604,7 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
  *---------------------------------------------------------------*/
 static ioctl_fn lookup_ioctl(unsigned int cmd, int *ioctl_flags)
 {
-	static struct {
+	static const struct {
 		int cmd;
 		int flags;
 		ioctl_fn fn;
-- 
2.13.1.611.g7e3b11ae1-goog

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-22 18:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-22 18:33 [PATCH] dm ioctl: constify ioctl lookup table Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox