diff mbox series

[U-Boot] mmc: relocate code comment

Message ID 51492bf693ffd93e16c81c12ebce7bad36236331.1563799932.git.baruch@tkos.co.il
State Accepted
Commit fea3939d31ccde5b8372bc5506a35ac169de03c8
Delegated to: Peng Fan
Headers show
Series [U-Boot] mmc: relocate code comment | expand

Commit Message

Baruch Siach July 22, 2019, 12:52 p.m. UTC
The comment about init op being NULL used to be next to the NULL check
code. Commit 8ca51e51c182 ("dm: mmc: Add a way to use driver model for
MMC operations") separated the comment from the code. Put them back
together.

Fixes: 8ca51e51c182 ("dm: mmc: Add a way to use driver model for MMC operations")
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/mmc/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peng Fan July 23, 2019, 7:54 a.m. UTC | #1
> Subject: [PATCH] mmc: relocate code comment
> 
> The comment about init op being NULL used to be next to the NULL check
> code. Commit 8ca51e51c182 ("dm: mmc: Add a way to use driver model for
> MMC operations") separated the comment from the code. Put them back
> together.
> 
> Fixes: 8ca51e51c182 ("dm: mmc: Add a way to use driver model for MMC
> operations")
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  drivers/mmc/mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index
> c9aa13b409ac..eecc7d687e32 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -2819,12 +2819,12 @@ int mmc_start_init(struct mmc *mmc)
>  			 MMC_CAP(MMC_LEGACY) | MMC_MODE_1BIT;
> 
>  #if !defined(CONFIG_MMC_BROKEN_CD)
> -	/* we pretend there's no card when init is NULL */
>  	no_card = mmc_getcd(mmc) == 0;
>  #else
>  	no_card = 0;
>  #endif
>  #if !CONFIG_IS_ENABLED(DM_MMC)
> +	/* we pretend there's no card when init is NULL */
>  	no_card = no_card || (mmc->cfg->ops->init == NULL);  #endif
>  	if (no_card) {

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.20.1
diff mbox series

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index c9aa13b409ac..eecc7d687e32 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2819,12 +2819,12 @@  int mmc_start_init(struct mmc *mmc)
 			 MMC_CAP(MMC_LEGACY) | MMC_MODE_1BIT;
 
 #if !defined(CONFIG_MMC_BROKEN_CD)
-	/* we pretend there's no card when init is NULL */
 	no_card = mmc_getcd(mmc) == 0;
 #else
 	no_card = 0;
 #endif
 #if !CONFIG_IS_ENABLED(DM_MMC)
+	/* we pretend there's no card when init is NULL */
 	no_card = no_card || (mmc->cfg->ops->init == NULL);
 #endif
 	if (no_card) {