Skip to contentSkip to conversation

mmc: sdhci-of-esdhc: fix building error

PATCH New Dong Aisheng 3 participants 3 messages Sep 27, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: sdhci-of-esdhc: fix building error

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git mmc-next
head:   53279906cf17c2b6138c70f41ec8f2da53cea65f
commit: d31fc00a71b4f3a52d23c5a995ccd63e50a2c877 [36/41] mmc: sdhci-esdhc: move common esdhc_set_clock to platform driver
config: make ARCH=powerpc allmodconfig

All error/warnings:

drivers/mmc/host/sdhci-of-esdhc.c: In function 'esdhc_of_set_clock':

Quoted 1 line
Quoted 1 line

drivers/mmc/host/sdhci-of-esdhc.c:229:179: error: 'host_clock' undeclared (first use in this function)

     dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",
                                                                                                                                                                                      ^

drivers/mmc/host/sdhci-of-esdhc.c:229:179: note: each undeclared identifier is reported only once for each function it appears in

vim +/host_clock +229 drivers/mmc/host/sdhci-of-esdhc.c

223 while (host->max_clk / pre_div / 16 > clock && pre_div < 256)
224 pre_div *= 2;
225
226 while (host->max_clk / pre_div / div > clock && div < 16)
227 div++;
228

Quoted 1 line

229 dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",

230 clock, host_clock / pre_div / div);
231
232 pre_div >>= 1;

---
 drivers/mmc/host/sdhci-of-esdhc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci-of-esdhc.c +1 -1
index b1605a1..0b24997 100644
@@ -227,7 +227,7 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
 		div++;
 
 	dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",
-		clock, host_clock / pre_div / div);
+		clock, host->max_clk / pre_div / div);
 
 	pre_div >>= 1;
 	div--;
Signature · 1 line
1.7.2.rc3
#1 lore raw

PATCH 1/1 mmc: sdhci-of-esdhc: fix building error

Quoted 21 lines · Dong Aisheng
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git mmc-next
head:   53279906cf17c2b6138c70f41ec8f2da53cea65f
commit: d31fc00a71b4f3a52d23c5a995ccd63e50a2c877 [36/41] mmc: sdhci-esdhc: move common esdhc_set_clock to platform driver
config: make ARCH=powerpc allmodconfig

All error/warnings:

drivers/mmc/host/sdhci-of-esdhc.c: In function 'esdhc_of_set_clock':

Quoted 1 line
Quoted 1 line

drivers/mmc/host/sdhci-of-esdhc.c:229:179: error: 'host_clock' undeclared (first use in this function)

     dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",
                                                                                                                                                                                      ^

drivers/mmc/host/sdhci-of-esdhc.c:229:179: note: each undeclared identifier is reported only once for each function it appears in

vim +/host_clock +229 drivers/mmc/host/sdhci-of-esdhc.c

   223          while (host->max_clk / pre_div / 16 > clock && pre_div < 256)
   224                  pre_div *= 2;
   225
   226          while (host->max_clk / pre_div / div > clock && div < 16)
   227                  div++;
   228
Quoted 6 lines
Quoted 1 line

229 dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",

   230                  clock, host_clock / pre_div / div);
   231
   232          pre_div >>= 1;

I just compile-tested it with powerpc toolchain, so

Hi Chris,

It's your call to apply it as a fix patch or amend it to the offending one. We're fine with either way.

Shawn

Quoted 21 lines
---
 drivers/mmc/host/sdhci-of-esdhc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci-of-esdhc.c +1 -1
index b1605a1..0b24997 100644
@@ -227,7 +227,7 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
 		div++;
 
 	dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",
-		clock, host_clock / pre_div / div);
+		clock, host->max_clk / pre_div / div);
 
 	pre_div >>= 1;
 	div--;
Signature · 1 line
1.7.2.rc3
#2 lore raw

PATCH 1/1 mmc: sdhci-of-esdhc: fix building error

Hi,

Quoted 8 lines · Shawn Guo

I just compile-tested it with powerpc toolchain, so

Hi Chris,

It's your call to apply it as a fix patch or amend it to the offending one. We're fine with either way.

Thanks, I've amended and pushed out to mmc-next now.

- Chris.

Signature · 1 line
Chris Ball   <[email protected]>   <http://printf.net/>