Re: [PATCH net-next v2 2/3] net: ethernet: ti: am65-cpsw: Use tstats instead of open coded version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Simon,

On 10/10/2024 14:04, Simon Horman wrote:
> Make use of struct pcpu_sw_netstats and related helpers to handle
> existing per-cpu stats for this driver - the exact same counters
> are maintained.
> 
> A side effect of this change is to address __percpu warnings
> flagged by Sparse:
> 
> .../am65-cpsw-nuss.c:2658:55: warning: incorrect type in initializer (different address spaces)
> .../am65-cpsw-nuss.c:2658:55:    expected struct am65_cpsw_ndev_stats [noderef] __percpu *stats
> .../am65-cpsw-nuss.c:2658:55:    got void *data
> .../am65-cpsw-nuss.c:2781:15: warning: incorrect type in argument 3 (different address spaces)
> .../am65-cpsw-nuss.c:2781:15:    expected void *data
> .../am65-cpsw-nuss.c:2781:15:    got struct am65_cpsw_ndev_stats [noderef] __percpu *stats
> 
> Compile tested only.
> No functional change intended.
> 
> Suggested-by: Jakub Kicinski <kuba@xxxxxxxxxx>
> Link: https://lore.kernel.org/all/20240911170643.7ecb1bbb@xxxxxxxxxx/
> Signed-off-by: Simon Horman <horms@xxxxxxxxxx>

Thanks for this cleanup! I did a quick test and rx/tx stats seem to work fine.

Reviewed-by: Roger Quadros <rogerq@xxxxxxxxxx>




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux