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: 1303713 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=konsulko.com Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49dGvG4jNmz9sSF for ; Fri, 5 Jun 2020 06:04:10 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 821CE813B3; Thu, 4 Jun 2020 22:04:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C66A6813D4; Thu, 4 Jun 2020 22:04:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SUBJ_OBFU_PUNCT_FEW,SUBJ_OBFU_PUNCT_MANY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0BCF0813B3 for ; Thu, 4 Jun 2020 22:04:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qk1-f194.google.com with SMTP id c14so7437248qka.11 for ; Thu, 04 Jun 2020 13:03:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=r9QzDfGtXJ33Ec7+gcpwyaXnzOYYZ5ngnSOdF7zaMuo=; b=FnnI2Yzh3XKcnTniHSEFsbXoKeXyIlbjRt/cq2Kd7pmnYK2F7Sa7RYOWsAKCW+1t3B PeQoMeLXZrToDyzrPVEUaV3C/itcfPPHdQRhJFaUiD0HWmGbPftdvTnhcaiakrssZfPp vQqjaLeRi+6hk567y0TVLBkJFD0IINxAsbcb4ZGU2Hi2M89c6zgCuDlKzUKv2mj/ls1v 6Y/N3f2t0F5WASKyr8Vdooy8CRaj0Vr6nHBsD8K0SMXxlFiF6G769+jm2km1cjshqKUH WZPM5XFMZGUOgXki6CBmI5LVNyJGXplZvoYLqJ9yQt5o1W/jdR4PV1yrVAfeLuhz6tui qYqw== X-Gm-Message-State: AOAM533MSWrrc/XFh0L3XtKcEIxc4EdEdoRUueW25IoA+cJyjJUK0EQj eqMTp9YoyznGPZ4q2VKrsDdt5R2+Xg== X-Google-Smtp-Source: ABdhPJxVMcAC2B/1HUbJe8fMybGBH3+ptA1WV0YD5BzA2IvQidsb1hXTul3AA5NLkUbluaMDzXJlZA== X-Received: by 2002:a37:554:: with SMTP id 81mr6561055qkf.394.1591301038599; Thu, 04 Jun 2020 13:03:58 -0700 (PDT) Received: from bill-the-cat.local (2606-a000-1401-826f-79c7-9e70-bb1f-ea59.inf6.spectrum.com. [2606:a000:1401:826f:79c7:9e70:bb1f:ea59]) by smtp.gmail.com with ESMTPSA id m126sm4812569qke.99.2020.06.04.13.03.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 13:03:58 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Peng Fan , Lokesh Vutla Subject: [PATCH] mmc: omap_hsmmc: Add guards around omap_hsmmc_get_cfg() Date: Thu, 4 Jun 2020 16:03:55 -0400 Message-Id: <20200604200355.5174-1-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean 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)