Skip to content

Commit 1ccaa1b

Browse files
shenkiUlf Hansson
authored andcommitted
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: Joel Stanley <joel@jms.id.au> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20211215011336.194089-1-joel@jms.id.au Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 36240ef commit 1ccaa1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/mmc/core/queue.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
234234
enum mmc_issue_type issue_type;
235235
enum mmc_issued issued;
236236
bool get_card, cqe_retune_ok;
237-
int ret;
237+
blk_status_t ret;
238238

239239
if (mmc_card_removed(mq->card)) {
240240
req->rq_flags |= RQF_QUIET;

0 commit comments

Comments
 (0)