From patchwork Thu Jun 4 20:03:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 241743 List-Id: U-Boot discussion From: trini at konsulko.com (Tom Rini) Date: Thu, 4 Jun 2020 16:03:55 -0400 Subject: [PATCH] mmc: omap_hsmmc: Add guards around omap_hsmmc_get_cfg() Message-ID: <20200604200355.5174-1-trini@konsulko.com> 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 Cc: Lokesh Vutla Signed-off-by: Tom Rini Reviewed-by: Peng Fan Reviewed-by: Lokesh Vutla --- 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)