Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754506AbZCJFOe (ORCPT ); Tue, 10 Mar 2009 01:14:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753435AbZCJFLp (ORCPT ); Tue, 10 Mar 2009 01:11:45 -0400 Received: from yx-out-2324.google.com ([74.125.44.28]:53984 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753255AbZCJFLi (ORCPT ); Tue, 10 Mar 2009 01:11:38 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=eI5CgWTfGCmBIpb1yaBZAfLjJqkOFyZwHrHzZ3oIzZzxkwCz3y1WyMTQ53/RsachPS 6EofdEN40kKtbcnOEurWViaQX94TtgvVTiC/702VyI5FacrT2vzqJH9Q2p30WJe4ULw2 y+u3pzo4h/+H6tkawWrtMlpv0Ye0yxBjR87Bs= From: Stoyan Gaydarov To: linux-kernel@vger.kernel.org Cc: Stoyan Gaydarov , schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, linux-s390@vger.kernel.org Subject: [PATCH 09/25] [s390] BUG to BUG_ON changes Date: Tue, 10 Mar 2009 00:10:34 -0500 Message-Id: <1236661850-8237-10-git-send-email-stoyboyker@gmail.com> X-Mailer: git-send-email 1.6.1.3 In-Reply-To: <1236661850-8237-9-git-send-email-stoyboyker@gmail.com> References: <1236661850-8237-1-git-send-email-stoyboyker@gmail.com> <1236661850-8237-2-git-send-email-stoyboyker@gmail.com> <1236661850-8237-3-git-send-email-stoyboyker@gmail.com> <1236661850-8237-4-git-send-email-stoyboyker@gmail.com> <1236661850-8237-5-git-send-email-stoyboyker@gmail.com> <1236661850-8237-6-git-send-email-stoyboyker@gmail.com> <1236661850-8237-7-git-send-email-stoyboyker@gmail.com> <1236661850-8237-8-git-send-email-stoyboyker@gmail.com> <1236661850-8237-9-git-send-email-stoyboyker@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3428 Lines: 98 Signed-off-by: Stoyan Gaydarov --- arch/s390/kernel/debug.c | 3 +-- arch/s390/kernel/setup.c | 3 +-- drivers/s390/char/tape_3590.c | 3 +-- drivers/s390/char/tape_core.c | 6 ++---- drivers/s390/char/tape_std.c | 4 ++-- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index ba03fc0..39137b9 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -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 */ diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index c5cfb61..bfbbd19 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -125,8 +125,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); } diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 71605a1..cdb5222 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c @@ -661,8 +661,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"); diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index f9bb51f..bb04f9a 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c @@ -639,8 +639,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); @@ -797,8 +796,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); diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c index 5bd573d..37c4447 100644 --- a/drivers/s390/char/tape_std.c +++ b/drivers/s390/char/tape_std.c @@ -39,8 +39,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 == NULL); DBF_EVENT(3, "%08x: Assignment timeout. Device busy.\n", device->cdev_id); -- 1.6.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/