diff mbox

mmc: block: blk-mq: fix boolreturn.cocci warnings

Message ID 20171129215424.GA998@xian (mailing list archive)
State New, archived
Headers show

Commit Message

Fengguang Wu Nov. 29, 2017, 9:54 p.m. UTC
drivers/mmc/core/block.c:2106:9-10: WARNING: return of 0/1 in function 'mmc_blk_status_error' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: 89eb3e6b5f77 ("mmc: block: blk-mq: Stop using legacy recovery")
CC: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 block.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Adrian Hunter Nov. 30, 2017, 12:02 p.m. UTC | #1
On 29/11/17 23:54, kbuild test robot wrote:
> drivers/mmc/core/block.c:2106:9-10: WARNING: return of 0/1 in function 'mmc_blk_status_error' with return type bool
> 
>  Return statements in functions returning bool should use
>  true/false instead of 1/0.
> Generated by: scripts/coccinelle/misc/boolreturn.cocci
> 
> Fixes: 89eb3e6b5f77 ("mmc: block: blk-mq: Stop using legacy recovery")
> CC: Adrian Hunter <adrian.hunter@intel.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
> 
>  block.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -2103,7 +2103,7 @@ static bool mmc_blk_status_error(struct
>  	u32 stop_err_bits;
>  
>  	if (mmc_host_is_spi(mq->card->host))
> -		return 0;
> +		return false;
>  
>  	stop_err_bits = mmc_blk_stop_err_bits(brq);
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson Nov. 30, 2017, 1:09 p.m. UTC | #2
On 29 November 2017 at 22:54, kbuild test robot <fengguang.wu@intel.com> wrote:
> drivers/mmc/core/block.c:2106:9-10: WARNING: return of 0/1 in function 'mmc_blk_status_error' with return type bool
>
>  Return statements in functions returning bool should use
>  true/false instead of 1/0.
> Generated by: scripts/coccinelle/misc/boolreturn.cocci
>
> Fixes: 89eb3e6b5f77 ("mmc: block: blk-mq: Stop using legacy recovery")
> CC: Adrian Hunter <adrian.hunter@intel.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>
>  block.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -2103,7 +2103,7 @@ static bool mmc_blk_status_error(struct
>         u32 stop_err_bits;
>
>         if (mmc_host_is_spi(mq->card->host))
> -               return 0;
> +               return false;
>
>         stop_err_bits = mmc_blk_stop_err_bits(brq);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -2103,7 +2103,7 @@  static bool mmc_blk_status_error(struct
 	u32 stop_err_bits;
 
 	if (mmc_host_is_spi(mq->card->host))
-		return 0;
+		return false;
 
 	stop_err_bits = mmc_blk_stop_err_bits(brq);