alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c
@ 2014-02-07 16:41 Rashika Kheria
  2014-02-07 16:44 ` [PATCH 2/3] sound: Remove unused function in pci/lx6464es/lx_core.c Rashika Kheria
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Rashika Kheria @ 2014-02-07 16:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jaroslav Kysela, Takashi Iwai, Rashika Kheria, alsa-devel, josh

Include appropriate header file in drivers/pcsp/pcsp_input.c because it
defines function whose prototype definitions are present in
drivers/pcsp/pcsp_input.h.

This eliminates the following warning in drivers/pcsp/pcsp_input.c:
sound/drivers/pcsp/pcsp_input.c:42:6: warning: no previous prototype for ‘pcspkr_stop_sound’ [-Wmissing-prototypes]
sound/drivers/pcsp/pcsp_input.c:80:5: warning: no previous prototype for ‘pcspkr_input_init’ [-Wmissing-prototypes]
sound/drivers/pcsp/pcsp_input.c:110:5: warning: no previous prototype for ‘pcspkr_input_remove’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 sound/drivers/pcsp/pcsp_input.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/drivers/pcsp/pcsp_input.c b/sound/drivers/pcsp/pcsp_input.c
index b874b0a..0ecf8a4 100644
--- a/sound/drivers/pcsp/pcsp_input.c
+++ b/sound/drivers/pcsp/pcsp_input.c
@@ -16,6 +16,7 @@
 #include <linux/input.h>
 #include <asm/io.h>
 #include "pcsp.h"
+#include "pcsp_input.h"
 
 static void pcspkr_do_sound(unsigned int count)
 {
-- 
1.7.9.5

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

* [PATCH 2/3] sound: Remove unused function in pci/lx6464es/lx_core.c
  2014-02-07 16:41 [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c Rashika Kheria
@ 2014-02-07 16:44 ` Rashika Kheria
  2014-02-07 17:22   ` Josh Triplett
  2014-02-07 16:46 ` [PATCH 3/3] sound: Move prototype declaration to header file oss/pas2.h from oss/pas2_card.c Rashika Kheria
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Rashika Kheria @ 2014-02-07 16:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jaroslav Kysela, Takashi Iwai, Rashika Kheria, alsa-devel, josh

Remove unused function in pci/lx6464es/lx_core.c.

This eliminates the following warning in pci/lx6464es/lx_core.c:
sound/pci/lx6464es/lx_core.c:144:5: warning: no previous prototype for ‘lx_plx_mbox_read’ [-Wmissing-prototypes]
sound/pci/lx6464es/lx_core.c:172:5: warning: no previous prototype for ‘lx_plx_mbox_write’ [-Wmissing-prototypes]
sound/pci/lx6464es/lx_core.c:494:5: warning: no previous prototype for ‘lx_dsp_es_check_pipeline’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 sound/pci/lx6464es/lx_core.c |   84 ------------------------------------------
 1 file changed, 84 deletions(-)

diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index 626ecad..df4044d 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -141,63 +141,6 @@ void lx_plx_reg_write(struct lx6464es *chip, int port, u32 data)
 	iowrite32(data, address);
 }
 
