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 3/3] net: ethernet: ti: cpsw_ale: Remove unused accessor functions
Date: Thu, 10 Oct 2024 15:13:18 +0300 [thread overview]
Message-ID: <9a99bf9e-ea1b-4fab-8b50-a2bd8a320579@kernel.org> (raw)
In-Reply-To: <20241010-ti-warn-v2-3-9c8304af5544@kernel.org>
On 10/10/2024 14:04, Simon Horman wrote:
> W=1 builds flag that some accessor functions for ALE fields are unused.
>
> Address this by splitting up the macros used to define these
> accessors to allow only those that are used to be declared.
>
> The warnings are verbose, but for example, the mcast_state case is
> flagged by clang-18 as:
>
> .../cpsw_ale.c:220:1: warning: unused function 'cpsw_ale_get_mcast_state' [-Wunused-function]
> 220 | DEFINE_ALE_FIELD(mcast_state, 62, 2)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> .../cpsw_ale.c:145:19: note: expanded from macro 'DEFINE_ALE_FIELD'
> 145 | static inline int cpsw_ale_get_##name(u32 *ale_entry) \
> | ^~~~~~~~~~~~~~~~~~~
> <scratch space>:196:1: note: expanded from here
> 196 | cpsw_ale_get_mcast_state
> | ^~~~~~~~~~~~~~~~~~~~~~~~
>
> Compile tested only.
> No functional change intended.
>
> Signed-off-by: Simon Horman <horms@kernel.org>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
next prev parent reply other threads:[~2024-10-10 12:13 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
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 [this message]
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=9a99bf9e-ea1b-4fab-8b50-a2bd8a320579@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).