From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: <vkoul@kernel.org>, <yung-chuan.liao@linux.intel.com>,
<sanyog.r.kale@intel.com>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: [PATCH 4/4] soundwire: stream: Tidy do_bank_switch error messages
Date: Fri, 2 Jun 2023 08:38:10 +0000 [thread overview]
Message-ID: <20230602083810.GK68926@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <4e90380f-b328-5806-4305-0a794cadc550@linux.intel.com>
On Thu, Jun 01, 2023 at 11:34:10AM -0500, Pierre-Louis Bossart wrote:
> On 6/1/23 11:16, Charles Keepax wrote:
> > Every error path in do_bank_switch prints an error message so there is no
> > need for the callers to also print error messages. Indeed in multi-master
> > cases these extra messages are confusing because they print out against a
> > random bus device whereas the do_bank_switch messages print against the bus
> > that actually failed.
>
> Errm, what?
>
> There is no way to know which bus failed in multi-master mode, and the
> 'stream' can span multiple buses so the use of pr_err was intentional.
Apologies this is the commit message not quite keeping pace with
the code base. Originally when I wrote the patch the error
message after do_bank_switch were a "dev_err(bus->dev", that was
then fixed up in commit d014688eb373 ("soundwire: stream: remove
bus->dev from logs on multiple buses").
> There's just no other way to report issues, and I don't see why one
> would remove such logs and fail silently.
>
> I just don't get what you are trying to address.
>
The current code would say produce something like:
Bank switch failed: -5
_sdw_prepare_stream: do_bank_switch failed: -5
I am sensing you are keen to keep both error messages, so fair
enough I will drop that. Although worth noting originally before
that patch I mention above this would have been:
Bank switch failed: -5
do_bank_switch failed: -5
Which is really what I was attempting to address, that is clearly
redundant. Now with the addition of the function in the print I
guess it is slightly less redundant.
> > This also allows clean up of a couple of if's and variable initialisations
> > that were only there to silence potentially uninitialised variable
> > warnings on the bus variable.
>
> That should be a separate patch IMHO.
>
I will trim the patch down to leave the duplicate error messages
and just remove those bits.
Thanks,
Charles
next prev parent reply other threads:[~2023-06-02 8:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 16:16 [PATCH 1/4] soundwire: stream: Add missing clear of alloc_slave_rt Charles Keepax
2023-06-01 16:16 ` [PATCH 2/4] soundwire: bandwidth allocation: Remove pointless variable Charles Keepax
2023-06-01 16:39 ` Pierre-Louis Bossart
2023-06-01 16:16 ` [PATCH 3/4] soundwire: stream: Remove unnecessary gotos Charles Keepax
2023-06-01 16:37 ` Pierre-Louis Bossart
2023-06-02 8:40 ` Charles Keepax
2023-06-01 16:16 ` [PATCH 4/4] soundwire: stream: Tidy do_bank_switch error messages Charles Keepax
2023-06-01 16:34 ` Pierre-Louis Bossart
2023-06-02 8:38 ` Charles Keepax [this message]
2023-06-01 16:43 ` [PATCH 1/4] soundwire: stream: Add missing clear of alloc_slave_rt Pierre-Louis Bossart
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=20230602083810.GK68926@ediswmail.ad.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sanyog.r.kale@intel.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.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
all inboxes | Powered by JetHome®