aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 12:41:18 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 12:41:18 -0500
commit9ae21d1bb376436285cd5346d3e4b3655d6dd1b9 (patch)
tree8f889770fae721da63bd378c1834a87e2eb1cfb5 /drivers
parentf9b4192923fa6e38331e88214b1fe5fc21583fcc (diff)
parente9415777b1cd0eaf4d1d3d61772f0e6d5c2551ad (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: drivers/char/ftape/lowlevel/fdc-io.c: Correct a comment Kconfig help: MTD_JEDECPROBE already supports Intel Remove ugly debugging stuff do_mounts.c: Minor ROOT_DEV comment cleanup BUG_ON() Conversion in drivers/s390/block/dasd_devmap.c BUG_ON() Conversion in mm/mempool.c BUG_ON() Conversion in mm/memory.c BUG_ON() Conversion in kernel/fork.c BUG_ON() Conversion in ipc/sem.c BUG_ON() Conversion in fs/ext2/ BUG_ON() Conversion in fs/hfs/ BUG_ON() Conversion in fs/dcache.c BUG_ON() Conversion in fs/buffer.c BUG_ON() Conversion in input/serio/hp_sdc_mlc.c BUG_ON() Conversion in md/dm-table.c BUG_ON() Conversion in md/dm-path-selector.c BUG_ON() Conversion in drivers/isdn BUG_ON() Conversion in drivers/char BUG_ON() Conversion in drivers/mtd/
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/epca.c3
-rw-r--r--drivers/char/ftape/lowlevel/fdc-io.c2
-rw-r--r--drivers/char/tty_io.c11
-rw-r--r--drivers/input/serio/hp_sdc_mlc.c7
-rw-r--r--drivers/isdn/hisax/hisax_fcpcipnp.c7
-rw-r--r--drivers/isdn/hisax/hisax_isac.c9
-rw-r--r--drivers/isdn/hisax/st5481_b.c4
-rw-r--r--drivers/isdn/hisax/st5481_d.c4
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c6
-rw-r--r--drivers/md/dm-path-selector.c3
-rw-r--r--drivers/md/dm-table.c6
-rw-r--r--drivers/mtd/chips/Kconfig5
-rw-r--r--drivers/mtd/maps/dilnetpc.c8
-rw-r--r--drivers/mtd/mtd_blkdevs.c3
-rw-r--r--drivers/mtd/mtdconcat.c6
-rw-r--r--drivers/s390/block/dasd_devmap.c6
16 files changed, 33 insertions, 57 deletions
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index 765c5c108bf4..9cad8501d62c 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -486,8 +486,7 @@ static void pc_close(struct tty_struct * tty, struct file * filp)
486 } /* End channel is open more than once */ 486 } /* End channel is open more than once */
487 487
488 /* Port open only once go ahead with shutdown & reset */ 488 /* Port open only once go ahead with shutdown & reset */
489 if (ch->count < 0) 489 BUG_ON(ch->count < 0);
490 BUG();
491 490
492 /* --------------------------------------------------------------- 491 /* ---------------------------------------------------------------
493 Let the rest of the driver know the channel is being closed. 492 Let the rest of the driver know the channel is being closed.
diff --git a/drivers/char/ftape/lowlevel/fdc-io.c b/drivers/char/ftape/lowlevel/fdc-io.c
index b2e0928e8428..093fdf98b19a 100644
--- a/drivers/char/ftape/lowlevel/fdc-io.c
+++ b/drivers/char/ftape/lowlevel/fdc-io.c
@@ -607,7 +607,7 @@ void fdc_reset(void)
607 607
608 fdc_mode = fdc_idle; 608 fdc_mode = fdc_idle;
609 609
610 /* maybe the cli()/sti() pair is not necessary, BUT: 610 /* maybe the spin_lock_irq* pair is not necessary, BUT:
611 * the following line MUST be here. Otherwise fdc_interrupt_wait() 611 * the following line MUST be here. Otherwise fdc_interrupt_wait()
612 * won't wait. Note that fdc_reset() is called from 612 * won't wait. Note that fdc_reset() is called from
613 * ftape_dumb_stop() when the fdc is busy transferring data. In this 613 * ftape_dumb_stop() when the fdc is busy transferring data. In this
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 48d795bb8c4b..811dadb9ce3e 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -543,14 +543,12 @@ void tty_ldisc_put(int disc)
543 struct tty_ldisc *ld; 543 struct tty_ldisc *ld;
544 unsigned long flags; 544 unsigned long flags;
545 545
546 if (disc < N_TTY || disc >= NR_LDISCS) 546 BUG_ON(disc < N_TTY || disc >= NR_LDISCS);
547 BUG();
548 547
549 spin_lock_irqsave(&tty_ldisc_lock, flags); 548 spin_lock_irqsave(&tty_ldisc_lock, flags);
550 ld = &tty_ldiscs[disc]; 549 ld = &tty_ldiscs[disc];
551 if(ld->refcount == 0) 550 BUG_ON(ld->refcount == 0);
552 BUG(); 551 ld->refcount--;
553 ld->refcount --;
554 module_put(ld->owner); 552 module_put(ld->owner);
555 spin_unlock_irqrestore(&tty_ldisc_lock, flags); 553 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
556} 554}
@@ -645,8 +643,7 @@ void tty_ldisc_deref(struct tty_ldisc *ld)
645{ 643{
646 unsigned long flags; 644 unsigned long flags;
647 645
648 if(ld == NULL) 646 BUG_ON(ld == NULL);
649 BUG();
650 647
651 spin_lock_irqsave(&tty_ldisc_lock, flags); 648 spin_lock_irqsave(&tty_ldisc_lock, flags);
652 if(ld->refcount == 0) 649 if(ld->refcount == 0)
diff --git a/drivers/input/serio/hp_sdc_mlc.c b/drivers/input/serio/hp_sdc_mlc.c
index 1c9426fd5205..aa4a8a4ccfdb 100644
--- a/drivers/input/serio/hp_sdc_mlc.c
+++ b/drivers/input/serio/hp_sdc_mlc.c
@@ -270,9 +270,10 @@ static void hp_sdc_mlc_out (hil_mlc *mlc) {
270 270
271 do_control: 271 do_control:
272 priv->emtestmode = mlc->opacket & HIL_CTRL_TEST; 272 priv->emtestmode = mlc->opacket & HIL_CTRL_TEST;
273 if ((mlc->opacket & (HIL_CTRL_APE | HIL_CTRL_IPF)) == HIL_CTRL_APE) { 273
274 BUG(); /* we cannot emulate this, it should not be used. */ 274 /* we cannot emulate this, it should not be used. */
275 } 275 BUG_ON((mlc->opacket & (HIL_CTRL_APE | HIL_CTRL_IPF)) == HIL_CTRL_APE);
276
276 if ((mlc->opacket & HIL_CTRL_ONLY) == HIL_CTRL_ONLY) goto control_only; 277 if ((mlc->opacket & HIL_CTRL_ONLY) == HIL_CTRL_ONLY) goto control_only;
277 if (mlc->opacket & HIL_CTRL_APE) { 278 if (mlc->opacket & HIL_CTRL_APE) {
278 BUG(); /* Should not send command/data after engaging APE */ 279 BUG(); /* Should not send command/data after engaging APE */
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
index dc7ef957e897..dbcca287ee2c 100644
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -387,8 +387,7 @@ static void hdlc_fill_fifo(struct fritz_bcs *bcs)
387 387
388 DBG(0x40, "hdlc_fill_fifo"); 388 DBG(0x40, "hdlc_fill_fifo");
389 389
390 if (skb->len == 0) 390 BUG_ON(skb->len == 0);
391 BUG();
392 391
393 bcs->ctrl.sr.cmd &= ~HDLC_CMD_XME; 392 bcs->ctrl.sr.cmd &= ~HDLC_CMD_XME;
394 if (bcs->tx_skb->len > bcs->fifo_size) { 393 if (bcs->tx_skb->len > bcs->fifo_size) {
@@ -630,9 +629,7 @@ static void fritz_b_l2l1(struct hisax_if *ifc, int pr, void *arg)
630 629
631 switch (pr) { 630 switch (pr) {
632 case PH_DATA | REQUEST: 631 case PH_DATA | REQUEST:
633 if (bcs->tx_skb) 632 BUG_ON(bcs->tx_skb);
634 BUG();
635
636 bcs->tx_skb = skb; 633 bcs->tx_skb = skb;
637 DBG_SKB(1, skb); 634 DBG_SKB(1, skb);
638 hdlc_fill_fifo(bcs); 635 hdlc_fill_fifo(bcs);
diff --git a/drivers/isdn/hisax/hisax_isac.c b/drivers/isdn/hisax/hisax_isac.c
index f4972f6c1f5d..81eac344bb03 100644
--- a/drivers/isdn/hisax/hisax_isac.c
+++ b/drivers/isdn/hisax/hisax_isac.c
@@ -476,12 +476,10 @@ static void isac_fill_fifo(struct isac *isac)
476 unsigned char cmd; 476 unsigned char cmd;
477 u_char *ptr; 477 u_char *ptr;
478 478
479 if (!isac->tx_skb) 479 BUG_ON(!isac->tx_skb);
480 BUG();
481 480
482 count = isac->tx_skb->len; 481 count = isac->tx_skb->len;
483 if (count <= 0) 482 BUG_ON(count <= 0);
484 BUG();
485 483
486 DBG(DBG_IRQ, "count %d", count); 484 DBG(DBG_IRQ, "count %d", count);
487 485
@@ -859,8 +857,7 @@ void isac_d_l2l1(struct hisax_if *hisax_d_if, int pr, void *arg)
859 dev_kfree_skb(skb); 857 dev_kfree_skb(skb);
860 break; 858 break;
861 } 859 }
862 if (isac->tx_skb) 860 BUG_ON(isac->tx_skb);
863 BUG();
864 861
865 isac->tx_skb = skb; 862 isac->tx_skb = skb;
866 isac_fill_fifo(isac); 863 isac_fill_fifo(isac);
diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c
index 657817a591fe..22fd5db18d48 100644
--- a/drivers/isdn/hisax/st5481_b.c
+++ b/drivers/isdn/hisax/st5481_b.c
@@ -356,9 +356,7 @@ void st5481_b_l2l1(struct hisax_if *ifc, int pr, void *arg)
356 356
357 switch (pr) { 357 switch (pr) {
358 case PH_DATA | REQUEST: 358 case PH_DATA | REQUEST:
359 if (bcs->b_out.tx_skb) 359 BUG_ON(bcs->b_out.tx_skb);
360 BUG();
361
362 bcs->b_out.tx_skb = skb; 360 bcs->b_out.tx_skb = skb;
363 break; 361 break;
364 case PH_ACTIVATE | REQUEST: 362 case PH_ACTIVATE | REQUEST:
diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c
index 941f7022ada1..493dc94992e5 100644
--- a/drivers/isdn/hisax/st5481_d.c
+++ b/drivers/isdn/hisax/st5481_d.c
@@ -596,9 +596,7 @@ void st5481_d_l2l1(struct hisax_if *hisax_d_if, int pr, void *arg)
596 break; 596 break;
597 case PH_DATA | REQUEST: 597 case PH_DATA | REQUEST:
598 DBG(2, "PH_DATA REQUEST len %d", skb->len); 598 DBG(2, "PH_DATA REQUEST len %d", skb->len);
599 if (adapter->d_out.tx_skb) 599 BUG_ON(adapter->d_out.tx_skb);
600 BUG();
601
602 adapter->d_out.tx_skb = skb; 600 adapter->d_out.tx_skb = skb;
603 FsmEvent(&adapter->d_out.fsm, EV_DOUT_START_XMIT, NULL); 601 FsmEvent(&adapter->d_out.fsm, EV_DOUT_START_XMIT, NULL);
604 break; 602 break;
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index b9fed8a3bcc6..a0927d1b7a0c 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -974,8 +974,7 @@ void isdn_ppp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buf
974 int slot; 974 int slot;
975 int proto; 975 int proto;
976 976
977 if (net_dev->local->master) 977 BUG_ON(net_dev->local->master); // we're called with the master device always
978 BUG(); // we're called with the master device always
979 978
980 slot = lp->ppp_slot; 979 slot = lp->ppp_slot;
981 if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { 980 if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
@@ -2527,8 +2526,7 @@ static struct sk_buff *isdn_ppp_decompress(struct sk_buff *skb,struct ippp_struc
2527 printk(KERN_DEBUG "ippp: no decompressor defined!\n"); 2526 printk(KERN_DEBUG "ippp: no decompressor defined!\n");
2528 return skb; 2527 return skb;
2529 } 2528 }
2530 if (!stat) // if we have a compressor, stat has been set as well 2529 BUG_ON(!stat); // if we have a compressor, stat has been set as well
2531 BUG();
2532 2530
2533 if((master && *proto == PPP_COMP) || (!master && *proto == PPP_COMPFRAG) ) { 2531 if((master && *proto == PPP_COMP) || (!master && *proto == PPP_COMPFRAG) ) {
2534 // compressed packets are compressed by their protocol type 2532 // compressed packets are compressed by their protocol type
diff --git a/drivers/md/dm-path-selector.c b/drivers/md/dm-path-selector.c
index a28c1c2b4ef5..f10a0c89b3f4 100644
--- a/drivers/md/dm-path-selector.c
+++ b/drivers/md/dm-path-selector.c
@@ -86,8 +86,7 @@ void dm_put_path_selector(struct path_selector_type *pst)
86 if (--psi->use == 0) 86 if (--psi->use == 0)
87 module_put(psi->pst.module); 87 module_put(psi->pst.module);
88 88
89 if (psi->use < 0) 89 BUG_ON(psi->use < 0);
90 BUG();
91 90
92out: 91out:
93 up_read(&_ps_lock); 92 up_read(&_ps_lock);
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 9b1e2f5ca630..907b08ddb783 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -352,8 +352,7 @@ static int open_dev(struct dm_dev *d, dev_t dev)
352 352
353 int r; 353 int r;
354 354
355 if (d->bdev) 355 BUG_ON(d->bdev);
356 BUG();
357 356
358 bdev = open_by_devnum(dev, d->mode); 357 bdev = open_by_devnum(dev, d->mode);
359 if (IS_ERR(bdev)) 358 if (IS_ERR(bdev))
@@ -427,8 +426,7 @@ static int __table_get_device(struct dm_table *t, struct dm_target *ti,
427 struct dm_dev *dd; 426 struct dm_dev *dd;
428 unsigned int major, minor; 427 unsigned int major, minor;
429 428
430 if (!t) 429 BUG_ON(!t);
431 BUG();
432 430
433 if (sscanf(path, "%u:%u", &major, &minor) == 2) { 431 if (sscanf(path, "%u:%u", &major, &minor) == 2) {
434 /* Extract the major/minor numbers */ 432 /* Extract the major/minor numbers */
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
index 205bb7083335..0f6bb2e625d8 100644
--- a/drivers/mtd/chips/Kconfig
+++ b/drivers/mtd/chips/Kconfig
@@ -25,9 +25,8 @@ config MTD_JEDECPROBE
25 compatible with the Common Flash Interface, but will use the common 25 compatible with the Common Flash Interface, but will use the common
26 CFI-targetted flash drivers for any chips which are identified which 26 CFI-targetted flash drivers for any chips which are identified which
27 are in fact compatible in all but the probe method. This actually 27 are in fact compatible in all but the probe method. This actually
28 covers most AMD/Fujitsu-compatible chips, and will shortly cover also 28 covers most AMD/Fujitsu-compatible chips and also non-CFI
29 non-CFI Intel chips (that code is in MTD CVS and should shortly be sent 29 Intel chips.
30 for inclusion in Linus' tree)
31 30
32config MTD_GEN_PROBE 31config MTD_GEN_PROBE
33 tristate 32 tristate
diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c
index b51c757817d8..efb221692641 100644
--- a/drivers/mtd/maps/dilnetpc.c
+++ b/drivers/mtd/maps/dilnetpc.c
@@ -218,8 +218,8 @@ static void dnp_set_vpp(struct map_info *not_used, int on)
218 { 218 {
219 if(--vpp_counter == 0) 219 if(--vpp_counter == 0)
220 setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x4); 220 setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x4);
221 else if(vpp_counter < 0) 221 else
222 BUG(); 222 BUG_ON(vpp_counter < 0);
223 } 223 }
224 spin_unlock_irq(&dnpc_spin); 224 spin_unlock_irq(&dnpc_spin);
225} 225}
@@ -240,8 +240,8 @@ static void adnp_set_vpp(struct map_info *not_used, int on)
240 { 240 {
241 if(--vpp_counter == 0) 241 if(--vpp_counter == 0)
242 setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x8); 242 setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x8);
243 else if(vpp_counter < 0) 243 else
244 BUG(); 244 BUG_ON(vpp_counter < 0);
245 } 245 }
246 spin_unlock_irq(&dnpc_spin); 246 spin_unlock_irq(&dnpc_spin);
247} 247}
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 7f3ff500b68e..840dd66ce2dc 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -450,8 +450,7 @@ int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr)
450 450
451 kfree(tr->blkcore_priv); 451 kfree(tr->blkcore_priv);
452 452
453 if (!list_empty(&tr->devs)) 453 BUG_ON(!list_empty(&tr->devs));
454 BUG();
455 return 0; 454 return 0;
456} 455}
457 456
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index b1bf8c411de7..9af840364a74 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -477,8 +477,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
477 } 477 }
478 478
479 /* must never happen since size limit has been verified above */ 479 /* must never happen since size limit has been verified above */
480 if (i >= concat->num_subdev) 480 BUG_ON(i >= concat->num_subdev);
481 BUG();
482 481
483 /* now do the erase: */ 482 /* now do the erase: */
484 err = 0; 483 err = 0;
@@ -500,8 +499,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
500 if ((err = concat_dev_erase(subdev, erase))) { 499 if ((err = concat_dev_erase(subdev, erase))) {
501 /* sanity check: should never happen since 500 /* sanity check: should never happen since
502 * block alignment has been checked above */ 501 * block alignment has been checked above */
503 if (err == -EINVAL) 502 BUG_ON(err == -EINVAL);
504 BUG();
505 if (erase->fail_addr != 0xffffffff) 503 if (erase->fail_addr != 0xffffffff)
506 instr->fail_addr = erase->fail_addr + offset; 504 instr->fail_addr = erase->fail_addr + offset;
507 break; 505 break;
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index 2f720108a7e0..c1c6f1381150 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -437,8 +437,7 @@ dasd_forget_ranges(void)
437 spin_lock(&dasd_devmap_lock); 437 spin_lock(&dasd_devmap_lock);
438 for (i = 0; i < 256; i++) { 438 for (i = 0; i < 256; i++) {
439 list_for_each_entry_safe(devmap, n, &dasd_hashlists[i], list) { 439 list_for_each_entry_safe(devmap, n, &dasd_hashlists[i], list) {
440 if (devmap->device != NULL) 440 BUG_ON(devmap->device != NULL);
441 BUG();
442 list_del(&devmap->list); 441 list_del(&devmap->list);
443 kfree(devmap); 442 kfree(devmap);
444 } 443 }
@@ -547,8 +546,7 @@ dasd_delete_device(struct dasd_device *device)
547 546
548 /* First remove device pointer from devmap. */ 547 /* First remove device pointer from devmap. */
549 devmap = dasd_find_busid(device->cdev->dev.bus_id); 548 devmap = dasd_find_busid(device->cdev->dev.bus_id);
550 if (IS_ERR(devmap)) 549 BUG_ON(IS_ERR(devmap));
551 BUG();
552 spin_lock(&dasd_devmap_lock); 550 spin_lock(&dasd_devmap_lock);
553 if (devmap->device != device) { 551 if (devmap->device != device) {
554 spin_unlock(&dasd_devmap_lock); 552 spin_unlock(&dasd_devmap_lock);