All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Andrew Jeffery <andrew@aj.id.au>,
	Baolin Wang <baolin.wang@linaro.org>,
	Chunyan Zhang <zhang.chunyan@linaro.org>,
	Faiz Abbas <faiz_abbas@ti.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Takao Orito <orito.takao@socionext.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	YueHaibing <yuehaibing@huawei.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] mmc: sdhci-of-at91: make MMC_SDHCI_OF_AT91 depend on HAVE_CLK
Date: Thu, 23 Apr 2020 00:34:01 +0900	[thread overview]
Message-ID: <20200422153401.7913-1-yamada.masahiro@socionext.com> (raw)

If sdhci-of-at91.c is compiled without CONFIG_HAVE_CLK, the line

  caps1 |= FIELD_PREP(SDHCI_CLOCK_MUL_MASK, clk_mul);

... emits "FIELD_PREP: value too large for the field" warning.

The compiler seems to decide clk_mul is constant (unsigned int)-1,
because clk_get_rate() returns 0 when CONFIG_HAVE_CLK is disabled.

Add HAVE_CLK to the depenency since this driver does not work without
the clock APIs anyway.

Link: https://lkml.org/lkml/2020/4/17/613
Fixes: linux-next ("mmc: sdhci: use FIELD_GET/PREP for capabilities bit masks")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Ulf,

I do not know how to fill the Fixes tag.
It is currently 8da1ff4f68a2 in linux-next, but I am not sure it is
stable. I just added 'linux-next'.

If you have a preferred way, please modify it.





 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 462b5352fea7..2aee844722d6 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -171,7 +171,7 @@ config MMC_SDHCI_OF_ASPEED
 config MMC_SDHCI_OF_AT91
 	tristate "SDHCI OF support for the Atmel SDMMC controller"
 	depends on MMC_SDHCI_PLTFM
-	depends on OF
+	depends on OF && HAVE_CLK
 	help
 	  This selects the Atmel SDMMC driver
 
-- 
2.25.1


             reply	other threads:[~2020-04-22 15:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 15:34 Masahiro Yamada [this message]
2020-04-22 16:04 ` [PATCH] mmc: sdhci-of-at91: make MMC_SDHCI_OF_AT91 depend on HAVE_CLK Ulf Hansson
2020-04-22 16:33 ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200422153401.7913-1-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=adrian.hunter@intel.com \
    --cc=andrew@aj.id.au \
    --cc=baolin.wang@linaro.org \
    --cc=faiz_abbas@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=orito.takao@socionext.com \
    --cc=rdunlap@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=ulf.hansson@linaro.org \
    --cc=yuehaibing@huawei.com \
    --cc=zhang.chunyan@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.