Loading drivers/parisc/led.c +2 −5 Original line number Original line Diff line number Diff line Loading @@ -352,11 +352,9 @@ static __inline__ int led_get_net_activity(void) rx_total = tx_total = 0; rx_total = tx_total = 0; /* we are running as a workqueue task, so locking dev_base /* we are running as a workqueue task, so we can use an RCU lookup */ * for reading should be OK */ read_lock(&dev_base_lock); rcu_read_lock(); rcu_read_lock(); for_each_netdev(&init_net, dev) { for_each_netdev_rcu(&init_net, dev) { const struct net_device_stats *stats; const struct net_device_stats *stats; struct in_device *in_dev = __in_dev_get_rcu(dev); struct in_device *in_dev = __in_dev_get_rcu(dev); if (!in_dev || !in_dev->ifa_list) if (!in_dev || !in_dev->ifa_list) Loading @@ -368,7 +366,6 @@ static __inline__ int led_get_net_activity(void) tx_total += stats->tx_packets; tx_total += stats->tx_packets; } } rcu_read_unlock(); rcu_read_unlock(); read_unlock(&dev_base_lock); retval = 0; retval = 0; Loading Loading
drivers/parisc/led.c +2 −5 Original line number Original line Diff line number Diff line Loading @@ -352,11 +352,9 @@ static __inline__ int led_get_net_activity(void) rx_total = tx_total = 0; rx_total = tx_total = 0; /* we are running as a workqueue task, so locking dev_base /* we are running as a workqueue task, so we can use an RCU lookup */ * for reading should be OK */ read_lock(&dev_base_lock); rcu_read_lock(); rcu_read_lock(); for_each_netdev(&init_net, dev) { for_each_netdev_rcu(&init_net, dev) { const struct net_device_stats *stats; const struct net_device_stats *stats; struct in_device *in_dev = __in_dev_get_rcu(dev); struct in_device *in_dev = __in_dev_get_rcu(dev); if (!in_dev || !in_dev->ifa_list) if (!in_dev || !in_dev->ifa_list) Loading @@ -368,7 +366,6 @@ static __inline__ int led_get_net_activity(void) tx_total += stats->tx_packets; tx_total += stats->tx_packets; } } rcu_read_unlock(); rcu_read_unlock(); read_unlock(&dev_base_lock); retval = 0; retval = 0; Loading