All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: skystar@moldova.cc
Cc: linux-dvb-maintainer@linuxtv.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/media/dvb/b2c2/skystar2.c: remove an impossible code path
Date: Sun, 10 Apr 2005 01:08:49 +0200	[thread overview]
Message-ID: <20050409230849.GR3632@stusta.de> (raw)

This patch removes an impossible code path found by the Coverity 
checker (look at the assignement in the first line of the context).

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

---

 drivers/media/dvb/b2c2/skystar2.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.12-rc2-mm2-full/drivers/media/dvb/b2c2/skystar2.c.old	2005-04-09 22:09:27.000000000 +0200
+++ linux-2.6.12-rc2-mm2-full/drivers/media/dvb/b2c2/skystar2.c	2005-04-09 22:10:13.000000000 +0200
@@ -1358,49 +1358,49 @@ static int dma_init_dma(struct adapter *
 		subbuffers = 2;
 
 		subbufsize = (((adapter->dmaq1.buffer_size / 2) / 4) << 8) | subbuffers;
 
 		subbuf0 = adapter->dmaq1.bus_addr & 0xfffffffc;
 
 		subbuf1 = ((adapter->dmaq1.bus_addr + adapter->dmaq1.buffer_size / 2) & 0xfffffffc) | 1;
 
 		dprintk("%s: first subbuffer address = 0x%x\n", __FUNCTION__, subbuf0);
 		udelay(1000);
 		write_reg_dw(adapter, 0x000, subbuf0);
 
 		dprintk("%s: subbuffer size = 0x%x\n", __FUNCTION__, (subbufsize >> 8) * 4);
 		udelay(1000);
 		write_reg_dw(adapter, 0x004, subbufsize);
 
 		dprintk("%s: second subbuffer address = 0x%x\n", __FUNCTION__, subbuf1);
 		udelay(1000);
 		write_reg_dw(adapter, 0x00c, subbuf1);
 
 		dprintk("%s: counter = 0x%x\n", __FUNCTION__, adapter->dmaq1.bus_addr & 0xfffffffc);
 		write_reg_dw(adapter, 0x008, adapter->dmaq1.bus_addr & 0xfffffffc);
 		udelay(1000);
 
-		dma_enable_disable_irq(adapter, 0, 1, subbuffers ? 1 : 0);
+		dma_enable_disable_irq(adapter, 0, 1, 1);
 
 		irq_dma_enable_disable_irq(adapter, 1);
 
 		sram_set_media_dest(adapter, 1);
 		sram_set_net_dest(adapter, 1);
 		sram_set_cai_dest(adapter, 2);
 		sram_set_cao_dest(adapter, 2);
 	}
 
 	if (dma_channel == 1) {
 		dprintk("%s: Initializing DMA2 channel\n", __FUNCTION__);
 
 		subbuffers = 2;
 
 		subbufsize = (((adapter->dmaq2.buffer_size / 2) / 4) << 8) | subbuffers;
 
 		subbuf0 = adapter->dmaq2.bus_addr & 0xfffffffc;
 
 		subbuf1 = ((adapter->dmaq2.bus_addr + adapter->dmaq2.buffer_size / 2) & 0xfffffffc) | 1;
 
 		dprintk("%s: first subbuffer address = 0x%x\n", __FUNCTION__, subbuf0);
 		udelay(1000);
 		write_reg_dw(adapter, 0x010, subbuf0);
 


             reply	other threads:[~2005-04-09 23:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-09 23:08 Adrian Bunk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-05-02  1:47 [2.6 patch] drivers/media/dvb/b2c2/skystar2.c: remove an impossible code path Adrian Bunk
2005-05-02 23:15 ` Johannes Stezenbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050409230849.GR3632@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-dvb-maintainer@linuxtv.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skystar@moldova.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.