* [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable
@ 2008-08-08 11:39 ` Michael Borisov
0 siblings, 0 replies; 5+ messages in thread
From: Michael Borisov @ 2008-08-08 11:39 UTC (permalink / raw)
To: Linux Kernel Mailing List, abramo, kernel-janitors
This patch fixes the following compile warning:
sound/pci/cs46xx/cs46xx_lib.c: In function ‘snd_cs46xx_resume’:
sound/pci/cs46xx/cs46xx_lib.c:3614: warning: unused variable ‘i’
cs46xx_lib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Signed-off-by: Michael Borisov <niro@tut.by>
---
diff --git a/sound/pci/cs46xx/cs46xx_lib.c
b/sound/pci/cs46xx/cs46xx_lib.c
index e214e56..07bb7e0 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -3611,7 +3611,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
{
struct snd_card *card = pci_get_drvdata(pci);
struct snd_cs46xx *chip = card->private_data;
- int i, amp_saved;
+ int amp_saved;
pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci);
@@ -3633,6 +3633,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
#ifdef CONFIG_SND_CS46XX_NEW_DSP
cs46xx_dsp_resume(chip);
/* restore some registers */
+ int i;
for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
snd_cs46xx_pokeBA0(chip, saved_regs[i], chip->saved_regs[i]);
#else
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable warning
@ 2008-08-08 11:39 ` Michael Borisov
0 siblings, 0 replies; 5+ messages in thread
From: Michael Borisov @ 2008-08-08 11:39 UTC (permalink / raw)
To: Linux Kernel Mailing List, abramo, kernel-janitors
This patch fixes the following compile warning:
sound/pci/cs46xx/cs46xx_lib.c: In function ‘snd_cs46xx_resume’:
sound/pci/cs46xx/cs46xx_lib.c:3614: warning: unused variable ‘i’
cs46xx_lib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Signed-off-by: Michael Borisov <niro@tut.by>
---
diff --git a/sound/pci/cs46xx/cs46xx_lib.c
b/sound/pci/cs46xx/cs46xx_lib.c
index e214e56..07bb7e0 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -3611,7 +3611,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
{
struct snd_card *card = pci_get_drvdata(pci);
struct snd_cs46xx *chip = card->private_data;
- int i, amp_saved;
+ int amp_saved;
pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci);
@@ -3633,6 +3633,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
#ifdef CONFIG_SND_CS46XX_NEW_DSP
cs46xx_dsp_resume(chip);
/* restore some registers */
+ int i;
for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
snd_cs46xx_pokeBA0(chip, saved_regs[i], chip->saved_regs[i]);
#else
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable
2008-08-08 11:39 ` [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable warning Michael Borisov
(?)
@ 2008-08-08 12:05 ` Benoit Fouet
-1 siblings, 0 replies; 5+ messages in thread
From: Benoit Fouet @ 2008-08-08 12:05 UTC (permalink / raw)
To: kernel-janitors
Hi,
Michael Borisov wrote:
> This patch fixes the following compile warning:
> sound/pci/cs46xx/cs46xx_lib.c: In function ‘snd_cs46xx_resume’:
> sound/pci/cs46xx/cs46xx_lib.c:3614: warning: unused variable ‘i’
>
> cs46xx_lib.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Signed-off-by: Michael Borisov <niro@tut.by>
> ---
> diff --git a/sound/pci/cs46xx/cs46xx_lib.c
> b/sound/pci/cs46xx/cs46xx_lib.c
> index e214e56..07bb7e0 100644
> --- a/sound/pci/cs46xx/cs46xx_lib.c
> +++ b/sound/pci/cs46xx/cs46xx_lib.c
> @@ -3611,7 +3611,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
> {
> struct snd_card *card = pci_get_drvdata(pci);
> struct snd_cs46xx *chip = card->private_data;
> - int i, amp_saved;
> + int amp_saved;
>
> pci_set_power_state(pci, PCI_D0);
> pci_restore_state(pci);
> @@ -3633,6 +3633,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
> #ifdef CONFIG_SND_CS46XX_NEW_DSP
> cs46xx_dsp_resume(chip);
> /* restore some registers */
> + int i;
>
why not ifdef'ing the declaration earlier.
doing it the way you are way, you mix declaration and code.
(I don't know what the kernel policy is for this matter)
--
Benoit Fouet
Purple Labs S.A.
www.purplelabs.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable
2008-08-08 11:39 ` [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable warning Michael Borisov
@ 2008-08-08 15:42 ` Rene Herman
-1 siblings, 0 replies; 5+ messages in thread
From: Rene Herman @ 2008-08-08 15:42 UTC (permalink / raw)
To: Michael Borisov; +Cc: Linux Kernel Mailing List, abramo, kernel-janitors
On 08-08-08 13:39, Michael Borisov wrote:
> This patch fixes the following compile warning:
> sound/pci/cs46xx/cs46xx_lib.c: In function 'snd_cs46xx_resume':
> sound/pci/cs46xx/cs46xx_lib.c:3614: warning: unused variable 'i'
>
> cs46xx_lib.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Signed-off-by: Michael Borisov <niro@tut.by>
> ---
> diff --git a/sound/pci/cs46xx/cs46xx_lib.c
> b/sound/pci/cs46xx/cs46xx_lib.c
> index e214e56..07bb7e0 100644
> --- a/sound/pci/cs46xx/cs46xx_lib.c
> +++ b/sound/pci/cs46xx/cs46xx_lib.c
> @@ -3611,7 +3611,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
> {
> struct snd_card *card = pci_get_drvdata(pci);
> struct snd_cs46xx *chip = card->private_data;
> - int i, amp_saved;
> + int amp_saved;
>
> pci_set_power_state(pci, PCI_D0);
> pci_restore_state(pci);
> @@ -3633,6 +3633,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
> #ifdef CONFIG_SND_CS46XX_NEW_DSP
> cs46xx_dsp_resume(chip);
> /* restore some registers */
> + int i;
> for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
> snd_cs46xx_pokeBA0(chip, saved_regs[i], chip->saved_regs[i]);
> #else
Mixing code and declarations is C99 and I'm afraid kernel developers
haven't gotten around to upgrading themselves for the last 9 years yet
so this is unfortunately not accepted style.
I'm afraid you need a { } code block so that the declaration can go at
the top of that to stay C89 compatible.
Rene.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable warning
@ 2008-08-08 15:42 ` Rene Herman
0 siblings, 0 replies; 5+ messages in thread
From: Rene Herman @ 2008-08-08 15:42 UTC (permalink / raw)
To: Michael Borisov; +Cc: Linux Kernel Mailing List, abramo, kernel-janitors
On 08-08-08 13:39, Michael Borisov wrote:
> This patch fixes the following compile warning:
> sound/pci/cs46xx/cs46xx_lib.c: In function 'snd_cs46xx_resume':
> sound/pci/cs46xx/cs46xx_lib.c:3614: warning: unused variable 'i'
>
> cs46xx_lib.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Signed-off-by: Michael Borisov <niro@tut.by>
> ---
> diff --git a/sound/pci/cs46xx/cs46xx_lib.c
> b/sound/pci/cs46xx/cs46xx_lib.c
> index e214e56..07bb7e0 100644
> --- a/sound/pci/cs46xx/cs46xx_lib.c
> +++ b/sound/pci/cs46xx/cs46xx_lib.c
> @@ -3611,7 +3611,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
> {
> struct snd_card *card = pci_get_drvdata(pci);
> struct snd_cs46xx *chip = card->private_data;
> - int i, amp_saved;
> + int amp_saved;
>
> pci_set_power_state(pci, PCI_D0);
> pci_restore_state(pci);
> @@ -3633,6 +3633,7 @@ int snd_cs46xx_resume(struct pci_dev *pci)
> #ifdef CONFIG_SND_CS46XX_NEW_DSP
> cs46xx_dsp_resume(chip);
> /* restore some registers */
> + int i;
> for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
> snd_cs46xx_pokeBA0(chip, saved_regs[i], chip->saved_regs[i]);
> #else
Mixing code and declarations is C99 and I'm afraid kernel developers
haven't gotten around to upgrading themselves for the last 9 years yet
so this is unfortunately not accepted style.
I'm afraid you need a { } code block so that the declaration can go at
the top of that to stay C89 compatible.
Rene.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-08 15:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 11:39 [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable Michael Borisov
2008-08-08 11:39 ` [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable warning Michael Borisov
2008-08-08 12:05 ` [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable Benoit Fouet
2008-08-08 15:42 ` Rene Herman
2008-08-08 15:42 ` [PATCH] sound/pci/cs46xx/cs46xx_lib.c: remove unused variable warning Rene Herman
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.