[PATCH -next] blk-mq: Use BUG_ON() instead of BUG()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes coccicheck warning:

 block/blk-mq.c:546:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.

Fixes: 63151a449eba ("blk-mq: allow drivers to hook into I/O completion")
Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Zou Wei <zou_wei@xxxxxxxxxx>
---
 block/blk-mq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index bcc3a23..49a227e 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -542,8 +542,7 @@ EXPORT_SYMBOL(__blk_mq_end_request);
 
 void blk_mq_end_request(struct request *rq, blk_status_t error)
 {
-	if (blk_update_request(rq, error, blk_rq_bytes(rq)))
-		BUG();
+	BUG_ON(blk_update_request(rq, error, blk_rq_bytes(rq)));
 	__blk_mq_end_request(rq, error);
 }
 EXPORT_SYMBOL(blk_mq_end_request);
-- 
2.6.2




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux