[S390] BUG to BUG_ON changes
authorStoyan Gaydarov <stoyboyker@gmail.com>
Thu, 26 Mar 2009 14:24:47 +0000 (15:24 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 26 Mar 2009 14:24:28 +0000 (15:24 +0100)
Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/debug.c
arch/s390/kernel/setup.c
drivers/s390/char/tape_3590.c
drivers/s390/char/tape_core.c
drivers/s390/char/tape_std.c

index ba03fc0a3a569777fc3b1936cbe6f54d254d6e34..39137b9e1622c1b6855d2fac1127253c357c10d0 100644 (file)
@@ -698,8 +698,7 @@ debug_info_t *debug_register_mode(const char *name, int pages_per_area,
        if ((uid != 0) || (gid != 0))
                pr_warning("Root becomes the owner of all s390dbf files "
                           "in sysfs\n");
-       if (!initialized)
-               BUG();
+       BUG_ON(!initialized);
        mutex_lock(&debug_mutex);
 
         /* create new debug_info */
index 46fc981e02ba1d933bf0e5da712608849e6924a9..580abb53ce83afeb06871a195a2b4041fb6af405 100644 (file)
@@ -134,8 +134,7 @@ void __cpuinit cpu_init(void)
 
        atomic_inc(&init_mm.mm_count);
        current->active_mm = &init_mm;
-        if (current->mm)
-                BUG();
+       BUG_ON(current->mm);
         enter_lazy_tlb(&init_mm, current);
 }
 
index 5a5bb97a081a4b63f06829ec24aa232d9e5e7ce0..fc1d91294143192dbc57a8f12d3bfe9e1b6aeed7 100644 (file)
@@ -664,8 +664,7 @@ tape_3590_bread(struct tape_device *device, struct request *req)
                        ccw++;
                        dst += TAPEBLOCK_HSEC_SIZE;
                }
-               if (off > bv->bv_len)
-                       BUG();
+               BUG_ON(off > bv->bv_len);
        }
        ccw = tape_ccw_end(ccw, NOP, 0, NULL);
        DBF_EVENT(6, "xBREDccwg\n");
index 1b6a244124656b11b7ea33832791811f62dafbf1..08c09d3503cfd5857de8b205d7f561a86f76dada 100644 (file)
@@ -624,8 +624,7 @@ tape_alloc_request(int cplength, int datasize)
 {
        struct tape_request *request;
 
-       if (datasize > PAGE_SIZE || (cplength*sizeof(struct ccw1)) > PAGE_SIZE)
-               BUG();
+       BUG_ON(datasize > PAGE_SIZE || (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
 
        DBF_LH(6, "tape_alloc_request(%d, %d)\n", cplength, datasize);
 
@@ -782,8 +781,7 @@ static void tape_long_busy_timeout(unsigned long data)
        device = (struct tape_device *) data;
        spin_lock_irq(get_ccwdev_lock(device->cdev));
        request = list_entry(device->req_queue.next, struct tape_request, list);
-       if (request->status != TAPE_REQUEST_LONG_BUSY)
-               BUG();
+       BUG_ON(request->status != TAPE_REQUEST_LONG_BUSY);
        DBF_LH(6, "%08x: Long busy timeout.\n", device->cdev_id);
        __tape_start_next_request(device);
        device->lb_timeout.data = (unsigned long) tape_put_device(device);
index 44dd0f80c847b77dd702511a24f0b731eb7c61db..1a9420ba518d66cb767bba6d1b9d0e8cd4d3dc7b 100644 (file)
@@ -37,8 +37,8 @@ tape_std_assign_timeout(unsigned long data)
        int rc;
 
        request = (struct tape_request *) data;
-       if ((device = request->device) == NULL)
-               BUG();
+       device = request->device;
+       BUG_ON(!device);
 
        DBF_EVENT(3, "%08x: Assignment timeout. Device busy.\n",
                        device->cdev_id);