mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sander Vanheule <sander@svanheule.net>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	 Danilo Krummrich <dakr@kernel.org>
Subject: Re: [PATCH v4 2/2] regmap: warn users about uninitialized flat cache
Date: Thu, 23 Oct 2025 15:12:59 +0200	[thread overview]
Message-ID: <833a6495c2b16e1da90c19826839191eec21e6f2.camel@svanheule.net> (raw)
In-Reply-To: <9b5eaedd-f068-4209-af4a-215716e279a7@sirena.org.uk>

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

  reply	other threads:[~2025-10-23 13:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22 20:04 [PATCH v4 0/2] regmap: Introduce validity info for " Sander Vanheule
2025-10-22 20:04 ` [PATCH v4 1/2] regmap: add flat cache with sparse validity Sander Vanheule
2025-10-22 20:04 ` [PATCH v4 2/2] regmap: warn users about uninitialized flat cache Sander Vanheule
2025-10-23 13:00   ` Mark Brown
2025-10-23 13:12     ` Sander Vanheule [this message]
2025-10-23 13:21       ` Mark Brown

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=833a6495c2b16e1da90c19826839191eec21e6f2.camel@svanheule.net \
    --to=sander@svanheule.net \
    --cc=broonie@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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

all inboxes | Powered by JetHome®