Message ID | 20210719192852.27404-1-l.stelmach@samsung.com |
---|---|
Headers | show |
Series | AX88796C SPI Ethernet Adapter | expand |
On Mon, 19 Jul 2021 21:28:52 +0200, Łukasz Stelmach wrote: > + ax_local->stats = > + devm_netdev_alloc_pcpu_stats(&spi->dev, > + struct ax88796c_pcpu_stats); > + if (!ax_local->stats) > + return -ENOMEM; > + u64_stats_init(&ax_local->stats->syncp); ../drivers/net/ethernet/asix/ax88796c_main.c:971:33: warning: incorrect type in argument 1 (different address spaces) ../drivers/net/ethernet/asix/ax88796c_main.c:971:33: expected struct u64_stats_sync *syncp ../drivers/net/ethernet/asix/ax88796c_main.c:971:33: got struct u64_stats_sync [noderef] __percpu *
It was <2021-07-20 wto 12:36>, when Jakub Kicinski wrote: > On Mon, 19 Jul 2021 21:28:52 +0200, Łukasz Stelmach wrote: >> + ax_local->stats = >> + devm_netdev_alloc_pcpu_stats(&spi->dev, >> + struct ax88796c_pcpu_stats); >> + if (!ax_local->stats) >> + return -ENOMEM; >> + u64_stats_init(&ax_local->stats->syncp); > > ../drivers/net/ethernet/asix/ax88796c_main.c:971:33: warning: incorrect type in argument 1 (different address spaces) > ../drivers/net/ethernet/asix/ax88796c_main.c:971:33: expected struct u64_stats_sync *syncp > ../drivers/net/ethernet/asix/ax88796c_main.c:971:33: got struct u64_stats_sync [noderef] __percpu * > Fixed, thanks. Apparently separate u64_stats_init() is not necessary as netdev_alloc_pcpu_stats() invokes it for_each_possible_cpu.