提交 1ccaa1bd 编写于 作者: J Joel Stanley 提交者: Ulf Hansson

mmc: core: Fix blk_status_t handling

Sparse spits out this following warning:

drivers/mmc/core/queue.c:311:21: warning: incorrect type in assignment (different base types)
drivers/mmc/core/queue.c:311:21:    expected int ret
drivers/mmc/core/queue.c:311:21:    got restricted blk_status_t [usertype]
drivers/mmc/core/queue.c:314:21: warning: incorrect type in assignment (different base types)
drivers/mmc/core/queue.c:314:21:    expected int ret
drivers/mmc/core/queue.c:314:21:    got restricted blk_status_t [usertype]
drivers/mmc/core/queue.c:336:16: warning: incorrect type in return expression (different base types)
drivers/mmc/core/queue.c:336:16:    expected restricted blk_status_t
drivers/mmc/core/queue.c:336:16:    got int [assigned] ret

ret is only used for blk_status_t types, so make it that type.
Signed-off-by: NJoel Stanley <joel@jms.id.au>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211215011336.194089-1-joel@jms.id.auSigned-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 36240ef8
...@@ -234,7 +234,7 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx, ...@@ -234,7 +234,7 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
enum mmc_issue_type issue_type; enum mmc_issue_type issue_type;
enum mmc_issued issued; enum mmc_issued issued;
bool get_card, cqe_retune_ok; bool get_card, cqe_retune_ok;
int ret; blk_status_t ret;
if (mmc_card_removed(mq->card)) { if (mmc_card_removed(mq->card)) {
req->rq_flags |= RQF_QUIET; req->rq_flags |= RQF_QUIET;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册