All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code
@ 2005-03-23 23:41 ` Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2005-03-23 23:41 UTC (permalink / raw)
  To: perex; +Cc: alsa-devel, linux-kernel

The Coverity checker found this obviously dead code.

I'mnot sure which of the if (plugin == NULL) is correct - this patch 
removes the one that couldn't be true.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.12-rc1-mm1-full/sound/core/oss/pcm_plugin.c.old	2005-03-23 01:06:58.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/sound/core/oss/pcm_plugin.c	2005-03-23 01:07:41.000000000 +0100
@@ -657,22 +657,19 @@ static int snd_pcm_plug_playback_channel
 	if (plugin == NULL) {
 		return 0;
 	} else {
 		int schannels = plugin->dst_format.channels;
 		bitset_t bs[bitset_size(schannels)];
 		bitset_t *srcmask;
 		bitset_t *dstmask = bs;
 		int err;
 		bitset_one(dstmask, schannels);
-		if (plugin == NULL) {
-			bitset_and(client_vmask, dstmask, schannels);
-			return 0;
-		}
+
 		while (1) {
 			err = plugin->src_channels_mask(plugin, dstmask, &srcmask);
 			if (err < 0)
 				return err;
 			dstmask = srcmask;
 			if (plugin->prev == NULL)
 				break;
 			plugin = plugin->prev;
 		}



-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click

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

* [2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code
@ 2005-03-23 23:41 ` Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2005-03-23 23:41 UTC (permalink / raw)
  To: perex; +Cc: alsa-devel, linux-kernel

The Coverity checker found this obviously dead code.

I'mnot sure which of the if (plugin == NULL) is correct - this patch 
removes the one that couldn't be true.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.12-rc1-mm1-full/sound/core/oss/pcm_plugin.c.old	2005-03-23 01:06:58.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/sound/core/oss/pcm_plugin.c	2005-03-23 01:07:41.000000000 +0100
@@ -657,22 +657,19 @@ static int snd_pcm_plug_playback_channel
 	if (plugin == NULL) {
 		return 0;
 	} else {
 		int schannels = plugin->dst_format.channels;
 		bitset_t bs[bitset_size(schannels)];
 		bitset_t *srcmask;
 		bitset_t *dstmask = bs;
 		int err;
 		bitset_one(dstmask, schannels);
-		if (plugin == NULL) {
-			bitset_and(client_vmask, dstmask, schannels);
-			return 0;
-		}
+
 		while (1) {
 			err = plugin->src_channels_mask(plugin, dstmask, &srcmask);
 			if (err < 0)
 				return err;
 			dstmask = srcmask;
 			if (plugin->prev == NULL)
 				break;
 			plugin = plugin->prev;
 		}


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

* Re: [2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code
  2005-03-23 23:41 ` Adrian Bunk
  (?)
@ 2005-03-24 12:04 ` Takashi Iwai
  -1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2005-03-24 12:04 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: perex, alsa-devel, linux-kernel

At Thu, 24 Mar 2005 00:41:28 +0100,
Adrian Bunk wrote:
> 
> The Coverity checker found this obviously dead code.
> 
> I'mnot sure which of the if (plugin == NULL) is correct - this patch 
> removes the one that couldn't be true.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Thanks, I applied it to ALSA tree.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click

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

* Re: [Alsa-devel] [2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code
  2005-03-23 23:41 ` Adrian Bunk
  (?)
  (?)
@ 2005-03-24 12:04 ` Takashi Iwai
  -1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2005-03-24 12:04 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: perex, alsa-devel, linux-kernel

At Thu, 24 Mar 2005 00:41:28 +0100,
Adrian Bunk wrote:
> 
> The Coverity checker found this obviously dead code.
> 
> I'mnot sure which of the if (plugin == NULL) is correct - this patch 
> removes the one that couldn't be true.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Thanks, I applied it to ALSA tree.


Takashi

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

end of thread, other threads:[~2005-03-24 12:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-23 23:41 [2.6 patch] sound/core/oss/pcm_plugin.c: kill dead code Adrian Bunk
2005-03-23 23:41 ` Adrian Bunk
2005-03-24 12:04 ` Takashi Iwai
2005-03-24 12:04 ` [Alsa-devel] " 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.