public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* parser: add const to parser token table (resend)
@ 2008-07-24 16:22 Steven Whitehouse
  2008-07-24 18:48 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Whitehouse @ 2008-07-24 16:22 UTC (permalink / raw)
  To: torvalds; +Cc: Alexander Viro, Evgeniy Dushistov, linux-kernel

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 <swhiteho@redhat.com>
Acked-by: Alexander Viro <aviro@redhat.com>
Acked-by: Evgeniy Dushistov <dushistov@mail.ru>

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;
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};



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: parser: add const to parser token table (resend)
  2008-07-24 16:22 parser: add const to parser token table (resend) Steven Whitehouse
@ 2008-07-24 18:48 ` Linus Torvalds
  2008-07-24 18:53   ` Linus Torvalds
  2008-07-24 18:58   ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Linus Torvalds @ 2008-07-24 18:48 UTC (permalink / raw)
  To: Steven Whitehouse; +Cc: Alexander Viro, Evgeniy Dushistov, linux-kernel


Btw, the reason I didn't even look at this at first is that there is no 
such thing as a "parser" in the kernel, so I just dismissed the patch as 
being to somebody else (ie a sparse thing).

Now, if the subject had been something like

	UFS: add const to parser token table

I would have realized that it was relevant to my interests

What I'm trying to say is that subject lines matter ;)

		Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: parser: add const to parser token table (resend)
  2008-07-24 18:48 ` Linus Torvalds
@ 2008-07-24 18:53   ` Linus Torvalds
  2008-07-24 18:58   ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2008-07-24 18:53 UTC (permalink / raw)
  To: Steven Whitehouse; +Cc: Alexander Viro, Evgeniy Dushistov, linux-kernel



On Thu, 24 Jul 2008, Linus Torvalds wrote:
> 
> Btw, the reason I didn't even look at this at first is that there is no 
> such thing as a "parser" in the kernel, so I just dismissed the patch as 
> being to somebody else (ie a sparse thing).

Just to clarify: there obviously _is_ a "parser", but it's at such a low 
level that tagging by it doesn't much help my mental picture, when there 
are other projects I'm involved with where the "parser" is a much more 
integral and major deal.

			Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: parser: add const to parser token table (resend)
  2008-07-24 18:48 ` Linus Torvalds
  2008-07-24 18:53   ` Linus Torvalds
@ 2008-07-24 18:58   ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2008-07-24 18:58 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Steven Whitehouse, Alexander Viro, Evgeniy Dushistov,
	linux-kernel

On Thu, Jul 24, 2008 at 11:48:55AM -0700, Linus Torvalds wrote:
> 
> Btw, the reason I didn't even look at this at first is that there is no 
> such thing as a "parser" in the kernel,

Well, there's lib/parser.c and include/linux/parser.h..


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-24 18:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24 16:22 parser: add const to parser token table (resend) Steven Whitehouse
2008-07-24 18:48 ` Linus Torvalds
2008-07-24 18:53   ` Linus Torvalds
2008-07-24 18:58   ` Christoph Hellwig

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