All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stmmac: fix parameter to dwmac4_set_umac_addr()
@ 2016-06-08 18:21 Ben Dooks
  2016-06-09  5:32 ` Giuseppe CAVALLARO
  2016-06-10  6:39 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Dooks @ 2016-06-08 18:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ben Dooks, Giuseppe Cavallaro, Alexandre Torgue, netdev

The dwmac4_set_umac_addr() takes a struct mac_device_info as
the first parameter, but is being passed a ioaddr instead from
dwmac4_set_filter(). Fix the warning/bug by changing the first
parameter.

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

Note, only compile tested this as do not have any
hardware with it in.

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: netdev@vger.kernel.org
---
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
index 4f7283d..44da877 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
@@ -156,7 +156,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
 		struct netdev_hw_addr *ha;
 
 		netdev_for_each_uc_addr(ha, dev) {
-			dwmac4_set_umac_addr(ioaddr, ha->addr, reg);
+			dwmac4_set_umac_addr(hw, ha->addr, reg);
 			reg++;
 		}
 	}
-- 
2.8.1

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

* Re: [PATCH] stmmac: fix parameter to dwmac4_set_umac_addr()
  2016-06-08 18:21 [PATCH] stmmac: fix parameter to dwmac4_set_umac_addr() Ben Dooks
@ 2016-06-09  5:32 ` Giuseppe CAVALLARO
  2016-06-10  6:39 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Giuseppe CAVALLARO @ 2016-06-09  5:32 UTC (permalink / raw)
  To: Ben Dooks, linux-kernel; +Cc: Alexandre Torgue, netdev

On 6/8/2016 8:21 PM, Ben Dooks wrote:
> The dwmac4_set_umac_addr() takes a struct mac_device_info as
> the first parameter, but is being passed a ioaddr instead from
> dwmac4_set_filter(). Fix the warning/bug by changing the first
> parameter.
>
> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46: warning: incorrect type in argument 1 (different address spaces)
> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46:    expected struct mac_device_info *hw
> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46:    got void [noderef] <asn:2>*ioaddr
>
> Note, only compile tested this as do not have any
> hardware with it in.
>
> 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: netdev@vger.kernel.org

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
> index 4f7283d..44da877 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
> @@ -156,7 +156,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
>  		struct netdev_hw_addr *ha;
>
>  		netdev_for_each_uc_addr(ha, dev) {
> -			dwmac4_set_umac_addr(ioaddr, ha->addr, reg);
> +			dwmac4_set_umac_addr(hw, ha->addr, reg);
>  			reg++;
>  		}
>  	}
>

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

* Re: [PATCH] stmmac: fix parameter to dwmac4_set_umac_addr()
  2016-06-08 18:21 [PATCH] stmmac: fix parameter to dwmac4_set_umac_addr() Ben Dooks
  2016-06-09  5:32 ` Giuseppe CAVALLARO
@ 2016-06-10  6:39 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-06-10  6:39 UTC (permalink / raw)
  To: ben.dooks; +Cc: linux-kernel, peppe.cavallaro, alexandre.torgue, netdev

From: Ben Dooks <ben.dooks@codethink.co.uk>
Date: Wed,  8 Jun 2016 19:21:17 +0100

> The dwmac4_set_umac_addr() takes a struct mac_device_info as
> the first parameter, but is being passed a ioaddr instead from
> dwmac4_set_filter(). Fix the warning/bug by changing the first
> parameter.
> 
> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46: warning: incorrect type in argument 1 (different address spaces)
> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46:    expected struct mac_device_info *hw
> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46:    got void [noderef] <asn:2>*ioaddr
> 
> Note, only compile tested this as do not have any
> hardware with it in.
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Applied.

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

end of thread, other threads:[~2016-06-10  6:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-08 18:21 [PATCH] stmmac: fix parameter to dwmac4_set_umac_addr() Ben Dooks
2016-06-09  5:32 ` Giuseppe CAVALLARO
2016-06-10  6:39 ` David Miller

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.