From: cgel.zte@gmail.com
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Zhang Mingyu <zhang.mingyu@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH] blk-mq:Use BUG_ON instead of if condition followed by BUG.
Date: Thu, 11 Nov 2021 10:37:22 +0000 [thread overview]
Message-ID: <20211111103722.1650-1-zhang.mingyu@zte.com.cn> (raw)
From: Zhang Mingyu <zhang.mingyu@zte.com.cn>
This issue was detected with the help of Coccinelle.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
---
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 7c5c8a26c8fc..05bffbc6b8ff 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -818,8 +818,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.25.1
next reply other threads:[~2021-11-11 10:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 10:37 cgel.zte [this message]
2021-11-12 6:35 ` Christoph Hellwig
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=20211111103722.1650-1-zhang.mingyu@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zealci@zte.com.cn \
--cc=zhang.mingyu@zte.com.cn \
/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
all inboxes | Powered by JetHome®