Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757659AbYGTMhK (ORCPT ); Sun, 20 Jul 2008 08:37:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756840AbYGTMg7 (ORCPT ); Sun, 20 Jul 2008 08:36:59 -0400 Received: from fallback.mail.ru ([194.67.57.14]:24367 "EHLO mx4.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756808AbYGTMg6 (ORCPT ); Sun, 20 Jul 2008 08:36:58 -0400 Date: Sun, 20 Jul 2008 11:37:35 +0400 From: Evgeniy Dushistov To: Steven Whitehouse Cc: linux-kernel@vger.kernel.org, Alexander Viro Subject: Re: [RFC] parser: add const to parser token table Message-ID: <20080720073735.GA12331@rain> Mail-Followup-To: Steven Whitehouse , linux-kernel@vger.kernel.org, Alexander Viro References: <1216300972.4011.291.camel@quoit> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1216300972.4011.291.camel@quoit> User-Agent: Mutt/1.5.16 (2007-06-09) X-Spam: Not detected X-Mras: OK Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1756 Lines: 51 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 > Cc: Alexander Viro > Cc: Evgeniy Dushistov > > > 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 -- /Evgeniy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/