netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: Simon Horman <horms@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Siddharth Vadapalli <s-vadapalli@ti.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	Kalesh AP <kalesh-anakkur.purayil@broadcom.com>,
	netdev@vger.kernel.org, linux-omap@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH net-next v2 2/3] net: ethernet: ti: am65-cpsw: Use tstats instead of open coded version
Date: Thu, 10 Oct 2024 15:11:52 +0300	[thread overview]
Message-ID: <8d55458f-53d1-4abb-9f06-5c7ddf7da5d8@kernel.org> (raw)
In-Reply-To: <20241010-ti-warn-v2-2-9c8304af5544@kernel.org>

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@kernel.org>
> Link: https://lore.kernel.org/all/20240911170643.7ecb1bbb@kernel.org/
> Signed-off-by: Simon Horman <horms@kernel.org>

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

Reviewed-by: Roger Quadros <rogerq@kernel.org>

  reply	other threads:[~2024-10-10 12:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10 11:04 [PATCH net-next v2 0/3] net: ethernet: ti: Address some warnings Simon Horman
2024-10-10 11:04 ` [PATCH net-next v2 1/3] net: ethernet: ti: am65-cpsw: Use __be64 type for id_temp Simon Horman
2024-10-10 11:04 ` [PATCH net-next v2 2/3] net: ethernet: ti: am65-cpsw: Use tstats instead of open coded version Simon Horman
2024-10-10 12:11   ` Roger Quadros [this message]
2024-10-10 11:04 ` [PATCH net-next v2 3/3] net: ethernet: ti: cpsw_ale: Remove unused accessor functions Simon Horman
2024-10-10 12:13   ` Roger Quadros
2024-10-14 12:30 ` [PATCH net-next v2 0/3] net: ethernet: ti: Address some warnings patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d55458f-53d1-4abb-9f06-5c7ddf7da5d8@kernel.org \
    --to=rogerq@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=justinstitt@google.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=s-vadapalli@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).