All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sound: replace uses of __constant_{endian}
@ 2009-02-11 22:49 Harvey Harrison
  2009-02-11 23:26 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Harvey Harrison @ 2009-02-11 22:49 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: LKML, Andrew Morton

The base versions handle constant folding now.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 sound/pci/echoaudio/echo3g_dsp.c    |    2 +-
 sound/pci/echoaudio/echoaudio_3g.c  |    3 +--
 sound/pci/echoaudio/echoaudio_dsp.c |    6 +++---
 sound/pci/echoaudio/gina20_dsp.c    |    4 ++--
 sound/pci/echoaudio/layla20_dsp.c   |    4 ++--
 sound/pci/echoaudio/mia_dsp.c       |    4 ++--
 sound/pci/echoaudio/midi.c          |    4 ++--
 7 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/sound/pci/echoaudio/echo3g_dsp.c b/sound/pci/echoaudio/echo3g_dsp.c
index 417e25a..57967e5 100644
--- a/sound/pci/echoaudio/echo3g_dsp.c
+++ b/sound/pci/echoaudio/echo3g_dsp.c
@@ -56,7 +56,7 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
 	}
 
 	chip->comm_page->e3g_frq_register =
-		__constant_cpu_to_le32((E3G_MAGIC_NUMBER / 48000) - 2);
+		cpu_to_le32((E3G_MAGIC_NUMBER / 48000) - 2);
 	chip->device_id = device_id;
 	chip->subdevice_id = subdevice_id;
 	chip->bad_board = TRUE;
diff --git a/sound/pci/echoaudio/echoaudio_3g.c b/sound/pci/echoaudio/echoaudio_3g.c
index c3736bb..e32a748 100644
--- a/sound/pci/echoaudio/echoaudio_3g.c
+++ b/sound/pci/echoaudio/echoaudio_3g.c
@@ -40,8 +40,7 @@ static int check_asic_status(struct echoaudio *chip)
 	if (wait_handshake(chip))
 		return -EIO;
 
-	chip->comm_page->ext_box_status =
-		__constant_cpu_to_le32(E3G_ASIC_NOT_LOADED);
+	chip->comm_page->ext_box_status = cpu_to_le32(E3G_ASIC_NOT_LOADED);
 	chip->asic_loaded = FALSE;
 	clear_handshake(chip);
 	send_vector(chip, DSP_VC_TEST_ASIC);
diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c
index be0e181..4df51ef 100644
--- a/sound/pci/echoaudio/echoaudio_dsp.c
+++ b/sound/pci/echoaudio/echoaudio_dsp.c
@@ -926,11 +926,11 @@ static int init_dsp_comm_page(struct echoaudio *chip)
 
 	/* Init the comm page */
 	chip->comm_page->comm_size =
-		__constant_cpu_to_le32(sizeof(struct comm_page));
+		cpu_to_le32(sizeof(struct comm_page));
 	chip->comm_page->handshake = 0xffffffff;
 	chip->comm_page->midi_out_free_count =
-		__constant_cpu_to_le32(DSP_MIDI_OUT_FIFO_SIZE);
-	chip->comm_page->sample_rate = __constant_cpu_to_le32(44100);
+		cpu_to_le32(DSP_MIDI_OUT_FIFO_SIZE);
+	chip->comm_page->sample_rate = cpu_to_le32(44100);
 	chip->sample_rate = 44100;
 
 	/* Set line levels so we don't blast any inputs on startup */
diff --git a/sound/pci/echoaudio/gina20_dsp.c b/sound/pci/echoaudio/gina20_dsp.c
index db6c952..3f1e747 100644
--- a/sound/pci/echoaudio/gina20_dsp.c
+++ b/sound/pci/echoaudio/gina20_dsp.c
@@ -208,10 +208,10 @@ static int set_professional_spdif(struct echoaudio *chip, char prof)
 	DE_ACT(("set_professional_spdif %d\n", prof));
 	if (prof)
 		chip->comm_page->flags |=
-			__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
+			cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
 	else
 		chip->comm_page->flags &=
-			~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
+			~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
 	chip->professional_spdif = prof;
 	return update_flags(chip);
 }
diff --git a/sound/pci/echoaudio/layla20_dsp.c b/sound/pci/echoaudio/layla20_dsp.c
index ede75c6..83750e9 100644
--- a/sound/pci/echoaudio/layla20_dsp.c
+++ b/sound/pci/echoaudio/layla20_dsp.c
@@ -284,10 +284,10 @@ static int set_professional_spdif(struct echoaudio *chip, char prof)
 	DE_ACT(("set_professional_spdif %d\n", prof));
 	if (prof)
 		chip->comm_page->flags |=
