Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a447c093 authored by Steven Whitehouse's avatar Steven Whitehouse Committed by Linus Torvalds
Browse files

vfs: Use const for kernel parser table



This is a much better version of a previous patch to make the parser
tables constant. Rather than changing the typedef, we put the "const" in
all the various places where its required, allowing the __initconst
exception for nfsroot which was the cause of the previous trouble.

This was posted for review some time ago and I believe its been in -mm
since then.

Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
Cc: Alexander Viro <aviro@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 54cebc68
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -659,7 +659,7 @@ enum {
	Opt_uid, Opt_gid, Opt_mode, Opt_debug, Opt_err,
};

static match_table_t spufs_tokens = {
static const match_table_t spufs_tokens = {
	{ Opt_uid,   "uid=%d" },
	{ Opt_gid,   "gid=%d" },
	{ Opt_mode,  "mode=%o" },
+1 −1
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ static int hypfs_release(struct inode *inode, struct file *filp)

enum { opt_uid, opt_gid, opt_err };

static match_table_t hypfs_tokens = {
static const match_table_t hypfs_tokens = {
	{opt_uid, "uid=%u"},
	{opt_gid, "gid=%u"},
	{opt_err, NULL}
+1 −1
Original line number Diff line number Diff line
@@ -1683,7 +1683,7 @@ enum {
				   SRP_OPT_SERVICE_ID),
};

static match_table_t srp_opt_tokens = {
static const match_table_t srp_opt_tokens = {
	{ SRP_OPT_ID_EXT,		"id_ext=%s" 		},
	{ SRP_OPT_IOC_GUID,		"ioc_guid=%s" 		},
	{ SRP_OPT_DGID,			"dgid=%s" 		},
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ enum {
	Opt_err,
};

static match_table_t tokens = {
static const match_table_t tokens = {
	{Opt_devuid, "devuid=%u"},
	{Opt_devgid, "devgid=%u"},
	{Opt_devmode, "devmode=%o"},
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ enum {
	Opt_err
};

static match_table_t tokens = {
static const match_table_t tokens = {
	{Opt_debug, "debug=%x"},
	{Opt_dfltuid, "dfltuid=%u"},
	{Opt_dfltgid, "dfltgid=%u"},
Loading