diff mbox series

mmc: omap_hsmmc: Add guards around omap_hsmmc_get_cfg()

Message ID 20200604200355.5174-1-trini@konsulko.com
State Accepted
Commit 2af17e2573e8f4b949658ac45cad2e825e5aedc0
Headers show
Series mmc: omap_hsmmc: Add guards around omap_hsmmc_get_cfg() | expand

Commit Message

Tom Rini June 4, 2020, 8:03 p.m. UTC
We only call the function omap_hsmmc_get_cfg in the case of OMAP34XX or
when we have to iodelay recalibration.  Add guards for these checks as
clang will otherwise warn.

Cc: Peng Fan <peng.fan at nxp.com>
Cc: Lokesh Vutla <lokeshvutla at ti.com>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
Aside, Lokesh, can you please add drivers/mmc/omap_hsmmc.c to the
general TI entry MAINTAINERS entry?  Thanks!
---
 drivers/mmc/omap_hsmmc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Peng Fan June 5, 2020, 1:29 a.m. UTC | #1
> Subject: [PATCH] mmc: omap_hsmmc: Add guards around
> omap_hsmmc_get_cfg()
> 
> We only call the function omap_hsmmc_get_cfg in the case of OMAP34XX or
> when we have to iodelay recalibration.  Add guards for these checks as clang
> will otherwise warn.
> 
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Lokesh Vutla <lokeshvutla at ti.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Aside, Lokesh, can you please add drivers/mmc/omap_hsmmc.c to the
> general TI entry MAINTAINERS entry?  Thanks!
> ---
>  drivers/mmc/omap_hsmmc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
> index 8636cd713a36..0e05fe4cfcbb 100644
> --- a/drivers/mmc/omap_hsmmc.c
> +++ b/drivers/mmc/omap_hsmmc.c
> @@ -175,6 +175,8 @@ static inline struct omap_hsmmc_data
> *omap_hsmmc_get_data(struct mmc *mmc)
>  	return (struct omap_hsmmc_data *)mmc->priv;  #endif  }
> +
> +#if defined(CONFIG_OMAP34XX) ||
> defined(CONFIG_IODELAY_RECALIBRATION)
>  static inline struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc)
> {  #if CONFIG_IS_ENABLED(DM_MMC) @@ -184,6 +186,7 @@ static inline
> struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc)
>  	return &((struct omap_hsmmc_data *)mmc->priv)->cfg;  #endif  }
> +#endif
> 
>  #if defined(OMAP_HSMMC_USE_GPIO)
> && !CONFIG_IS_ENABLED(DM_MMC)  static int
> omap_mmc_setup_gpio_in(int gpio, const char *label)
> --
> 2.17.1

Reviewed-by: Peng Fan <peng.fan at nxp.com>
Lokesh Vutla June 5, 2020, 4:46 a.m. UTC | #2
On 05/06/20 1:33 am, Tom Rini wrote:
> We only call the function omap_hsmmc_get_cfg in the case of OMAP34XX or
> when we have to iodelay recalibration.  Add guards for these checks as
> clang will otherwise warn.
> 
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Lokesh Vutla <lokeshvutla at ti.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>

Reviewed-by: Lokesh Vutla <lokeshvutla at ti.com>

> ---
> Aside, Lokesh, can you please add drivers/mmc/omap_hsmmc.c to the
> general TI entry MAINTAINERS entry?  Thanks!

We have a subsystem maintainer for MMC. IIUC, all the patches should go through
subsystem if one is available, so I intentionally did not add omap_hsmmc under
TI. Is my understanding wrong?

Thanks and regards,
Lokesh
Tom Rini June 5, 2020, 12:30 p.m. UTC | #3
On Fri, Jun 05, 2020 at 10:16:53AM +0530, Lokesh Vutla wrote:
> 
> 
> On 05/06/20 1:33 am, Tom Rini wrote:
> > We only call the function omap_hsmmc_get_cfg in the case of OMAP34XX or
> > when we have to iodelay recalibration.  Add guards for these checks as
> > clang will otherwise warn.
> > 
> > Cc: Peng Fan <peng.fan at nxp.com>
> > Cc: Lokesh Vutla <lokeshvutla at ti.com>
> > Signed-off-by: Tom Rini <trini at konsulko.com>
> 
> Reviewed-by: Lokesh Vutla <lokeshvutla at ti.com>
> 
> > ---
> > Aside, Lokesh, can you please add drivers/mmc/omap_hsmmc.c to the
> > general TI entry MAINTAINERS entry?  Thanks!
> 
> We have a subsystem maintainer for MMC. IIUC, all the patches should go through
> subsystem if one is available, so I intentionally did not add omap_hsmmc under
> TI. Is my understanding wrong?

Yes.  While there is a subsystem maintainer, they aren't going to know
the IP-block quirks as well as the custodian for a given SoC, so
individual drivers should be listed under the SoC/arch entry as well.
get_maintainers.pl will list both when queried.  Thanks!
Lokesh Vutla June 18, 2020, 1:52 p.m. UTC | #4
On 05/06/20 1:33 am, Tom Rini wrote:
> We only call the function omap_hsmmc_get_cfg in the case of OMAP34XX or
> when we have to iodelay recalibration.  Add guards for these checks as
> clang will otherwise warn.
> 
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Lokesh Vutla <lokeshvutla at ti.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>

Applied to u-boot-ti next.

Thanks and regards,
Lokesh
diff mbox series

Patch

diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 8636cd713a36..0e05fe4cfcbb 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -175,6 +175,8 @@  static inline struct omap_hsmmc_data *omap_hsmmc_get_data(struct mmc *mmc)
 	return (struct omap_hsmmc_data *)mmc->priv;
 #endif
 }
+
+#if defined(CONFIG_OMAP34XX) || defined(CONFIG_IODELAY_RECALIBRATION)
 static inline struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc)
 {
 #if CONFIG_IS_ENABLED(DM_MMC)
@@ -184,6 +186,7 @@  static inline struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc)
 	return &((struct omap_hsmmc_data *)mmc->priv)->cfg;
 #endif
 }
+#endif
 
 #if defined(OMAP_HSMMC_USE_GPIO) && !CONFIG_IS_ENABLED(DM_MMC)
 static int omap_mmc_setup_gpio_in(int gpio, const char *label)