-			__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
+			cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
 	else
 		chip->comm_page->flags &=
-			~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
+			~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
 	chip->professional_spdif = prof;
 	return update_flags(chip);
 }
diff --git a/sound/pci/echoaudio/mia_dsp.c b/sound/pci/echoaudio/mia_dsp.c
index 2273866..3eca16c 100644
--- a/sound/pci/echoaudio/mia_dsp.c
+++ b/sound/pci/echoaudio/mia_dsp.c
@@ -222,10 +222,10 @@ static int set_professional_spdif(struct echoaudio *chip, char prof)
 	DE_ACT(("set_professional_spdif %d\n", prof));
 	if (prof)
 		chip->comm_page->flags |=
-			__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
+			cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
 	else
 		chip->comm_page->flags &=
-			~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
+			~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
 	chip->professional_spdif = prof;
 	return update_flags(chip);
 }
diff --git a/sound/pci/echoaudio/midi.c b/sound/pci/echoaudio/midi.c
index 77bf2a8..a953d14 100644
--- a/sound/pci/echoaudio/midi.c
+++ b/sound/pci/echoaudio/midi.c
@@ -44,10 +44,10 @@ static int enable_midi_input(struct echoaudio *chip, char enable)
 	if (enable) {
 		chip->mtc_state = MIDI_IN_STATE_NORMAL;
 		chip->comm_page->flags |=
-			__constant_cpu_to_le32(DSP_FLAG_MIDI_INPUT);
+			cpu_to_le32(DSP_FLAG_MIDI_INPUT);
 	} else
 		chip->comm_page->flags &=
-			~__constant_cpu_to_le32(DSP_FLAG_MIDI_INPUT);
+			~cpu_to_le32(DSP_FLAG_MIDI_INPUT);
 
 	clear_handshake(chip);
 	return send_vector(chip, DSP_VC_UPDATE_FLAGS);
-- 
1.6.2.rc0.218.gde7c




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sound: replace uses of __constant_{endian}
  2009-02-11 22:49 [PATCH] sound: replace uses of __constant_{endian} Harvey Harrison
@ 2009-02-11 23:26 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2009-02-11 23:26 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: LKML, Andrew Morton

At Wed, 11 Feb 2009 14:49:30 -0800,
Harvey Harrison wrote:
> 
> The base versions handle constant folding now.
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>

Applied now.  Thanks!


Takashi

