linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane()
@ 2019-10-16  8:22 Ben Dooks (Codethink)
  2019-10-16  8:43 ` Ben Dooks
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ben Dooks (Codethink) @ 2019-10-16  8:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Dooks (Codethink),
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Maxime Coquelin, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel

The stmmac_pcs_ctrl_ane() expects a register address as
argument 1, but for some reason the mac_device_info is
being passed.

Fix the warning (and possible bug) from sparse:

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: warning: incorrect type in argument 1 (different address spaces)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    expected void [noderef] <asn:2> *ioaddr
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    got struct mac_device_info *hw

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: netdev@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index c76a1336a451..3947c95121c6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2610,7 +2610,7 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
 	}
 
 	if (priv->hw->pcs)
-		stmmac_pcs_ctrl_ane(priv, priv->hw, 1, priv->hw->ps, 0);
+		stmmac_pcs_ctrl_ane(priv, priv->ioaddr, 1, priv->hw->ps, 0);
 
 	/* set TX and RX rings length */
 	stmmac_set_rings_length(priv);
-- 
2.23.0


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

* Re: [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane()
  2019-10-16  8:22 [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane() Ben Dooks (Codethink)
@ 2019-10-16  8:43 ` Ben Dooks
  2019-10-16 20:28 ` David Miller
  2019-10-17 19:31 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2019-10-16  8:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Maxime Coquelin, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel

On 16/10/2019 09:22, Ben Dooks (Codethink) wrote:
> The stmmac_pcs_ctrl_ane() expects a register address as
> argument 1, but for some reason the mac_device_info is
> being passed.
> 
> Fix the warning (and possible bug) from sparse:
> 
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: warning: incorrect type in argument 1 (different address spaces)
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    expected void [noderef] <asn:2> *ioaddr
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    got struct mac_device_info *hw

apologies, looks like I reposted this by accident.


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

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

* Re: [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane()
  2019-10-16  8:22 [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane() Ben Dooks (Codethink)
  2019-10-16  8:43 ` Ben Dooks
@ 2019-10-16 20:28 ` David Miller
  2019-10-17  7:40   ` Ben Dooks
  2019-10-17 19:31 ` David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2019-10-16 20:28 UTC (permalink / raw)
  To: ben.dooks
  Cc: linux-kernel, peppe.cavallaro, alexandre.torgue, joabreu,
	mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel

From: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>
Date: Wed, 16 Oct 2019 09:22:05 +0100

> The stmmac_pcs_ctrl_ane() expects a register address as
> argument 1, but for some reason the mac_device_info is
> being passed.
> 
> Fix the warning (and possible bug) from sparse:
> 
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: warning: incorrect type in argument 1 (different address spaces)
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    expected void [noderef] <asn:2> *ioaddr
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    got struct mac_device_info *hw
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

I'm still reviewing this but FYI you did not have to send this
twice.

Always check:

	https://patchwork.ozlabs.org/project/netdev/list/

to see what state your patch submission is in.

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

* Re: [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane()
  2019-10-16 20:28 ` David Miller
@ 2019-10-17  7:40   ` Ben Dooks
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2019-10-17  7:40 UTC (permalink / raw)
  To: David Miller
  Cc: linux-kernel, peppe.cavallaro, alexandre.torgue, joabreu,
	mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel

On 16/10/2019 21:28, David Miller wrote:
> From: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>
> Date: Wed, 16 Oct 2019 09:22:05 +0100
> 
>> The stmmac_pcs_ctrl_ane() expects a register address as
>> argument 1, but for some reason the mac_device_info is
>> being passed.
>>
>> Fix the warning (and possible bug) from sparse:
>>
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: warning: incorrect type in argument 1 (different address spaces)
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    expected void [noderef] <asn:2> *ioaddr
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    got struct mac_device_info *hw
>>
>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> 
> I'm still reviewing this but FYI you did not have to send this
> twice.

Yes, I accidentally sent the wrong patch out (already apologised
on the re-send as I noticed it about 10 minutes after sending).

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

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

* Re: [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane()
  2019-10-16  8:22 [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane() Ben Dooks (Codethink)
  2019-10-16  8:43 ` Ben Dooks
  2019-10-16 20:28 ` David Miller
@ 2019-10-17 19:31 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2019-10-17 19:31 UTC (permalink / raw)
  To: ben.dooks
  Cc: linux-kernel, peppe.cavallaro, alexandre.torgue, joabreu,
	mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel

From: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>
Date: Wed, 16 Oct 2019 09:22:05 +0100

> The stmmac_pcs_ctrl_ane() expects a register address as
> argument 1, but for some reason the mac_device_info is
> being passed.
> 
> Fix the warning (and possible bug) from sparse:
> 
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: warning: incorrect type in argument 1 (different address spaces)
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    expected void [noderef] <asn:2> *ioaddr
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    got struct mac_device_info *hw
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Applied, thanks.

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

* [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane()
@ 2019-10-15 16:23 Ben Dooks (Codethink)
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks (Codethink) @ 2019-10-15 16:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Dooks (Codethink),
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Maxime Coquelin, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel

The stmmac_pcs_ctrl_ane() expects a register address as
argument 1, but for some reason the mac_device_info is
being passed.

Fix the warning (and possible bug) from sparse:

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17: warning: incorrect type in argument 1 (different address spaces)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    expected void [noderef] <asn:2> *ioaddr
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2613:17:    got struct mac_device_info *hw

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: netdev@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index c76a1336a451..3947c95121c6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2610,7 +2610,7 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
 	}
 
 	if (priv->hw->pcs)
-		stmmac_pcs_ctrl_ane(priv, priv->hw, 1, priv->hw->ps, 0);
+		stmmac_pcs_ctrl_ane(priv, priv->ioaddr, 1, priv->hw->ps, 0);
 
 	/* set TX and RX rings length */
 	stmmac_set_rings_length(priv);
-- 
2.23.0


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

end of thread, other threads:[~2019-10-17 19:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16  8:22 [PATCH] net: stmmac: fix argument to stmmac_pcs_ctrl_ane() Ben Dooks (Codethink)
2019-10-16  8:43 ` Ben Dooks
2019-10-16 20:28 ` David Miller
2019-10-17  7:40   ` Ben Dooks
2019-10-17 19:31 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2019-10-15 16:23 Ben Dooks (Codethink)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).