From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.de>,
Cezary Rojewski <cezary.rojewski@intel.com>,
tiwai@suse.com, perex@perex.cz, amade@asmblr.net,
linux-sound@vger.kernel.org, kuninori.morimoto.gx@renesas.com
Subject: Re: [PATCH v3] ALSA: control: Verify put() result when in debug mode
Date: Fri, 06 Feb 2026 15:33:34 +0100 [thread overview]
Message-ID: <871piy9c1t.wl-tiwai@suse.de> (raw)
In-Reply-To: <aYX13LsGaMjO8X92@sirena.co.uk>
On Fri, 06 Feb 2026 15:08:28 +0100,
Mark Brown wrote:
>
> On Fri, Feb 06, 2026 at 01:28:45PM +0100, Takashi Iwai wrote:
> > Cezary Rojewski wrote:
>
> > > + if (retcmp == ret)
> > > + pr_info("kctl->put() returned the expected value of '%d'\n", ret);
> > > + else
> > > + pr_warn("expected kctl->put() to return '%d' but got '%d'\n", ret, retcmp);
>
> > So this prints out a message at each access even if it succeeds.
> > I believe this would flood too many messages unnecessarily. Can it be
> > better to be with debug level?
>
> > Also, this message doesn't show any relevant information about which
> > card, device and which control caused the error, and that makes
> > debugging harder. Put some prefix to identify the problematic
> > control.
>
> Might it be worth considering doing this via trace_printk() or possibly
> tracepoints? They're very low overhead and with tracepoints they're
> strutured so they're more suitable for very high volume logging.
If we want to record each kcontrol access indeed, then yes, I agree
with tracepoint as the best way to go. But, IIRC, trace_printk()
leads to a kernel warning, so better to avoid.
Takashi
next prev parent reply other threads:[~2026-02-06 14:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 11:32 [PATCH v3] ALSA: control: Verify put() result when in debug mode Cezary Rojewski
2026-02-06 12:28 ` Takashi Iwai
2026-02-06 14:08 ` Mark Brown
2026-02-06 14:33 ` Takashi Iwai [this message]
2026-02-06 14:44 ` Mark Brown
2026-02-06 17:34 ` Cezary Rojewski
2026-02-06 17:45 ` Cezary Rojewski
2026-02-06 17:57 ` Mark Brown
2026-02-09 14:43 ` Cezary Rojewski
2026-02-09 15:14 ` Jaroslav Kysela
2026-02-09 21:05 ` Cezary Rojewski
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=871piy9c1t.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=amade@asmblr.net \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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