mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sound: remove checks for CONFIG_SND_DEBUG_ROM
@ 2014-05-29 16:58 Paul Bolle
  2014-05-30  8:23 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Bolle @ 2014-05-29 16:58 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai; +Cc: alsa-devel, linux-kernel

Checks for CONFIG_SND_DEBUG_ROM were added in v2.5.5 but a Kconfig
symbol SND_DEBUG_ROM was never added. These checks have always
evaluated to false. Remove them and the printk()s they hide.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Untested.

Perhaps one is expected to define this debugging macro by hand, somehow.
In that case it would be nice to drop the CONFIG_ prefix.

 sound/isa/gus/interwave.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index 5abbbe477d16..ad55e5cb8e94 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -442,17 +442,11 @@ static void snd_interwave_detect_memory(struct snd_gus_card *gus)
 	for (bank_pos = 0; bank_pos < 16L * 1024L * 1024L; bank_pos += 4L * 1024L * 1024L) {
 		for (i = 0; i < 8; ++i)
 			iwave[i] = snd_gf1_peek(gus, bank_pos + i);
-#ifdef CONFIG_SND_DEBUG_ROM
-		printk(KERN_DEBUG "ROM at 0x%06x = %8phC\n", bank_pos, iwave);
-#endif
 		if (strncmp(iwave, "INTRWAVE", 8))
 			continue;	/* first check */
 		csum = 0;
 		for (i = 0; i < sizeof(struct rom_hdr); i++)
 			csum += snd_gf1_peek(gus, bank_pos + i);
-#ifdef CONFIG_SND_DEBUG_ROM
-		printk(KERN_DEBUG "ROM checksum = 0x%x (computed)\n", csum);
-#endif
 		if (csum != 0)
 			continue;	/* not valid rom */
 		gus->gf1.rom_banks++;
-- 
1.9.3


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

* Re: [PATCH] sound: remove checks for CONFIG_SND_DEBUG_ROM
  2014-05-29 16:58 [PATCH] sound: remove checks for CONFIG_SND_DEBUG_ROM Paul Bolle
@ 2014-05-30  8:23 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2014-05-30  8:23 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

At Thu, 29 May 2014 18:58:25 +0200,
Paul Bolle wrote:
> 
> Checks for CONFIG_SND_DEBUG_ROM were added in v2.5.5 but a Kconfig
> symbol SND_DEBUG_ROM was never added. These checks have always
> evaluated to false. Remove them and the printk()s they hide.
> 
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> Untested.
> 
> Perhaps one is expected to define this debugging macro by hand, somehow.
> In that case it would be nice to drop the CONFIG_ prefix.

Yeah, but I guess a developer can add such printk anyway easily, so
let's clean up the code at first.  So, I took your patch now as is.

thanks,

Takashi

> 
>  sound/isa/gus/interwave.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
> index 5abbbe477d16..ad55e5cb8e94 100644
> --- a/sound/isa/gus/interwave.c
> +++ b/sound/isa/gus/interwave.c
> @@ -442,17 +442,11 @@ static void snd_interwave_detect_memory(struct snd_gus_card *gus)
>  	for (bank_pos = 0; bank_pos < 16L * 1024L * 1024L; bank_pos += 4L * 1024L * 1024L) {
>  		for (i = 0; i < 8; ++i)
>  			iwave[i] = snd_gf1_peek(gus, bank_pos + i);
> -#ifdef CONFIG_SND_DEBUG_ROM
> -		printk(KERN_DEBUG "ROM at 0x%06x = %8phC\n", bank_pos, iwave);
> -#endif
>  		if (strncmp(iwave, "INTRWAVE", 8))
>  			continue;	/* first check */
>  		csum = 0;
>  		for (i = 0; i < sizeof(struct rom_hdr); i++)
>  			csum += snd_gf1_peek(gus, bank_pos + i);
> -#ifdef CONFIG_SND_DEBUG_ROM
> -		printk(KERN_DEBUG "ROM checksum = 0x%x (computed)\n", csum);
> -#endif
>  		if (csum != 0)
>  			continue;	/* not valid rom */
>  		gus->gf1.rom_banks++;
> -- 
> 1.9.3
> 

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

end of thread, other threads:[~2014-05-30  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-29 16:58 [PATCH] sound: remove checks for CONFIG_SND_DEBUG_ROM Paul Bolle
2014-05-30  8:23 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome