projects/linux·commit f9247273

UFS: add const to parser token table

f9247273 · Steven Whitehouse <[email protected]> · 2008-07-24 17:22:13 +01:00

This patch adds a "const" to the parser token table. I've done an
allmodconfig build to see if this produces any warnings/failures and the
patch includes a fix for the only warning that was produced.

Signed-off-by: Steven Whitehouse <[email protected]>
Acked-by: Alexander Viro <[email protected]>
Acked-by: Evgeniy Dushistov <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
f9247273cb69ba101877e946d2d83044409cc8c5
Parents
b340e8a5

Changes

2 files changed · +2 −2

FileStatusAddDelContent
fs/ufs/super.cmodified+1−1View file
include/linux/parser.hmodified+1−1View file

fs/ufs/super.c

View file
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 85b22b5..506f724 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -1232,7 +1232,7 @@ static int ufs_show_options(struct seq_file *seq, struct vfsmount *vfs)
{
struct ufs_sb_info *sbi = UFS_SB(vfs->mnt_sb);
unsigned mval = sbi->s_mount_opt & UFS_MOUNT_UFSTYPE;
- struct match_token *tp = tokens;
+ const struct match_token *tp = tokens;
while (tp->token != Opt_onerror_panic && tp->token != mval)
++tp;

include/linux/parser.h

View file
diff --git a/include/linux/parser.h b/include/linux/parser.h
index 7dcd050..cc554ca 100644
--- a/include/linux/parser.h
+++ b/include/linux/parser.h
@@ -14,7 +14,7 @@ struct match_token {
const char *pattern;
};
-typedef struct match_token match_table_t[];
+typedef const struct match_token match_table_t[];
/* Maximum number of arguments that match_token will find in a pattern */
enum {MAX_OPT_ARGS = 3};