[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1301160415-24569-5-git-send-email-bosong.ly@taobao.com>
Date:	Sun, 27 Mar 2011 01:26:55 +0800
From:	Coly Li <bosong.ly@...bao.com>
To:	linux-kernel@...r.kernel.org
Cc:	Coly Li <bosong.ly@...bao.com>,
	James Bottomley <James.Bottomley@...e.de>,
	linux-scsi@...r.kernel.org
Subject: [PATCH 4/4] scsi_lib.c: use BUG_ON correctly, v4
This patch makes BUG_ON() usage correct in drivers/scsi/scsi_lib.c
Cc: James Bottomley <James.Bottomley@...e.de>
Cc: linux-scsi@...r.kernel.org
Signed-off-by: Coly Li <bosong.ly@...bao.com>
---
 drivers/scsi/scsi_lib.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/drivers/scsi/scsi_lib.c
===================================================================
--- linux-2.6.orig/drivers/scsi/scsi_lib.c
+++ linux-2.6/drivers/scsi/scsi_lib.c
@@ -1033,8 +1033,8 @@ int scsi_init_io(struct scsi_cmnd *cmd,
 
 		count = blk_rq_map_integrity_sg(rq->q, rq->bio,
 						prot_sdb->table.sgl);
-		BUG_ON(unlikely(count > ivecs));
-		BUG_ON(unlikely(count > queue_max_integrity_segments(rq->q)));
+		BUG_ON(count > ivecs);
+		BUG_ON(count > queue_max_integrity_segments(rq->q));
 
 		cmd->prot_sdb = prot_sdb;
 		cmd->prot_sdb->table.nents = count;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists