All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: am654_sdhci: Use MMC_MODES_END value instead of hardcoded value
@ 2020-07-29  1:33 Faiz Abbas
  2020-07-29  2:08 ` Peng Fan
  2020-08-11 10:37 ` Lokesh Vutla
  0 siblings, 2 replies; 3+ messages in thread
From: Faiz Abbas @ 2020-07-29  1:33 UTC (permalink / raw)
  To: u-boot

The hardcoded array size leads to array overflows with changes in
speed modes enum in mmc core. Use MMC_MODES_END for otap_del_sel
array declaration to fix this.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
 drivers/mmc/am654_sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index cbc531dc53..82abf484e4 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -75,7 +75,7 @@ struct am654_sdhci_plat {
 	struct mmc mmc;
 	struct regmap *base;
 	bool non_removable;
-	u32 otap_del_sel[11];
+	u32 otap_del_sel[MMC_MODES_END];
 	u32 trm_icp;
 	u32 drv_strength;
 	u32 strb_sel;
-- 
2.17.1

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

* [PATCH] mmc: am654_sdhci: Use MMC_MODES_END value instead of hardcoded value
  2020-07-29  1:33 [PATCH] mmc: am654_sdhci: Use MMC_MODES_END value instead of hardcoded value Faiz Abbas
@ 2020-07-29  2:08 ` Peng Fan
  2020-08-11 10:37 ` Lokesh Vutla
  1 sibling, 0 replies; 3+ messages in thread
From: Peng Fan @ 2020-07-29  2:08 UTC (permalink / raw)
  To: u-boot

> Subject: [PATCH] mmc: am654_sdhci: Use MMC_MODES_END value instead
> of hardcoded value
> 
> The hardcoded array size leads to array overflows with changes in speed
> modes enum in mmc core. Use MMC_MODES_END for otap_del_sel array
> declaration to fix this.
> 
> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
> ---
>  drivers/mmc/am654_sdhci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c index
> cbc531dc53..82abf484e4 100644
> --- a/drivers/mmc/am654_sdhci.c
> +++ b/drivers/mmc/am654_sdhci.c
> @@ -75,7 +75,7 @@ struct am654_sdhci_plat {
>  	struct mmc mmc;
>  	struct regmap *base;
>  	bool non_removable;
> -	u32 otap_del_sel[11];
> +	u32 otap_del_sel[MMC_MODES_END];
>  	u32 trm_icp;
>  	u32 drv_strength;
>  	u32 strb_sel;

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.17.1

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

* [PATCH] mmc: am654_sdhci: Use MMC_MODES_END value instead of hardcoded value
  2020-07-29  1:33 [PATCH] mmc: am654_sdhci: Use MMC_MODES_END value instead of hardcoded value Faiz Abbas
  2020-07-29  2:08 ` Peng Fan
@ 2020-08-11 10:37 ` Lokesh Vutla
  1 sibling, 0 replies; 3+ messages in thread
From: Lokesh Vutla @ 2020-08-11 10:37 UTC (permalink / raw)
  To: u-boot



On 29/07/20 7:03 am, Faiz Abbas wrote:
> The hardcoded array size leads to array overflows with changes in
> speed modes enum in mmc core. Use MMC_MODES_END for otap_del_sel
> array declaration to fix this.
> 
> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>

Applied to u-boot-ti

Thanks and regards,
Lokesh

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

end of thread, other threads:[~2020-08-11 10:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29  1:33 [PATCH] mmc: am654_sdhci: Use MMC_MODES_END value instead of hardcoded value Faiz Abbas
2020-07-29  2:08 ` Peng Fan
2020-08-11 10:37 ` Lokesh Vutla

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.