-u32 lx_plx_mbox_read(struct lx6464es *chip, int mbox_nr)
-{
-	int index;
-
-	switch (mbox_nr) {
-	case 1:
-		index = ePLX_MBOX1;    break;
-	case 2:
-		index = ePLX_MBOX2;    break;
-	case 3:
-		index = ePLX_MBOX3;    break;
-	case 4:
-		index = ePLX_MBOX4;    break;
-	case 5:
-		index = ePLX_MBOX5;    break;
-	case 6:
-		index = ePLX_MBOX6;    break;
-	case 7:
-		index = ePLX_MBOX7;    break;
-	case 0:			/* reserved for HF flags */
-		snd_BUG();
-	default:
-		return 0xdeadbeef;
-	}
-
-	return lx_plx_reg_read(chip, index);
-}
-
-int lx_plx_mbox_write(struct lx6464es *chip, int mbox_nr, u32 value)
-{
-	int index = -1;
-
-	switch (mbox_nr) {
-	case 1:
-		index = ePLX_MBOX1;    break;
-	case 3:
-		index = ePLX_MBOX3;    break;
-	case 4:
-		index = ePLX_MBOX4;    break;
-	case 5:
-		index = ePLX_MBOX5;    break;
-	case 6:
-		index = ePLX_MBOX6;    break;
-	case 7:
-		index = ePLX_MBOX7;    break;
-	case 0:			/* reserved for HF flags */
-	case 2:			/* reserved for Pipe States
-				 * the DSP keeps an image of it */
-		snd_BUG();
-		return -EBADRQC;
-	}
-
-	lx_plx_reg_write(chip, index, value);
-	return 0;
-}
-
-
 /* rmh */
 
 #ifdef CONFIG_SND_DEBUG
@@ -491,33 +434,6 @@ int lx_dsp_read_async_events(struct lx6464es *chip, u32 *data)
 #define CSES_BROADCAST      0x0002
 #define CSES_UPDATE_LDSV    0x0004
 
-int lx_dsp_es_check_pipeline(struct lx6464es *chip)
-{
-	int i;
-
-	for (i = 0; i != CSES_TIMEOUT; ++i) {
-		/*
-		 * le bit CSES_UPDATE_LDSV est à 1 dés que le macprog
-		 * est pret. il re-passe à 0 lorsque le premier read a
-		 * été fait. pour l'instant on retire le test car ce bit
-		 * passe a 1 environ 200 à 400 ms aprés que le registre
-		 * confES à été écrit (kick du xilinx ES).
-		 *
-		 * On ne teste que le bit CE.
-		 * */
-
-		u32 cses = lx_dsp_reg_read(chip, eReg_CSES);
-
-		if ((cses & CSES_CE) == 0)
-			return 0;
-
-		udelay(1);
-	}
-
-	return -ETIMEDOUT;
-}
-
-
 #define PIPE_INFO_TO_CMD(capture, pipe)					\
 	((u32)((u32)(pipe) | ((capture) ? ID_IS_CAPTURE : 0L)) << ID_OFFSET)
 
-- 
1.7.9.5

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

