diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-13 11:17:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 11:53:19 -0500 |
commit | ae24601b47c3f4a56545ef4cd4e7c821ac1db598 (patch) | |
tree | 562258e9fdec32a9b7410a8467dc5315bdbfe8c3 /drivers/media | |
parent | 9d9d6baeca6f9174b8e7fd219a62a8fa09d61cc7 (diff) |
V4L/DVB (3485): BUG_ON() Conversion in drivers/video/media
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/common/saa7146_core.c | 3 | ||||
-rw-r--r-- | drivers/media/common/saa7146_fops.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 3 | ||||
-rw-r--r-- | drivers/media/video/bttv-risc.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-oss.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 3 | ||||
-rw-r--r-- | drivers/media/video/video-buf.c | 3 |
12 files changed, 15 insertions, 30 deletions
diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c index ee16c042ef6e..8cdd4d265ffa 100644 --- a/drivers/media/common/saa7146_core.c +++ b/drivers/media/common/saa7146_core.c | |||
@@ -116,8 +116,7 @@ static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages) | |||
116 | pg = vmalloc_to_page(virt); | 116 | pg = vmalloc_to_page(virt); |
117 | if (NULL == pg) | 117 | if (NULL == pg) |
118 | goto err; | 118 | goto err; |
119 | if (PageHighMem(pg)) | 119 | BUG_ON(PageHighMem(pg)); |
120 | BUG(); | ||
121 | sglist[i].page = pg; | 120 | sglist[i].page = pg; |
122 | sglist[i].length = PAGE_SIZE; | 121 | sglist[i].length = PAGE_SIZE; |
123 | } | 122 | } |
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index dc7fb20f47b5..3870fa948cc0 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c | |||
@@ -37,8 +37,7 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits) | |||
37 | struct saa7146_dev *dev = fh->dev; | 37 | struct saa7146_dev *dev = fh->dev; |
38 | struct saa7146_vv *vv = dev->vv_data; | 38 | struct saa7146_vv *vv = dev->vv_data; |
39 | 39 | ||
40 | if ((fh->resources & bits) != bits) | 40 | BUG_ON((fh->resources & bits) != bits); |
41 | BUG(); | ||
42 | 41 | ||
43 | mutex_lock(&dev->lock); | 42 | mutex_lock(&dev->lock); |
44 | fh->resources &= ~bits; | 43 | fh->resources &= ~bits; |
@@ -55,8 +54,7 @@ void saa7146_dma_free(struct saa7146_dev *dev,struct saa7146_buf *buf) | |||
55 | { | 54 | { |
56 | DEB_EE(("dev:%p, buf:%p\n",dev,buf)); | 55 | DEB_EE(("dev:%p, buf:%p\n",dev,buf)); |
57 | 56 | ||
58 | if (in_interrupt()) | 57 | BUG_ON(in_interrupt()); |
59 | BUG(); | ||
60 | 58 | ||
61 | videobuf_waiton(&buf->vb,0,0); | 59 | videobuf_waiton(&buf->vb,0,0); |
62 | videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma); | 60 | videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma); |
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index aef4f58d712d..7497b1e8d883 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -1090,11 +1090,9 @@ static int dvb_get_stc(struct dmx_demux *demux, unsigned int num, | |||
1090 | struct av7110 *av7110; | 1090 | struct av7110 *av7110; |
1091 | 1091 | ||
1092 | /* pointer casting paranoia... */ | 1092 | /* pointer casting paranoia... */ |
1093 | if (!demux) | 1093 | BUG_ON(!demux); |
1094 | BUG(); | ||
1095 | dvbdemux = (struct dvb_demux *) demux->priv; | 1094 | dvbdemux = (struct dvb_demux *) demux->priv; |
1096 | if (!dvbdemux) | 1095 | BUG_ON(!dvbdemux); |
1097 | BUG(); | ||
1098 | av7110 = (struct av7110 *) dvbdemux->priv; | 1096 | av7110 = (struct av7110 *) dvbdemux->priv; |
1099 | 1097 | ||
1100 | dprintk(4, "%p\n", av7110); | 1098 | dprintk(4, "%p\n", av7110); |
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index ecb15d4ecf81..248fdc7accfb 100644 --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | |||
@@ -688,8 +688,7 @@ static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len) | |||
688 | memcpy(ttusb->muxpack + ttusb->muxpack_ptr, | 688 | memcpy(ttusb->muxpack + ttusb->muxpack_ptr, |
689 | data, avail); | 689 | data, avail); |
690 | ttusb->muxpack_ptr += avail; | 690 | ttusb->muxpack_ptr += avail; |
691 | if (ttusb->muxpack_ptr > 264) | 691 | BUG_ON(ttusb->muxpack_ptr > 264); |
692 | BUG(); | ||
693 | data += avail; | 692 | data += avail; |
694 | len -= avail; | 693 | len -= avail; |
695 | /* determine length */ | 694 | /* determine length */ |
diff --git a/drivers/media/video/bttv-risc.c b/drivers/media/video/bttv-risc.c index 5c746110df62..344f84e9af04 100644 --- a/drivers/media/video/bttv-risc.c +++ b/drivers/media/video/bttv-risc.c | |||
@@ -511,8 +511,7 @@ bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc, | |||
511 | void | 511 | void |
512 | bttv_dma_free(struct bttv *btv, struct bttv_buffer *buf) | 512 | bttv_dma_free(struct bttv *btv, struct bttv_buffer *buf) |
513 | { | 513 | { |
514 | if (in_interrupt()) | 514 | BUG_ON(in_interrupt()); |
515 | BUG(); | ||
516 | videobuf_waiton(&buf->vb,0,0); | 515 | videobuf_waiton(&buf->vb,0,0); |
517 | videobuf_dma_pci_unmap(btv->c.pci, &buf->vb.dma); | 516 | videobuf_dma_pci_unmap(btv->c.pci, &buf->vb.dma); |
518 | videobuf_dma_free(&buf->vb.dma); | 517 | videobuf_dma_free(&buf->vb.dma); |
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index 25be3a976d09..c2cdbafdb77b 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c | |||
@@ -215,8 +215,7 @@ int cx88_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, | |||
215 | void | 215 | void |
216 | cx88_free_buffer(struct pci_dev *pci, struct cx88_buffer *buf) | 216 | cx88_free_buffer(struct pci_dev *pci, struct cx88_buffer *buf) |
217 | { | 217 | { |
218 | if (in_interrupt()) | 218 | BUG_ON(in_interrupt()); |
219 | BUG(); | ||
220 | videobuf_waiton(&buf->vb,0,0); | 219 | videobuf_waiton(&buf->vb,0,0); |
221 | videobuf_dma_pci_unmap(pci, &buf->vb.dma); | 220 | videobuf_dma_pci_unmap(pci, &buf->vb.dma); |
222 | videobuf_dma_free(&buf->vb.dma); | 221 | videobuf_dma_free(&buf->vb.dma); |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index b1892dff0fe8..6c97aa740d27 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -366,8 +366,7 @@ static | |||
366 | void res_free(struct cx8800_dev *dev, struct cx8800_fh *fh, unsigned int bits) | 366 | void res_free(struct cx8800_dev *dev, struct cx8800_fh *fh, unsigned int bits) |
367 | { | 367 | { |
368 | struct cx88_core *core = dev->core; | 368 | struct cx88_core *core = dev->core; |
369 | if ((fh->resources & bits) != bits) | 369 | BUG_ON((fh->resources & bits) != bits); |
370 | BUG(); | ||
371 | 370 | ||
372 | mutex_lock(&core->lock); | 371 | mutex_lock(&core->lock); |
373 | fh->resources &= ~bits; | 372 | fh->resources &= ~bits; |
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index 614f7b923403..64e2c108df34 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -308,8 +308,7 @@ static int dsp_buffer_init(struct saa7134_dev *dev) | |||
308 | 308 | ||
309 | static int dsp_buffer_free(struct saa7134_dev *dev) | 309 | static int dsp_buffer_free(struct saa7134_dev *dev) |
310 | { | 310 | { |
311 | if (!dev->dmasound.blksize) | 311 | BUG_ON(!dev->dmasound.blksize); |
312 | BUG(); | ||
313 | 312 | ||
314 | videobuf_dma_free(&dev->dmasound.dma); | 313 | videobuf_dma_free(&dev->dmasound.dma); |
315 | 314 | ||
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index f5f2cf5d1507..be85e0b0cbb0 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -256,8 +256,7 @@ void saa7134_pgtable_free(struct pci_dev *pci, struct saa7134_pgtable *pt) | |||
256 | 256 | ||
257 | void saa7134_dma_free(struct saa7134_dev *dev,struct saa7134_buf *buf) | 257 | void saa7134_dma_free(struct saa7134_dev *dev,struct saa7134_buf *buf) |
258 | { | 258 | { |
259 | if (in_interrupt()) | 259 | BUG_ON(in_interrupt()); |
260 | BUG(); | ||
261 | 260 | ||
262 | videobuf_waiton(&buf->vb,0,0); | 261 | videobuf_waiton(&buf->vb,0,0); |
263 | videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma); | 262 | videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma); |
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 80e34a5fdcc5..d79d05f88705 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c | |||
@@ -84,8 +84,7 @@ static int dsp_buffer_init(struct saa7134_dev *dev) | |||
84 | { | 84 | { |
85 | int err; | 85 | int err; |
86 | 86 | ||
87 | if (!dev->dmasound.bufsize) | 87 | BUG_ON(!dev->dmasound.bufsize); |
88 | BUG(); | ||
89 | videobuf_dma_init(&dev->dmasound.dma); | 88 | videobuf_dma_init(&dev->dmasound.dma); |
90 | err = videobuf_dma_init_kernel(&dev->dmasound.dma, PCI_DMA_FROMDEVICE, | 89 | err = videobuf_dma_init_kernel(&dev->dmasound.dma, PCI_DMA_FROMDEVICE, |
91 | (dev->dmasound.bufsize + PAGE_SIZE) >> PAGE_SHIFT); | 90 | (dev->dmasound.bufsize + PAGE_SIZE) >> PAGE_SHIFT); |
@@ -96,8 +95,7 @@ static int dsp_buffer_init(struct saa7134_dev *dev) | |||
96 | 95 | ||
97 | static int dsp_buffer_free(struct saa7134_dev *dev) | 96 | static int dsp_buffer_free(struct saa7134_dev *dev) |
98 | { | 97 | { |
99 | if (!dev->dmasound.blksize) | 98 | BUG_ON(!dev->dmasound.blksize); |
100 | BUG(); | ||
101 | videobuf_dma_free(&dev->dmasound.dma); | 99 | videobuf_dma_free(&dev->dmasound.dma); |
102 | dev->dmasound.blocks = 0; | 100 | dev->dmasound.blocks = 0; |
103 | dev->dmasound.blksize = 0; | 101 | dev->dmasound.blksize = 0; |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 72f389a51a13..600c3c7e3dca 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -489,8 +489,7 @@ int res_locked(struct saa7134_dev *dev, unsigned int bit) | |||
489 | static | 489 | static |
490 | void res_free(struct saa7134_dev *dev, struct saa7134_fh *fh, unsigned int bits) | 490 | void res_free(struct saa7134_dev *dev, struct saa7134_fh *fh, unsigned int bits) |
491 | { | 491 | { |
492 | if ((fh->resources & bits) != bits) | 492 | BUG_ON((fh->resources & bits) != bits); |
493 | BUG(); | ||
494 | 493 | ||
495 | mutex_lock(&dev->lock); | 494 | mutex_lock(&dev->lock); |
496 | fh->resources &= ~bits; | 495 | fh->resources &= ~bits; |
diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c index cb1c228e29f8..a8918e839f65 100644 --- a/drivers/media/video/video-buf.c +++ b/drivers/media/video/video-buf.c | |||
@@ -59,8 +59,7 @@ videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages) | |||
59 | pg = vmalloc_to_page(virt); | 59 | pg = vmalloc_to_page(virt); |
60 | if (NULL == pg) | 60 | if (NULL == pg) |
61 | goto err; | 61 | goto err; |
62 | if (PageHighMem(pg)) | 62 | BUG_ON(PageHighMem(pg)); |
63 | BUG(); | ||
64 | sglist[i].page = pg; | 63 | sglist[i].page = pg; |
65 | sglist[i].length = PAGE_SIZE; | 64 | sglist[i].length = PAGE_SIZE; |
66 | } | 65 | } |