All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: core: Fix blk_status_t handling
@ 2021-12-15  1:13 Joel Stanley
  2021-12-16  7:58 ` Christoph Hellwig
  2021-12-21 13:02 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Joel Stanley @ 2021-12-15  1:13 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-mmc

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>
---
 drivers/mmc/core/queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index b15c034b42fb..c69b2d9df6f1 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -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_issued issued;
 	bool get_card, cqe_retune_ok;
-	int ret;
+	blk_status_t ret;
 
 	if (mmc_card_removed(mq->card)) {
 		req->rq_flags |= RQF_QUIET;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: core: Fix blk_status_t handling
  2021-12-15  1:13 [PATCH] mmc: core: Fix blk_status_t handling Joel Stanley
@ 2021-12-16  7:58 ` Christoph Hellwig
  2021-12-21 13:02 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-12-16  7:58 UTC (permalink / raw)
  To: Joel Stanley; +Cc: Ulf Hansson, linux-mmc

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: core: Fix blk_status_t handling
  2021-12-15  1:13 [PATCH] mmc: core: Fix blk_status_t handling Joel Stanley
  2021-12-16  7:58 ` Christoph Hellwig
@ 2021-12-21 13:02 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2021-12-21 13:02 UTC (permalink / raw)
  To: Joel Stanley; +Cc: linux-mmc

On Wed, 15 Dec 2021 at 02:13, Joel Stanley <joel@jms.id.au> wrote:
>
> 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>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/core/queue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
> index b15c034b42fb..c69b2d9df6f1 100644
> --- a/drivers/mmc/core/queue.c
> +++ b/drivers/mmc/core/queue.c
> @@ -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_issued issued;
>         bool get_card, cqe_retune_ok;
> -       int ret;
> +       blk_status_t ret;
>
>         if (mmc_card_removed(mq->card)) {
>                 req->rq_flags |= RQF_QUIET;
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-21 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-15  1:13 [PATCH] mmc: core: Fix blk_status_t handling Joel Stanley
2021-12-16  7:58 ` Christoph Hellwig
2021-12-21 13:02 ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.