lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54CAA2CD.2050903@kernel.dk>
Date:	Thu, 29 Jan 2015 13:14:53 -0800
From:	Jens Axboe <axboe@...nel.dk>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] blk-mq: use BUG_ON()

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@...torindia.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

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