From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752590AbcAFJUQ (ORCPT ); Wed, 6 Jan 2016 04:20:16 -0500 Received: from mx2.suse.de ([195.135.220.15]:57351 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752189AbcAFJUN (ORCPT ); Wed, 6 Jan 2016 04:20:13 -0500 Date: Wed, 06 Jan 2016 10:20:13 +0100 Message-ID: From: Takashi Iwai To: "Julia Lawall" Cc: "Jaroslav Kysela" , , , Subject: Re: [PATCH] ALSA: emux: constify nrpn_conv_table structures In-Reply-To: <1451926247-29119-1-git-send-email-Julia.Lawall@lip6.fr> References: <1451926247-29119-1-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 04 Jan 2016 17:50:47 +0100, Julia Lawall wrote: > > The nrpn_conv_table structures are never modified, so declare them as > const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall Thanks, applied. Takashi > > --- > sound/synth/emux/emux_nrpn.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/sound/synth/emux/emux_nrpn.c b/sound/synth/emux/emux_nrpn.c > index 00fc005..9729a15 100644 > --- a/sound/synth/emux/emux_nrpn.c > +++ b/sound/synth/emux/emux_nrpn.c > @@ -48,7 +48,8 @@ struct nrpn_conv_table { > * convert NRPN/control values > */ > > -static int send_converted_effect(struct nrpn_conv_table *table, int num_tables, > +static int send_converted_effect(const struct nrpn_conv_table *table, > + int num_tables, > struct snd_emux_port *port, > struct snd_midi_channel *chan, > int type, int val, int mode) > @@ -179,7 +180,7 @@ static int fx_conv_Q(int val) > } > > > -static struct nrpn_conv_table awe_effects[] = > +static const struct nrpn_conv_table awe_effects[] = > { > { 0, EMUX_FX_LFO1_DELAY, fx_lfo1_delay}, > { 1, EMUX_FX_LFO1_FREQ, fx_lfo1_freq}, > @@ -266,7 +267,7 @@ static int gs_vib_delay(int val) > return -(val - 64) * gs_sense[FX_VIBDELAY] / 50; > } > > -static struct nrpn_conv_table gs_effects[] = > +static const struct nrpn_conv_table gs_effects[] = > { > {32, EMUX_FX_CUTOFF, gs_cutoff}, > {33, EMUX_FX_FILTERQ, gs_filterQ}, > @@ -350,7 +351,7 @@ static int xg_release(int val) > return -(val - 64) * xg_sense[FX_RELEASE] / 64; > } > > -static struct nrpn_conv_table xg_effects[] = > +static const struct nrpn_conv_table xg_effects[] = > { > {71, EMUX_FX_CUTOFF, xg_cutoff}, > {74, EMUX_FX_FILTERQ, xg_filterQ}, > >