* [PATCH] ALSA: emux: constify nrpn_conv_table structures
@ 2016-01-04 16:50 ` Julia Lawall
0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2016-01-04 16:50 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: kernel-janitors, Takashi Iwai, alsa-devel, linux-kernel
The nrpn_conv_table structures are never modified, so declare them as
const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
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},
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ALSA: emux: constify nrpn_conv_table structures
@ 2016-01-04 16:50 ` Julia Lawall
0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2016-01-04 16:50 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: kernel-janitors, Takashi Iwai, alsa-devel, linux-kernel
The nrpn_conv_table structures are never modified, so declare them as
const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
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},
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: emux: constify nrpn_conv_table structures
2016-01-04 16:50 ` Julia Lawall
(?)
@ 2016-01-06 9:20 ` Takashi Iwai
-1 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2016-01-06 9:20 UTC (permalink / raw)
To: Julia Lawall; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel
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 <Julia.Lawall@lip6.fr>
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},
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: emux: constify nrpn_conv_table structures
@ 2016-01-06 9:20 ` Takashi Iwai
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2016-01-06 9:20 UTC (permalink / raw)
To: Julia Lawall; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel
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 <Julia.Lawall@lip6.fr>
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},
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: emux: constify nrpn_conv_table structures
@ 2016-01-06 9:20 ` Takashi Iwai
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2016-01-06 9:20 UTC (permalink / raw)
To: Julia Lawall; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel
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 <Julia.Lawall@lip6.fr>
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},
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-06 9:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-04 16:50 [PATCH] ALSA: emux: constify nrpn_conv_table structures Julia Lawall
2016-01-04 16:50 ` Julia Lawall
2016-01-06 9:20 ` Takashi Iwai
2016-01-06 9:20 ` Takashi Iwai
2016-01-06 9:20 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.