public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] fsl_*_serdes.c: Modify memset call in serdes_init
Date: Sat, 28 Nov 2015 08:04:41 -0500	[thread overview]
Message-ID: <1448715883-14099-2-git-send-email-trini@konsulko.com> (raw)
In-Reply-To: <1448715883-14099-1-git-send-email-trini@konsulko.com>

GCC 5.x does not like sizeof(array_variable) and errors out.  Change these
calls to be instead sizeof(u8) (as that's what serdes_prtcl_map is) *
SERDES_PRCTL_COUNT (the number of array elements).

Cc: York Sun <yorksun@freescale.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c | 2 +-
 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c | 2 +-
 arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
index f7178d1..fe3444a 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_serdes.c
@@ -86,7 +86,7 @@ void serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, u32 sd_prctl_shift,
 	u32 cfg;
 	int lane;
 
-	memset(serdes_prtcl_map, 0, sizeof(serdes_prtcl_map));
+	memset(serdes_prtcl_map, 0, sizeof(u8) * SERDES_PRCTL_COUNT);
 
 	cfg = gur_in32(&gur->rcwsr[4]) & sd_prctl_mask;
 	cfg >>= sd_prctl_shift;
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
index 2ab8da6..4f6b601 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
@@ -74,7 +74,7 @@ void serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, u32 sd_prctl_shift,
 	u32 cfg;
 	int lane;
 
-	memset(serdes_prtcl_map, 0, sizeof(serdes_prtcl_map));
+	memset(serdes_prtcl_map, 0, sizeof(u8) * SERDES_PRCTL_COUNT);
 
 	cfg = gur_in32(&gur->rcwsr[28]) & sd_prctl_mask;
 	cfg >>= sd_prctl_shift;
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
index acb1353..b439b5b 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
@@ -184,7 +184,7 @@ void serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, u32 sd_prctl_shift,
 	u32 cfg;
 	int lane;
 
-	memset(serdes_prtcl_map, 0, sizeof(serdes_prtcl_map));
+	memset(serdes_prtcl_map, 0, sizeof(u8) * SERDES_PRCTL_COUNT);
 #ifdef CONFIG_SYS_FSL_ERRATUM_A007186
 	struct ccsr_sfp_regs  __iomem *sfp_regs =
 			(struct ccsr_sfp_regs __iomem *)(CONFIG_SYS_SFP_ADDR);
-- 
2.6.2

  reply	other threads:[~2015-11-28 13:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-28 13:04 [U-Boot] [PATCH 1/4] eth-raw-os.c: Add cast to bind(2) call Tom Rini
2015-11-28 13:04 ` Tom Rini [this message]
2015-11-29  9:34   ` [U-Boot] [PATCH 2/4] fsl_*_serdes.c: Modify memset call in serdes_init Bin Meng
2015-12-15  0:51   ` York Sun
2015-11-28 13:04 ` [U-Boot] [PATCH 3/4] qbman_portal.c: Update BUG_ON() call in qbman_swp_mc_submit Tom Rini
2015-11-29  9:34   ` Bin Meng
2015-12-15  0:52   ` York Sun
2015-11-28 13:04 ` [U-Boot] [PATCH 4/4] arch/arm/cpu/arm920t/ep93xx/led.c: Mark inline functions as static inline Tom Rini
2015-11-29  9:34   ` Bin Meng
2015-12-06 22:07   ` [U-Boot] [U-Boot, " Tom Rini
2015-11-29  9:34 ` [U-Boot] [PATCH 1/4] eth-raw-os.c: Add cast to bind(2) call Bin Meng
2015-11-30 22:13 ` Joe Hershberger
2016-01-15  3:45   ` Bin Meng
2016-01-15 12:28     ` Tom Rini
2016-01-15 13:10 ` [U-Boot] [U-Boot,1/4] " Tom Rini

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=1448715883-14099-2-git-send-email-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox