On 01/29/2015 09:46 AM, Sudip Mukherjee wrote:
use BUG_ON() instead of using if(condition) BUG()

Signed-off-by: Sudip Mukherjee <[email protected]>
---
  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 8107962..d8f0922 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -337,8 +337,7 @@ EXPORT_SYMBOL(__blk_mq_end_request);

  void blk_mq_end_request(struct request *rq, int 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);

This makes it less readable than it was before, so no.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to