public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Dushistov <dushistov@mail.ru>
To: Steven Whitehouse <swhiteho@redhat.com>
Cc: linux-kernel@vger.kernel.org, Alexander Viro <aviro@redhat.com>
Subject: Re: [RFC] parser: add const to parser token table
Date: Sun, 20 Jul 2008 11:37:35 +0400	[thread overview]
Message-ID: <20080720073735.GA12331@rain> (raw)
In-Reply-To: <1216300972.4011.291.camel@quoit>

On Thu, Jul 17, 2008 at 02:22:52PM +0100, Steven Whitehouse wrote:
> Hi,
> 
> Any objections to the following patch? If not I'll send it on to Linus.
> 
> 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>
> Cc: Alexander Viro <aviro@redhat.com>
> Cc: 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};
> 
Acked-by: Evgeniy Dushistov <dushistov@mail.ru>

-- 
/Evgeniy


  reply	other threads:[~2008-07-20 12:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 13:22 [RFC] parser: add const to parser token table Steven Whitehouse
2008-07-20  7:37 ` Evgeniy Dushistov [this message]
2008-07-20 12:42 ` Alexander Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080720073735.GA12331@rain \
    --to=dushistov@mail.ru \
    --cc=aviro@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox