Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

r8169: simplify code by using core-provided pcpu stats allocation

Use core-provided pcpu stats allocation instead of open-coding it in
the driver.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/03f5bb3b-d7f4-48be-ae8a-54862ec4566c@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Heiner Kallweit and committed by
Paolo Abeni
400909df 86fe596b

+2 -5
+2 -5
drivers/net/ethernet/realtek/r8169_main.c
··· 5233 5233 raw_spin_lock_init(&tp->mac_ocp_lock); 5234 5234 mutex_init(&tp->led_lock); 5235 5235 5236 - dev->tstats = devm_netdev_alloc_pcpu_stats(&pdev->dev, 5237 - struct pcpu_sw_netstats); 5238 - if (!dev->tstats) 5239 - return -ENOMEM; 5240 - 5241 5236 /* Get the *optional* external "ether_clk" used on some boards */ 5242 5237 tp->clk = devm_clk_get_optional_enabled(&pdev->dev, "ether_clk"); 5243 5238 if (IS_ERR(tp->clk)) ··· 5346 5351 5347 5352 dev->hw_features |= NETIF_F_RXALL; 5348 5353 dev->hw_features |= NETIF_F_RXFCS; 5354 + 5355 + dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS; 5349 5356 5350 5357 netdev_sw_irq_coalesce_default_on(dev); 5351 5358