Re: [PATCH net-next 1/5] net: dsa: Remove master_netdev and use dst->cpu_dp->netdev

2017-06-08 Thread kbuild test robot
Hi Florian,

[auto build test WARNING on net-next/master]

url:
https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-dsa-Multi-CPU-ground-work/20170607-164203
config: x86_64-randconfig-s0-06090601 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   net//dsa/slave.c: In function 'dsa_slave_netpoll_setup':
>> net//dsa/slave.c:686: warning: unused variable 'ds'

vim +/ds +686 net//dsa/slave.c

7905288f Florian Fainelli 2014-09-24  670  
afdcf151 Vivien Didelot   2017-01-27  671   ret = ds->ops->get_eee(ds, 
p->dp->index, e);
7905288f Florian Fainelli 2014-09-24  672   if (ret)
7905288f Florian Fainelli 2014-09-24  673   return ret;
7905288f Florian Fainelli 2014-09-24  674  
7905288f Florian Fainelli 2014-09-24  675   if (p->phy)
7905288f Florian Fainelli 2014-09-24  676   ret = 
phy_ethtool_get_eee(p->phy, e);
7905288f Florian Fainelli 2014-09-24  677  
7905288f Florian Fainelli 2014-09-24  678   return ret;
7905288f Florian Fainelli 2014-09-24  679  }
7905288f Florian Fainelli 2014-09-24  680  
04ff53f9 Florian Fainelli 2015-07-31  681  #ifdef CONFIG_NET_POLL_CONTROLLER
04ff53f9 Florian Fainelli 2015-07-31  682  static int 
dsa_slave_netpoll_setup(struct net_device *dev,
04ff53f9 Florian Fainelli 2015-07-31  683  
struct netpoll_info *ni)
04ff53f9 Florian Fainelli 2015-07-31  684  {
04ff53f9 Florian Fainelli 2015-07-31  685   struct dsa_slave_priv *p = 
netdev_priv(dev);
afdcf151 Vivien Didelot   2017-01-27 @686   struct dsa_switch *ds = 
p->dp->ds;
6ab303ef Florian Fainelli 2017-06-06  687   struct net_device *master = 
dsa_master_netdev(p);
04ff53f9 Florian Fainelli 2015-07-31  688   struct netpoll *netpoll;
04ff53f9 Florian Fainelli 2015-07-31  689   int err = 0;
04ff53f9 Florian Fainelli 2015-07-31  690  
04ff53f9 Florian Fainelli 2015-07-31  691   netpoll = 
kzalloc(sizeof(*netpoll), GFP_KERNEL);
04ff53f9 Florian Fainelli 2015-07-31  692   if (!netpoll)
04ff53f9 Florian Fainelli 2015-07-31  693   return -ENOMEM;
04ff53f9 Florian Fainelli 2015-07-31  694  

:: The code at line 686 was first introduced by commit
:: afdcf151c1f7346207dcee3f8d6d82991dbbb7e5 net: dsa: store a dsa_port in 
dsa_slave_priv

:: TO: Vivien Didelot 
:: CC: David S. Miller 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH net-next 1/5] net: dsa: Remove master_netdev and use dst->cpu_dp->netdev

2017-06-06 Thread Florian Fainelli
On 06/06/2017 10:24 AM, Vivien Didelot wrote:
> Hi Florian,
> 
> Florian Fainelli  writes:
> 
>> -struct net_device *p = ds->dst[ds->index].master_netdev;
>> +struct net_device *p = ds->dst[ds->index].cpu_dp->netdev;
> 
>ds->dst->cpu_dp->netdev
> 
> ds->dst is not an array anymore, lucky sf2 switch index is always 0 ;-)
> 
>>  struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
>>  struct ethtool_wolinfo pwol;
>>  
>> @@ -829,7 +829,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].master_netdev;
>> +struct net_device *p = ds->dst[ds->index].cpu_dp->netdev;
> 
> same here.

It's changed in patch 5, so I did not bother doing an intermediate
change considering we ditch this eventually.

Thanks!

> 
> Thanks,
> 
> Vivien
> 


-- 
Florian


Re: [PATCH net-next 1/5] net: dsa: Remove master_netdev and use dst->cpu_dp->netdev

2017-06-06 Thread Vivien Didelot
Hi Florian,

Florian Fainelli  writes:

> - struct net_device *p = ds->dst[ds->index].master_netdev;
> + struct net_device *p = ds->dst[ds->index].cpu_dp->netdev;

   ds->dst->cpu_dp->netdev

ds->dst is not an array anymore, lucky sf2 switch index is always 0 ;-)

>   struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
>   struct ethtool_wolinfo pwol;
>  
> @@ -829,7 +829,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].master_netdev;
> + struct net_device *p = ds->dst[ds->index].cpu_dp->netdev;

same here.

Thanks,

Vivien