ALSA: cmi8328: Fix compile warnings without CONFIG_PM
PATCH 1/2 ALSA: cmi8328: Fix compile warnings without CONFIG_PM
Just add an ifdef CONFIG_PM to shut up the warnings:
sound/isa/cmi8328.c:129:13: warning: ‘snd_cmi8328_cfg_save’ defined but not used [-Wunused-function] sound/isa/cmi8328.c:136:13: warning: ‘snd_cmi8328_cfg_restore’ defined but not used [-Wunused-function]
--- sound/isa/cmi8328.c | 2 ++ 1 file changed, 2 insertions(+)
sound/isa/cmi8328.c +2 -0
@@ -126,6 +126,7 @@ static void snd_cmi8328_cfg_write(u16 port, u8 reg, u8 val)outb (val, port +3 );/* yes, value goes to the same port as index */ } +#ifdef CONFIG_PM static void snd_cmi8328_cfg_save (u16 port,u8 cfg[]) { cfg[0 ] =snd_cmi8328_cfg_read (port,CFG1 );
@@ -139,6 +140,7 @@ static void snd_cmi8328_cfg_restore(u16 port, u8 cfg[])snd_cmi8328_cfg_write (port,CFG2 , cfg[1 ]); snd_cmi8328_cfg_write(port, CFG3, cfg[2]); } +#endif /* CONFIG_PM */ static int snd_cmi8328_mixer (struct snd_wss *chip) {
Signature · 6 lines
1.8.4.2 _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
PATCH 2/2 ALSA: lx6464es: Fix pointer cast compile warnings
The warnings are really harmless but annoying. Since they are only about debug prints, and it's at most 32bit DMA, let's just cast to unsigned long.
sound/pci/lx6464es/lx6464es.c:457:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] sound/pci/lx6464es/lx_core.c:1195:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
--- sound/pci/lx6464es/lx6464es.c | 4 ++-- sound/pci/lx6464es/lx_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/pci/lx6464es/lx6464es.c +2 -2
@@ -453,8 +453,8 @@ static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream)lower_32_bits (buf),upper_32_bits (buf), &buffer_index); -snd_printdd (LXP "starting: buffer index %x on %p (%d bytes)\n" , - buffer_index, (void *)buf, period_bytes); +snd_printdd (LXP "starting: buffer index %x on %lx (%d bytes)\n" , + buffer_index, (unsigned long )buf, period_bytes); buf += period_bytes; }
sound/pci/lx6464es/lx_core.c +2 -2
@@ -1191,8 +1191,8 @@ static int lx_interrupt_request_new_buffer(struct lx6464es *chip,unpack_pointer (buf, &buf_lo, &buf_hi); err =lx_buffer_give (chip,0 , is_capture, period_bytes, buf_lo, buf_hi, &buffer_index); -snd_printdd (LXP "interrupt: gave buffer index %x on %p (%d bytes)\n" , - buffer_index, (void *)buf, period_bytes); +snd_printdd (LXP "interrupt: gave buffer index %x on 0x%lx (%d bytes)\n" , + buffer_index, (unsigned long )buf, period_bytes); lx_stream->frame_pos = next_pos;spin_unlock_irqrestore (&chip->lock, flags);
Signature · 1 line
1.8.4.2
Re: [PATCH 2/2] ALSA: lx6464es: Fix pointer cast compile warnings
At Wed, 6 Nov 2013 17:58:06 +0100,
Quoted 9 lines · Takashi Iwai
The warnings are really harmless but annoying. Since they are only about debug prints, and it's at most 32bit DMA, let's just cast to unsigned long.
sound/pci/lx6464es/lx6464es.c:457:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]sound/pci/lx6464es/lx_core.c:1195:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]Signed-off-by Takashi Iwai <[email protected]>
Oops, the wrong one was sent. The correct one is below.
Takashi
---
From: Takashi Iwai <[email protected]>
Subject: [PATCH 2/2] ALSA: lx6464es: Fix pointer cast compile warnings
The warnings are really harmless but annoying. Since they are only about debug prints, and it's at most 32bit DMA, let's just cast to unsigned long.
sound/pci/lx6464es/lx6464es.c:457:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] sound/pci/lx6464es/lx_core.c:1195:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
--- sound/pci/lx6464es/lx6464es.c | 4 ++-- sound/pci/lx6464es/lx_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/pci/lx6464es/lx6464es.c +2 -2
@@ -453,8 +453,8 @@ static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream)lower_32_bits (buf),upper_32_bits (buf), &buffer_index); -snd_printdd (LXP "starting: buffer index %x on %p (%d bytes)\n" , - buffer_index, (void *)buf, period_bytes); +snd_printdd (LXP "starting: buffer index %x on 0x%lx (%d bytes)\n" , + buffer_index, (unsigned long )buf, period_bytes); buf += period_bytes; }
sound/pci/lx6464es/lx_core.c +2 -2
@@ -1191,8 +1191,8 @@ static int lx_interrupt_request_new_buffer(struct lx6464es *chip,unpack_pointer (buf, &buf_lo, &buf_hi); err =lx_buffer_give (chip,0 , is_capture, period_bytes, buf_lo, buf_hi, &buffer_index); -snd_printdd (LXP "interrupt: gave buffer index %x on %p (%d bytes)\n" , - buffer_index, (void *)buf, period_bytes); +snd_printdd (LXP "interrupt: gave buffer index %x on 0x%lx (%d bytes)\n" , + buffer_index, (unsigned long )buf, period_bytes); lx_stream->frame_pos = next_pos;spin_unlock_irqrestore (&chip->lock, flags);
Signature · 1 line
1.8.4.2