[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <833a6495c2b16e1da90c19826839191eec21e6f2.camel@svanheule.net>
Date: Thu, 23 Oct 2025 15:12:59 +0200
From: Sander Vanheule <sander@...nheule.net>
To: Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, "Rafael J . Wysocki" <rafael@...nel.org>,
Danilo Krummrich
<dakr@...nel.org>
Subject: Re: [PATCH v4 2/2] regmap: warn users about uninitialized flat cache
On Thu, 2025-10-23 at 14:00 +0100, Mark Brown wrote:
> On Wed, Oct 22, 2025 at 10:04:08PM +0200, Sander Vanheule wrote:
>
> > + if (unlikely(!__test_and_set_bit(index, cache->valid)))
> > + dev_warn(map->dev,
> > + "using zero-initialized flat cache, "
> > + "this may cause unexpected behavior");
>
> Please update this to have the error message on one line, it's better to
> break the line length limit and have people easily able to grep for the
> log message.
Okay, I'll turn it into one line.
Regarding this warning, I've noticed it confuses the regmap KUnit tests parser.
The sync tests with offset registers at 0x2000 read a lot of uncached registers,
so that results in 10's of thousands of log lines. The test itself is reported
as passing, so I only noticed this now:
[15:07:47] ================= cache_sync_marked_dirty =================
[15:07:47] [PASSED] flat-default @0x0
[15:07:47] [PASSED] flat-default fast I/O @0x0
[15:07:47] [PASSED] flat-default @0x2001
[15:07:47] [PASSED] flat-default @0x2002
[15:07:47] [PASSED] flat-default @0x2003
[15:07:47] [PASSED] flat-default @0x2004
[15:07:47] [ERROR] Test: flat-sparse-default fast I/O @0x0: Expected test number
7 but found 8
[15:07:47] [PASSED] flat-sparse-default fast I/O @0x0
[15:07:47] [ERROR] Test: flat-sparse-default @0x2001: Expected test number 8 but
found 9
...
[15:07:47] [ERROR] Test: maple-default @0x2004: Expected test number 23 but
found 24
[15:07:47] [PASSED] maple-default @0x2004
[15:07:47] ============= [PASSED] cache_sync_marked_dirty =============
If it's okay for you, I would change it back to a dev_warn_once() with a
test_bit() check.
Best,
Sander
Powered by blists - more mailing lists