* [PATCH 3/3] sound: Move prototype declaration to header file oss/pas2.h from oss/pas2_card.c
  2014-02-07 16:41 [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c Rashika Kheria
  2014-02-07 16:44 ` [PATCH 2/3] sound: Remove unused function in pci/lx6464es/lx_core.c Rashika Kheria
@ 2014-02-07 16:46 ` Rashika Kheria
  2014-02-07 17:23   ` Josh Triplett
  2014-02-07 17:22 ` [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c Josh Triplett
  2014-02-07 17:25 ` Takashi Iwai
  3 siblings, 1 reply; 7+ messages in thread
From: Rashika Kheria @ 2014-02-07 16:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jaroslav Kysela, Takashi Iwai, Rashika Kheria, alsa-devel, josh

Move prototype declaration of function to header file oss/pas2.h
from oss/pas2_card.c because it is used by more than one file.

This eliminates the following warnings in oss/pas2_mixer.c:
sound/oss/pas2_mixer.c:62:1: warning: no previous prototype for ‘mix_write’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 sound/oss/pas2.h      |    3 +++
 sound/oss/pas2_card.c |    2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/oss/pas2.h b/sound/oss/pas2.h
index fa12c55..d19f757 100644
--- a/sound/oss/pas2.h
+++ b/sound/oss/pas2.h
@@ -15,3 +15,6 @@ int pas_init_mixer(void);
 /*	From pas_midi.c */
 void pas_midi_init(void);
 void pas_midi_interrupt(void);
+
+/*	From pas2_mixer.c*/
+void mix_write(unsigned char data, int ioaddr);
diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c
index 7004e24..b07954a 100644
--- a/sound/oss/pas2_card.c
+++ b/sound/oss/pas2_card.c
@@ -74,8 +74,6 @@ static char    *pas_model_names[] = {
  * to support other than the default base address
  */
 
-extern void     mix_write(unsigned char data, int ioaddr);
-
 unsigned char pas_read(int ioaddr)
 {
 	return inb(ioaddr + pas_translate_code);
-- 
1.7.9.5

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

* Re: [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c
  2014-02-07 16:41 [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c Rashika Kheria
  2014-02-07 16:44 ` [PATCH 2/3] sound: Remove unused function in pci/lx6464es/lx_core.c Rashika Kheria
  2014-02-07 16:46 ` [PATCH 3/3] sound: Move prototype declaration to header file oss/pas2.h from oss/pas2_card.c Rashika Kheria
@ 2014-02-07 17:22 ` Josh Triplett
  2014-02-07 17:25 ` Takashi Iwai
  3 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2014-02-07 17:22 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai, alsa-devel

On Fri, Feb 07, 2014 at 10:11:53PM +0530, Rashika Kheria wrote:
> Include appropriate header file in drivers/pcsp/pcsp_input.c because it
> defines function whose prototype definitions are present in
> drivers/pcsp/pcsp_input.h.
> 
> This eliminates the following warning in drivers/pcsp/pcsp_input.c:
> sound/drivers/pcsp/pcsp_input.c:42:6: warning: no previous prototype for ‘pcspkr_stop_sound’ [-Wmissing-prototypes]
> sound/drivers/pcsp/pcsp_input.c:80:5: warning: no previous prototype for ‘pcspkr_input_init’ [-Wmissing-prototypes]
> sound/drivers/pcsp/pcsp_input.c:110:5: warning: no previous prototype for ‘pcspkr_input_remove’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  sound/drivers/pcsp/pcsp_input.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/drivers/pcsp/pcsp_input.c b/sound/drivers/pcsp/pcsp_input.c
> index b874b0a..0ecf8a4 100644
> --- a/sound/drivers/pcsp/pcsp_input.c
> +++ b/sound/drivers/pcsp/pcsp_input.c
> @@ -16,6 +16,7 @@
>  #include <linux/input.h>
>  #include <asm/io.h>
>  #include "pcsp.h"
> +#include "pcsp_input.h"
>  
>  static void pcspkr_do_sound(unsigned int count)
>  {
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 2/3] sound: Remove unused function in pci/lx6464es/lx_core.c
  2014-02-07 16:44 ` [PATCH 2/3] sound: Remove unused function in pci/lx6464es/lx_core.c Rashika Kheria
@ 2014-02-07 17:22   ` Josh Triplett
  0 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2014-02-07 17:22 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai, alsa-devel

On Fri, Feb 07, 2014 at 10:14:03PM +0530, Rashika Kheria wrote:
> Remove unused function in pci/lx6464es/lx_core.c.
> 
> This eliminates the following warning in pci/lx6464es/lx_core.c:
> sound/pci/lx6464es/lx_core.c:144:5: warning: no previous prototype for ‘lx_plx_mbox_read’ [-Wmissing-prototypes]
> sound/pci/lx6464es/lx_core.c:172:5: warning: no previous prototype for ‘lx_plx_mbox_write’ [-Wmissing-prototypes]
> sound/pci/lx6464es/lx_core.c:494:5: warning: no previous prototype for ‘lx_dsp_es_check_pipeline’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  sound/pci/lx6464es/lx_core.c |   84 ------------------------------------------
>  1 file changed, 84 deletions(-)
> 
> diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
> index 626ecad..df4044d 100644
> --- a/sound/pci/lx6464es/lx_core.c
> +++ b/sound/pci/lx6464es/lx_core.c
> @@ -141,63 +141,6 @@ void lx_plx_reg_write(struct lx6464es *chip, int port, u32 data)
>  	iowrite32(data, address);
>  }
>  
> -u32 lx_plx_mbox_read(struct lx6464es *chip, int mbox_nr)
> -{
> -	int index;
> -
> -	switch (mbox_nr) {
> -	case 1:
> -		index = ePLX_MBOX1;    break;
> -	case 2:
> -		index = ePLX_MBOX2;    break;
> -	case 3:
> -		index = ePLX_MBOX3;    break;
> -	case 4:
> -		index = ePLX_MBOX4;    break;
> -	case 5:
> -		index = ePLX_MBOX5;    break;
> -	case 6:
> -		index = ePLX_MBOX6;    break;
> -	case 7:
> -		index = ePLX_MBOX7;    break;
> -	case 0:			/* reserved for HF flags */
> -		snd_BUG();
> -	default:
> -		return 0xdeadbeef;
> -	}
> -
> -	return lx_plx_reg_read(chip, index);
> -}
> -
> -int lx_plx_mbox_write(struct lx6464es *chip, int mbox_nr, u32 value)
> -{
> -	int index = -1;
> -
> -	switch (mbox_nr) {
> -	case 1:
> -		index = ePLX_MBOX1;    break;
> -	case 3:
> -		index = ePLX_MBOX3;    break;
> -	case 4:
> -		index = ePLX_MBOX4;    break;
> -	case 5:
> -		index = ePLX_MBOX5;    break;
> -	case 6:
> -		index = ePLX_MBOX6;    break;
> -	case 7:
> -		index = ePLX_MBOX7;    break;
> -	case 0:			/* reserved for HF flags */
> -	case 2:			/* reserved for Pipe States
> -				 * the DSP keeps an image of it */
> -		snd_BUG();
> -		return -EBADRQC;
> -	}
> -
> -	lx_plx_reg_write(chip, index, value);
> -	return 0;
> -}
> -
> -
>  /* rmh */
>  
>  #ifdef CONFIG_SND_DEBUG
> @@ -491,33 +434,6 @@ int lx_dsp_read_async_events(struct lx6464es *chip, u32 *data)
>  #define CSES_BROADCAST      0x0002
>  #define CSES_UPDATE_LDSV    0x0004
>  
> -int lx_dsp_es_check_pipeline(struct lx6464es *chip)
> -{
> -	int i;
> -
> -	for (i = 0; i != CSES_TIMEOUT; ++i) {
> -		/*
> -		 * le bit CSES_UPDATE_LDSV est à 1 dés que le macprog
> -		 * est pret. il re-passe à 0 lorsque le premier read a
> -		 * été fait. pour l'instant on retire le test car ce bit
> -		 * passe a 1 environ 200 à 400 ms aprés que le registre
> -		 * confES à été écrit (kick du xilinx ES).
> -		 *
> -		 * On ne teste que le bit CE.
> -		 * */
> -
> -		u32 cses = lx_dsp_reg_read(chip, eReg_CSES);
> -
> -		if ((cses & CSES_CE) == 0)
> -			return 0;
> -
> -		udelay(1);
> -	}
> -
> -	return -ETIMEDOUT;
> -}
> -
> -
>  #define PIPE_INFO_TO_CMD(capture, pipe)					\
>  	((u32)((u32)(pipe) | ((capture) ? ID_IS_CAPTURE : 0L)) << ID_OFFSET)
>  
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 3/3] sound: Move prototype declaration to header file oss/pas2.h from oss/pas2_card.c
  2014-02-07 16:46 ` [PATCH 3/3] sound: Move prototype declaration to header file oss/pas2.h from oss/pas2_card.c Rashika Kheria
@ 2014-02-07 17:23   ` Josh Triplett
  0 siblings, 0 replies; 7+ messages in thread
From: Josh Triplett @ 2014-02-07 17:23 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai, alsa-devel

On Fri, Feb 07, 2014 at 10:16:31PM +0530, Rashika Kheria wrote:
> Move prototype declaration of function to header file oss/pas2.h
> from oss/pas2_card.c because it is used by more than one file.
> 
> This eliminates the following warnings in oss/pas2_mixer.c:
> sound/oss/pas2_mixer.c:62:1: warning: no previous prototype for ‘mix_write’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  sound/oss/pas2.h      |    3 +++
>  sound/oss/pas2_card.c |    2 --
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/oss/pas2.h b/sound/oss/pas2.h
> index fa12c55..d19f757 100644
> --- a/sound/oss/pas2.h
> +++ b/sound/oss/pas2.h
> @@ -15,3 +15,6 @@ int pas_init_mixer(void);
>  /*	From pas_midi.c */
>  void pas_midi_init(void);
>  void pas_midi_interrupt(void);
> +
> +/*	From pas2_mixer.c*/
> +void mix_write(unsigned char data, int ioaddr);
> diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c
> index 7004e24..b07954a 100644
> --- a/sound/oss/pas2_card.c
> +++ b/sound/oss/pas2_card.c
> @@ -74,8 +74,6 @@ static char    *pas_model_names[] = {
>   * to support other than the default base address
>   */
>  
> -extern void     mix_write(unsigned char data, int ioaddr);
> -
>  unsigned char pas_read(int ioaddr)
>  {
>  	return inb(ioaddr + pas_translate_code);
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c
  2014-02-07 16:41 [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c Rashika Kheria
                   ` (2 preceding siblings ...)
  2014-02-07 17:22 ` [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c Josh Triplett
@ 2014-02-07 17:25 ` Takashi Iwai
  3 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2014-02-07 17:25 UTC (permalink / raw)
  To: Rashika Kheria; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel, josh

At Fri, 7 Feb 2014 22:11:53 +0530,
Rashika Kheria wrote:
> 
> Include appropriate header file in drivers/pcsp/pcsp_input.c because it
> defines function whose prototype definitions are present in
> drivers/pcsp/pcsp_input.h.
> 
> This eliminates the following warning in drivers/pcsp/pcsp_input.c:
> sound/drivers/pcsp/pcsp_input.c:42:6: warning: no previous prototype for ‘pcspkr_stop_sound’ [-Wmissing-prototypes]
> sound/drivers/pcsp/pcsp_input.c:80:5: warning: no previous prototype for ‘pcspkr_input_init’ [-Wmissing-prototypes]
> sound/drivers/pcsp/pcsp_input.c:110:5: warning: no previous prototype for ‘pcspkr_input_remove’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Thanks, applied all three patches.


Takashi

> ---
>  sound/drivers/pcsp/pcsp_input.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/drivers/pcsp/pcsp_input.c b/sound/drivers/pcsp/pcsp_input.c
> index b874b0a..0ecf8a4 100644
> --- a/sound/drivers/pcsp/pcsp_input.c
> +++ b/sound/drivers/pcsp/pcsp_input.c
> @@ -16,6 +16,7 @@
>  #include <linux/input.h>
>  #include <asm/io.h>
>  #include "pcsp.h"
> +#include "pcsp_input.h"
>  
>  static void pcspkr_do_sound(unsigned int count)
>  {
> -- 
> 1.7.9.5
> 

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

end of thread, other threads:[~2014-02-07 17:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-07 16:41 [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c Rashika Kheria
2014-02-07 16:44 ` [PATCH 2/3] sound: Remove unused function in pci/lx6464es/lx_core.c Rashika Kheria
2014-02-07 17:22   ` Josh Triplett
2014-02-07 16:46 ` [PATCH 3/3] sound: Move prototype declaration to header file oss/pas2.h from oss/pas2_card.c Rashika Kheria
2014-02-07 17:23   ` Josh Triplett
2014-02-07 17:22 ` [PATCH 1/3] sound: Include appropriate header file in pcsp/pcsp_input.c Josh Triplett
2014-02-07 17:25 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).