lkml.org 
[lkml]   [2011]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] scsi_lib.c: use BUG_ON correctly, v4
Date
This patch makes BUG_ON() usage correct in drivers/scsi/scsi_lib.c

Cc: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Coly Li <bosong.ly@taobao.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;

\
 
 \ /
  Last update: 2011-03-26 18:11    [W:0.067 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site