Skip to contentSkip to conversation

dm: net: Fixup the armada100 FEC driver

PATCH New Marek Vasut 3 participants 8 messages Jul 27, 2012 – Sep 28, 2012 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: net: Fixup the armada100 FEC driver

Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function ?armdfec_send?:
armada100_fec.c:589:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Cc Joe Hershberger <[email protected]>
---
 drivers/net/armada100_fec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/armada100_fec.c +3 -2
index d318a36..ed7cf20 100644
@@ -565,7 +565,7 @@ static int armdfec_send(struct eth_device *dev, void *dataptr, int datasize)
 	struct tx_desc *p_txdesc = darmdfec->p_txdesc;
 	void *p = (void *)dataptr;
 	int retry = PHY_WAIT_ITERATIONS * PHY_WAIT_MICRO_SECONDS;
-	u32 cmd_sts;
+	u32 cmd_sts, temp;
 
 	/* Copy buffer if it's misaligned */
 	if ((u32)dataptr & 0x07) {
@@ -586,7 +586,8 @@ static int armdfec_send(struct eth_device *dev, void *dataptr, int datasize)
 	p_txdesc->byte_cnt = datasize;
 
 	/* Apply send command using high priority TX queue */
-	writel((u32)p_txdesc, &regs->txcdp[TXQ]);
+	temp = (u32)&regs->txcdp[TXQ];
+	writel((u32)p_txdesc, temp);
 	writel(SDMA_CMD_TXDL | SDMA_CMD_TXDH | SDMA_CMD_ERD, &regs->sdma_cmd);
 
 	/*
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 dm: net: Fixup the armada100 FEC driver

Quoted 47 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Marek Vasut
Sent: 28 July 2012 01:20
To: u-boot at lists.denx.de
Cc: Marek Vasut; Joe Hershberger; u-boot-dm at lists.denx.de
Subject: [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver

Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function 'armdfec_send':
armada100_fec.c:589:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Cc Joe Hershberger <[email protected]>
---
 drivers/net/armada100_fec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/armada100_fec.c +1 -1
index d318a36..ed7cf20 100644
@@ -565,7 +565,7 @@ static int armdfec_send(struct eth_device *dev,
 void *dataptr, int datasize)
 	struct tx_desc *p_txdesc = darmdfec->p_txdesc;
 	void *p = (void *)dataptr;
 	int retry = PHY_WAIT_ITERATIONS * PHY_WAIT_MICRO_SECONDS;
-	u32 cmd_sts;
+	u32 cmd_sts, temp;
 
 	/* Copy buffer if it's misaligned */
drivers/net/armada100_fec.c +2 -1
 	if ((u32)dataptr & 0x07) {
@@ -586,7 +586,8 @@ static int armdfec_send(struct eth_device *dev,
 void *dataptr, int datasize)
 	p_txdesc->byte_cnt = datasize;
 
 	/* Apply send command using high priority TX queue */
-	writel((u32)p_txdesc, &regs->txcdp[TXQ]);
+	temp = (u32)&regs->txcdp[TXQ];
+	writel((u32)p_txdesc, temp);
 	writel(SDMA_CMD_TXDL | SDMA_CMD_TXDH | SDMA_CMD_ERD, &regs-
 >sdma_cmd);
Quoted 2 lines

/*
--

Regards...
Prafulla . . .

#2 lore raw

PATCH 1/1 dm: net: Fixup the armada100 FEC driver

Dear Prafulla Wadaskar,

Quoted 8 lines
Quoted 8 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Marek Vasut
Sent: 28 July 2012 01:20
To: u-boot at lists.denx.de
Cc: Marek Vasut; Joe Hershberger; u-boot-dm at lists.denx.de
Subject: [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver

Quoted 8 lines
Quoted 8 lines

Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function 'armdfec_send':
armada100_fec.c:589:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Cc Joe Hershberger <[email protected]>

[...]

Joe, can you please pick this for -next (or -master already?) ?

Quoted 4 lines

Regards...
Prafulla . . .

Best regards,
Marek Vasut

#3 lore raw

PATCH 1/1 dm: net: Fixup the armada100 FEC driver

Hi Marek,

Quoted 16 lines · Marek Vasut

Dear Prafulla Wadaskar,

Quoted 14 lines
Quoted 14 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Marek Vasut
Sent: 28 July 2012 01:20
To: u-boot at lists.denx.de
Cc: Marek Vasut; Joe Hershberger; u-boot-dm at lists.denx.de
Subject: [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver

Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function 'armdfec_send':
armada100_fec.c:589:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Cc Joe Hershberger <[email protected]>

[...]

Joe, can you please pick this for -next (or -master already?) ?

OK... I figured this was just an RFC, since it was sent to the u-boot-dm list.

I'll pull it into master after release.

Thanks,
-Joe

#4 lore raw

PATCH 1/1 dm: net: Fixup the armada100 FEC driver

Dear Joe Hershberger,

Quoted 22 lines

Hi Marek,

Quoted 19 lines · Marek Vasut

Dear Prafulla Wadaskar,

Quoted 16 lines
Quoted 16 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Marek Vasut
Sent: 28 July 2012 01:20
To: u-boot at lists.denx.de
Cc: Marek Vasut; Joe Hershberger; u-boot-dm at lists.denx.de
Subject: [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver

Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function 'armdfec_send':
armada100_fec.c:589:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Cc Joe Hershberger <[email protected]>
Quoted 6 lines
Quoted 3 lines

[...]

Joe, can you please pick this for -next (or -master already?) ?

OK... I figured this was just an RFC, since it was sent to the u-boot-dm list.

That was a bad choice to cross post it to both MLs ... and I was already told so, quite a lot.

Quoted 4 lines

I'll pull it into master after release.

Thanks,
-Joe

Best regards,
Marek Vasut

#5 lore raw

PATCH 1/1 dm: net: Fixup the armada100 FEC driver

In reply to Marek Vasut
Quoted 56 lines

-----Original Message-----
From: Prafulla Wadaskar
Sent: 30 July 2012 12:02
To: 'Marek Vasut'; u-boot at lists.denx.de
Cc: Joe Hershberger; u-boot-dm at lists.denx.de
Subject: RE: [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver

Quoted 8 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Marek Vasut
Sent: 28 July 2012 01:20
To: u-boot at lists.denx.de
Cc: Marek Vasut; Joe Hershberger; u-boot-dm at lists.denx.de
Subject: [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver

Quoted 4 lines

Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function 'armdfec_send':
armada100_fec.c:589:2: warning: dereferencing type-punned pointer

will

Review

Quoted 9 lines

break strict-aliasing rules [-Wstrict-aliasing]

Cc Joe Hershberger <[email protected]>
---
 drivers/net/armada100_fec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/net/armada100_fec.c

Quoted 22 lines

index d318a36..ed7cf20 100644

drivers/net/armada100_fec.c +1 -1
@@ -565,7 +565,7 @@ static int armdfec_send(struct eth_device *dev,
 void *dataptr, int datasize)
 	struct tx_desc *p_txdesc = darmdfec->p_txdesc;
 	void *p = (void *)dataptr;
 	int retry = PHY_WAIT_ITERATIONS * PHY_WAIT_MICRO_SECONDS;
-	u32 cmd_sts;
+	u32 cmd_sts, temp;
 
 	/* Copy buffer if it's misaligned */
drivers/net/armada100_fec.c +2 -1
 	if ((u32)dataptr & 0x07) {
@@ -586,7 +586,8 @@ static int armdfec_send(struct eth_device *dev,
 void *dataptr, int datasize)
 	p_txdesc->byte_cnt = datasize;
 
 	/* Apply send command using high priority TX queue */
-	writel((u32)p_txdesc, &regs->txcdp[TXQ]);
+	temp = (u32)&regs->txcdp[TXQ];
+	writel((u32)p_txdesc, temp);
 	writel(SDMA_CMD_TXDL | SDMA_CMD_TXDH | SDMA_CMD_ERD, &regs-
Quoted 6 lines
Quoted 4 lines
drivers/net/armada100_fec.c +0 -0
 >sdma_cmd);

/*
--

Hi Joe
May you please pull this patch?

Regards...
Prafulla . . .

#6 lore raw

PATCH 1/1 dm: net: Fixup the armada100 FEC driver

Hi Prafulla,

Quoted 58 lines · Prafulla Wadaskar
Quoted 58 lines

-----Original Message-----
From: Prafulla Wadaskar
Sent: 30 July 2012 12:02
To: 'Marek Vasut'; u-boot at lists.denx.de
Cc: Joe Hershberger; u-boot-dm at lists.denx.de
Subject: RE: [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver

Quoted 8 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Marek Vasut
Sent: 28 July 2012 01:20
To: u-boot at lists.denx.de
Cc: Marek Vasut; Joe Hershberger; u-boot-dm at lists.denx.de
Subject: [U-Boot] [PATCH] dm: net: Fixup the armada100 FEC driver

Quoted 4 lines

Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function 'armdfec_send':
armada100_fec.c:589:2: warning: dereferencing type-punned pointer

will

Review

Quoted 9 lines

break strict-aliasing rules [-Wstrict-aliasing]

Cc Joe Hershberger <[email protected]>
---
 drivers/net/armada100_fec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/net/armada100_fec.c

Quoted 24 lines

index d318a36..ed7cf20 100644

drivers/net/armada100_fec.c +1 -1
@@ -565,7 +565,7 @@ static int armdfec_send(struct eth_device *dev,
 void *dataptr, int datasize)
    struct tx_desc *p_txdesc = darmdfec->p_txdesc;
    void *p = (void *)dataptr;
    int retry = PHY_WAIT_ITERATIONS * PHY_WAIT_MICRO_SECONDS;
-   u32 cmd_sts;
+   u32 cmd_sts, temp;
 
    /* Copy buffer if it's misaligned */
    if ((u32)dataptr & 0x07) {
drivers/net/armada100_fec.c +2 -1
@@ -586,7 +586,8 @@ static int armdfec_send(struct eth_device *dev,
 void *dataptr, int datasize)
    p_txdesc->byte_cnt = datasize;
 
    /* Apply send command using high priority TX queue */
-   writel((u32)p_txdesc, &regs->txcdp[TXQ]);
+   temp = (u32)&regs->txcdp[TXQ];
+   writel((u32)p_txdesc, temp);
    writel(SDMA_CMD_TXDL | SDMA_CMD_TXDH | SDMA_CMD_ERD, &regs-
 >sdma_cmd);
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
    /*

--

Hi Joe
May you please pull this patch?

It's in my queue on patchwork. I'll try to get to the back-log next week.

Cheers!
-Joe

#7 lore raw

PATCH 1/1 dm: net: Fixup the armada100 FEC driver

In reply to Marek Vasut

Hi Marek,

Quoted 7 lines · Marek Vasut

Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function ?armdfec_send?:
armada100_fec.c:589:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Cc Joe Hershberger <[email protected]>

Applied, thanks.

-Joe