Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1702397 > unrolled thread

[PATCH net-next] net: dsa: bcm_sf2: dst in not an array

Started byVivien Didelot <vivien.didelot@savoirfairelinux.com>
First post2017-08-02 22:00 +0200
Last post2017-08-03 18:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next] net: dsa: bcm_sf2: dst in not an array Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-02 22:00 +0200
    Re: [PATCH net-next] net: dsa: bcm_sf2: dst in not an array Florian Fainelli <f.fainelli@gmail.com> - 2017-08-02 22:00 +0200
    Re: [PATCH net-next] net: dsa: bcm_sf2: dst in not an array David Miller <davem@davemloft.net> - 2017-08-03 18:40 +0200

#1702397 — [PATCH net-next] net: dsa: bcm_sf2: dst in not an array

FromVivien Didelot <vivien.didelot@savoirfairelinux.com>
Date2017-08-02 22:00 +0200
Subject[PATCH net-next] net: dsa: bcm_sf2: dst in not an array
Message-ID<ua7Yd-5TV-1@gated-at.bofh.it>
It's been a while now since ds->dst is not an array anymore, but a
simple pointer to a dsa_switch_tree.

Fortunately, SF2 does not support multi-chip and thus ds->index is
always 0.

This patch substitutes 'ds->dst[ds->index].' with 'ds->dst->'.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 drivers/net/dsa/bcm_sf2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 6bbfa6ea1efb..558667c814c9 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -788,7 +788,7 @@ static int bcm_sf2_sw_resume(struct dsa_switch *ds)
 static void bcm_sf2_sw_get_wol(struct dsa_switch *ds, int port,
 			       struct ethtool_wolinfo *wol)
 {
-	struct net_device *p = ds->dst[ds->index].cpu_dp->netdev;
+	struct net_device *p = ds->dst->cpu_dp->netdev;
 	struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
 	struct ethtool_wolinfo pwol;
 
@@ -811,7 +811,7 @@ static void bcm_sf2_sw_get_wol(struct dsa_switch *ds, int port,
 static int bcm_sf2_sw_set_wol(struct dsa_switch *ds, int port,
 			      struct ethtool_wolinfo *wol)
 {
-	struct net_device *p = ds->dst[ds->index].cpu_dp->netdev;
+	struct net_device *p = ds->dst->cpu_dp->netdev;
 	struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
 	s8 cpu_port = ds->dst->cpu_dp->index;
 	struct ethtool_wolinfo pwol;
-- 
2.13.3

[toc] | [next] | [standalone]


#1702399

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2017-08-02 22:00 +0200
Message-ID<ua7Yd-5TV-5@gated-at.bofh.it>
In reply to#1702397
On 08/02/2017 12:48 PM, Vivien Didelot wrote:
> It's been a while now since ds->dst is not an array anymore, but a
> simple pointer to a dsa_switch_tree.
> 
> Fortunately, SF2 does not support multi-chip and thus ds->index is
> always 0.
> 
> This patch substitutes 'ds->dst[ds->index].' with 'ds->dst->'.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks!
-- 
Florian

[toc] | [prev] | [next] | [standalone]


#1703267

FromDavid Miller <davem@davemloft.net>
Date2017-08-03 18:40 +0200
Message-ID<uarkf-2yP-31@gated-at.bofh.it>
In reply to#1702397
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Wed,  2 Aug 2017 15:48:25 -0400

> It's been a while now since ds->dst is not an array anymore, but a
> simple pointer to a dsa_switch_tree.
> 
> Fortunately, SF2 does not support multi-chip and thus ds->index is
> always 0.
> 
> This patch substitutes 'ds->dst[ds->index].' with 'ds->dst->'.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web