> ---
>  sound/pci/echoaudio/echo3g_dsp.c    |    2 +-
>  sound/pci/echoaudio/echoaudio_3g.c  |    3 +--
>  sound/pci/echoaudio/echoaudio_dsp.c |    6 +++---
>  sound/pci/echoaudio/gina20_dsp.c    |    4 ++--
>  sound/pci/echoaudio/layla20_dsp.c   |    4 ++--
>  sound/pci/echoaudio/mia_dsp.c       |    4 ++--
>  sound/pci/echoaudio/midi.c          |    4 ++--
>  7 files changed, 13 insertions(+), 14 deletions(-)
> 
> diff --git a/sound/pci/echoaudio/echo3g_dsp.c b/sound/pci/echoaudio/echo3g_dsp.c
> index 417e25a..57967e5 100644
> --- a/sound/pci/echoaudio/echo3g_dsp.c
> +++ b/sound/pci/echoaudio/echo3g_dsp.c
> @@ -56,7 +56,7 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
>  	}
>  
>  	chip->comm_page->e3g_frq_register =
> -		__constant_cpu_to_le32((E3G_MAGIC_NUMBER / 48000) - 2);
> +		cpu_to_le32((E3G_MAGIC_NUMBER / 48000) - 2);
>  	chip->device_id = device_id;
>  	chip->subdevice_id = subdevice_id;
>  	chip->bad_board = TRUE;
> diff --git a/sound/pci/echoaudio/echoaudio_3g.c b/sound/pci/echoaudio/echoaudio_3g.c
> index c3736bb..e32a748 100644
> --- a/sound/pci/echoaudio/echoaudio_3g.c
> +++ b/sound/pci/echoaudio/echoaudio_3g.c
> @@ -40,8 +40,7 @@ static int check_asic_status(struct echoaudio *chip)
>  	if (wait_handshake(chip))
>  		return -EIO;
>  
> -	chip->comm_page->ext_box_status =
> -		__constant_cpu_to_le32(E3G_ASIC_NOT_LOADED);
> +	chip->comm_page->ext_box_status = cpu_to_le32(E3G_ASIC_NOT_LOADED);
>  	chip->asic_loaded = FALSE;
>  	clear_handshake(chip);
>  	send_vector(chip, DSP_VC_TEST_ASIC);
> diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c
> index be0e181..4df51ef 100644
> --- a/sound/pci/echoaudio/echoaudio_dsp.c
> +++ b/sound/pci/echoaudio/echoaudio_dsp.c
> @@ -926,11 +926,11 @@ static int init_dsp_comm_page(struct echoaudio *chip)
>  
>  	/* Init the comm page */
>  	chip->comm_page->comm_size =
> -		__constant_cpu_to_le32(sizeof(struct comm_page));
> +		cpu_to_le32(sizeof(struct comm_page));
>  	chip->comm_page->handshake = 0xffffffff;
>  	chip->comm_page->midi_out_free_count =
> -		__constant_cpu_to_le32(DSP_MIDI_OUT_FIFO_SIZE);
> -	chip->comm_page->sample_rate = __constant_cpu_to_le32(44100);
> +		cpu_to_le32(DSP_MIDI_OUT_FIFO_SIZE);
> +	chip->comm_page->sample_rate = cpu_to_le32(44100);
>  	chip->sample_rate = 44100;
>  
>  	/* Set line levels so we don't blast any inputs on startup */
> diff --git a/sound/pci/echoaudio/gina20_dsp.c b/sound/pci/echoaudio/gina20_dsp.c
> index db6c952..3f1e747 100644
> --- a/sound/pci/echoaudio/gina20_dsp.c
> +++ b/sound/pci/echoaudio/gina20_dsp.c
> @@ -208,10 +208,10 @@ static int set_professional_spdif(struct echoaudio *chip, char prof)
>  	DE_ACT(("set_professional_spdif %d\n", prof));
>  	if (prof)
>  		chip->comm_page->flags |=
> -			__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
> +			cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
>  	else
>  		chip->comm_page->flags &=
> -			~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
> +			~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
>  	chip->professional_spdif = prof;
>  	return update_flags(chip);
>  }
> diff --git a/sound/pci/echoaudio/layla20_dsp.c b/sound/pci/echoaudio/layla20_dsp.c
> index ede75c6..83750e9 100644
> --- a/sound/pci/echoaudio/layla20_dsp.c
> +++ b/sound/pci/echoaudio/layla20_dsp.c
> @@ -284,10 +284,10 @@ static int set_professional_spdif(struct echoaudio *chip, char prof)
>  	DE_ACT(("set_professional_spdif %d\n", prof));
>  	if (prof)
>  		chip->comm_page->flags |=
> -			__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
> +			cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
>  	else
>  		chip->comm_page->flags &=
> -			~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
> +			~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
>  	chip->professional_spdif = prof;
>  	return update_flags(chip);
>  }
> diff --git a/sound/pci/echoaudio/mia_dsp.c b/sound/pci/echoaudio/mia_dsp.c
> index 2273866..3eca16c 100644
> --- a/sound/pci/echoaudio/mia_dsp.c
> +++ b/sound/pci/echoaudio/mia_dsp.c
> @@ -222,10 +222,10 @@ static int set_professional_spdif(struct echoaudio *chip, char prof)
>  	DE_ACT(("set_professional_spdif %d\n", prof));
>  	if (prof)
>  		chip->comm_page->flags |=
> -			__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
> +			cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
>  	else
>  		chip->comm_page->flags &=
> -			~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
> +			~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
>  	chip->professional_spdif = prof;
>  	return update_flags(chip);
>  }
> diff --git a/sound/pci/echoaudio/midi.c b/sound/pci/echoaudio/midi.c
> index 77bf2a8..a953d14 100644
> --- a/sound/pci/echoaudio/midi.c
> +++ b/sound/pci/echoaudio/midi.c
> @@ -44,10 +44,10 @@ static int enable_midi_input(struct echoaudio *chip, char enable)
>  	if (enable) {
>  		chip->mtc_state = MIDI_IN_STATE_NORMAL;
>  		chip->comm_page->flags |=
> -			__constant_cpu_to_le32(DSP_FLAG_MIDI_INPUT);
> +			cpu_to_le32(DSP_FLAG_MIDI_INPUT);
>  	} else
>  		chip->comm_page->flags &=
> -			~__constant_cpu_to_le32(DSP_FLAG_MIDI_INPUT);
> +			~cpu_to_le32(DSP_FLAG_MIDI_INPUT);
>  
>  	clear_handshake(chip);
>  	return send_vector(chip, DSP_VC_UPDATE_FLAGS);
> -- 
> 1.6.2.rc0.218.gde7c
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-11 23:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 22:49 [PATCH] sound: replace uses of __constant_{endian} Harvey Harrison
2009-02-11 23:26 ` 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.