Skip to contentSkip to conversation

dm ioctl: constify ioctl lookup table

PATCH New Eric Biggers 1 participant 1 message Jun 22, 2017 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm ioctl: constify ioctl lookup table

From: Eric Biggers <[email protected]>

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

---
 drivers/md/dm-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-ioctl.c +1 -1
index 41852ae287a5..8e9a1eff25d3 100644
@@ -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;
Signature · 1 line
2.13.1.611.g7e3b11ae1-goog