From: Simon Horman <horms@kernel.org>
To: Roger Quadros <rogerq@kernel.org>
Cc: Siddharth Vadapalli <s-vadapalli@ti.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-omap@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, srk@ti.com,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH net] net: ethernet: ti: cpsw_ale: Fix warning on some platforms
Date: Tue, 24 Sep 2024 15:02:38 +0100 [thread overview]
Message-ID: <20240924140238.GL4029621@kernel.org> (raw)
In-Reply-To: <20240924-am65-cpsw-multi-rx-fix-v1-1-0ca3fa9a1398@kernel.org>
On Tue, Sep 24, 2024 at 03:28:48PM +0300, Roger Quadros wrote:
> The number of register fields cannot be assumed to be ALE_FIELDS_MAX
> as some platforms can have lesser fields.
>
> Solve this by embedding the actual number of fields available
> in platform data and use that instead of ALE_FIELDS_MAX.
>
> Gets rid of the below warning on BeagleBone Black
>
> [ 1.007735] WARNING: CPU: 0 PID: 33 at drivers/base/regmap/regmap.c:1208 regmap_field_init+0x88/0x9c
> [ 1.007802] invalid empty mask defined
> [ 1.007812] Modules linked in:
> [ 1.007842] CPU: 0 UID: 0 PID: 33 Comm: kworker/u4:3 Not tainted 6.11.0-01459-g508403ab7b74-dirty #840
> [ 1.007867] Hardware name: Generic AM33XX (Flattened Device Tree)
> [ 1.007890] Workqueue: events_unbound deferred_probe_work_func
> [ 1.007935] Call trace:
> [ 1.007957] unwind_backtrace from show_stack+0x10/0x14
> [ 1.007999] show_stack from dump_stack_lvl+0x50/0x64
> [ 1.008033] dump_stack_lvl from __warn+0x70/0x124
> [ 1.008077] __warn from warn_slowpath_fmt+0x194/0x1a8
> [ 1.008113] warn_slowpath_fmt from regmap_field_init+0x88/0x9c
> [ 1.008154] regmap_field_init from devm_regmap_field_alloc+0x48/0x64
> [ 1.008193] devm_regmap_field_alloc from cpsw_ale_create+0xfc/0x320
> [ 1.008251] cpsw_ale_create from cpsw_init_common+0x214/0x354
> [ 1.008286] cpsw_init_common from cpsw_probe+0x4ac/0xb88
>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Closes: https://lore.kernel.org/netdev/CAMuHMdUf-tKRDzkz2_m8qdFTFutefddU0NTratVrEjRTzA3yQQ@mail.gmail.com/
> Fixes: 11cbcfeaa79e ("net: ethernet: ti: cpsw_ale: use regfields for number of Entries and Policers")
> Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-09-24 14:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 12:28 [PATCH net] net: ethernet: ti: cpsw_ale: Fix warning on some platforms Roger Quadros
2024-09-24 12:51 ` Geert Uytterhoeven
2024-09-24 14:02 ` Simon Horman [this message]
2024-10-01 9:40 ` 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=20240924140238.GL4029621@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert@linux-m68k.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=srk@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).