mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blk-mq: use BUG_ON()
Date: Thu, 29 Jan 2015 13:14:53 -0800	[thread overview]
Message-ID: <54CAA2CD.2050903@kernel.dk> (raw)
In-Reply-To: <1422553582-4792-1-git-send-email-sudipm.mukherjee@gmail.com>

On 01/29/2015 09:46 AM, Sudip Mukherjee wrote:
> use BUG_ON() instead of using if(condition) BUG()
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>   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


      reply	other threads:[~2015-01-29 21:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 17:46 Sudip Mukherjee
2015-01-29 21:14 ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54CAA2CD.2050903@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome