From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Graf Subject: Re: [PATCH -mm] lib/ts_fsm.c: constify structs Date: Fri, 1 Sep 2006 13:31:37 +0200 Message-ID: <20060901113137.GI3470@postel.suug.ch> References: <20060831182734.GA26228@rhlx01.fht-esslingen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , netfilter-devel@lists.netfilter.org Return-path: To: Andreas Mohr Content-Disposition: inline In-Reply-To: <20060831182734.GA26228@rhlx01.fht-esslingen.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org * Andreas Mohr 2006-08-31 20:27 > @@ -44,7 +44,7 @@ > #define _W 0x200 /* wildcard */ > > /* Map to _ctype flags and some magic numbers */ > -static u16 token_map[TS_FSM_TYPE_MAX+1] = { > +static const u16 token_map[TS_FSM_TYPE_MAX+1] = { > [TS_FSM_SPECIFIC] = 0, > [TS_FSM_WILDCARD] = _W, > [TS_FSM_CNTRL] = _C, > @@ -61,7 +61,7 @@ > [TS_FSM_ASCII] = _A, > }; > > -static u16 token_lookup_tbl[256] = { > +static const u16 token_lookup_tbl[256] = { > _W|_A|_C, _W|_A|_C, _W|_A|_C, _W|_A|_C, /* 0- 3 */ > _W|_A|_C, _W|_A|_C, _W|_A|_C, _W|_A|_C, /* 4- 7 */ > _W|_A|_C, _W|_A|_C|_S, _W|_A|_C|_S, _W|_A|_C|_S, /* 8- 11 */ You could mark them __read_mostly at this opportunity.