mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-pxav3: set_uhs_signaling is initialized twice differently
@ 2014-08-15  9:12 Peter Griffin
  2014-08-15  9:47 ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Griffin @ 2014-08-15  9:12 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, chris, ulf.hansson, linux-mmc,
	zhangfei.gao, prakity, rmk+kernel
  Cc: peter.griffin, patches, lee.jones

.set_uhs_signaling field is currently initialised twice once to the
arch specific callback pxav3_set_uhs_signaling, and also to the generic
sdhci_set_uhs_signaling callback.

This means that uhs is currently broken for this platform currently, as pxav3
has some special constriants which means it can't use the generic callback.

This happened in
commit 96d7b78cfc2f ("mmc: sdhci: convert sdhci_set_uhs_signaling() into a library function")
commit a702c8abb2a9 ("mmc: host: split up sdhci-pxa, create sdhci-pxav3.c")'

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 drivers/mmc/host/sdhci-pxav3.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 6f842fb..3f350ea 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -229,7 +229,6 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
 	.set_bus_width = sdhci_set_bus_width,
 	.reset = pxav3_reset,
-	.set_uhs_signaling = sdhci_set_uhs_signaling,
 };
 
 static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: sdhci-pxav3: set_uhs_signaling is initialized twice differently
  2014-08-15  9:12 [PATCH] mmc: sdhci-pxav3: set_uhs_signaling is initialized twice differently Peter Griffin
@ 2014-08-15  9:47 ` Russell King - ARM Linux
  2014-08-15 12:52   ` Peter Griffin
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2014-08-15  9:47 UTC (permalink / raw)
  To: Peter Griffin
  Cc: linux-arm-kernel, linux-kernel, chris, ulf.hansson, linux-mmc,
	zhangfei.gao, prakity, patches, lee.jones

On Fri, Aug 15, 2014 at 10:12:38AM +0100, Peter Griffin wrote:
> .set_uhs_signaling field is currently initialised twice once to the
> arch specific callback pxav3_set_uhs_signaling, and also to the generic
> sdhci_set_uhs_signaling callback.
> 
> This means that uhs is currently broken for this platform currently, as pxav3
> has some special constriants which means it can't use the generic callback.
> 
> This happened in
> commit 96d7b78cfc2f ("mmc: sdhci: convert sdhci_set_uhs_signaling() into a library function")
> commit a702c8abb2a9 ("mmc: host: split up sdhci-pxa, create sdhci-pxav3.c")'

This is exactly why named initialisers should always follow the
declaration order in the structure definition.

It also helps avoid git merge to properly resolve two additions of
the same member (possibly with a conflict) rather than just adding
both.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: sdhci-pxav3: set_uhs_signaling is initialized twice differently
  2014-08-15  9:47 ` Russell King - ARM Linux
@ 2014-08-15 12:52   ` Peter Griffin
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Griffin @ 2014-08-15 12:52 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: linux-arm-kernel, linux-kernel, chris, ulf.hansson, linux-mmc,
	zhangfei.gao, prakity, patches, lee.jones

Hi Russell,

> > This happened in
> > commit 96d7b78cfc2f ("mmc: sdhci: convert sdhci_set_uhs_signaling() into a library function")
> > commit a702c8abb2a9 ("mmc: host: split up sdhci-pxa, create sdhci-pxav3.c")'
> 
> This is exactly why named initialisers should always follow the
> declaration order in the structure definition.
> 
> It also helps avoid git merge to properly resolve two additions of
> the same member (possibly with a conflict) rather than just adding
> both.

Ah yes that makes a lot of sense. I will send a V2 in a moment, as the line I
removed now means that it's not in order with the structure definition.

regards,

Peter.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-15 12:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-15  9:12 [PATCH] mmc: sdhci-pxav3: set_uhs_signaling is initialized twice differently Peter Griffin
2014-08-15  9:47 ` Russell King - ARM Linux
2014-08-15 12:52   ` Peter Griffin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®