From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Richard Fitzgerald <rf@opensource.cirrus.com>,
vkoul@kernel.org, yung-chuan.liao@linux.intel.com,
sanyog.r.kale@intel.com
Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] soundwire: cadence: Fix error check in cdns_xfer_msg()
Date: Mon, 19 Sep 2022 10:48:01 +0200 [thread overview]
Message-ID: <e20acd52-a501-713c-c0c3-f5d76670ecf6@linux.intel.com> (raw)
In-Reply-To: <20220917154822.690472-1-rf@opensource.cirrus.com>
On 9/17/22 17:48, Richard Fitzgerald wrote:
> _cdns_xfer_msg() returns an sdw_command_response value, not a
> negative error code.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
we've got other issues like this such as
enum sdw_command_response
cdns_xfer_msg_defer(struct sdw_bus *bus,
struct sdw_msg *msg, struct sdw_defer *defer)
{
struct sdw_cdns *cdns = bus_to_cdns(bus);
int cmd = 0, ret;
/* for defer only 1 message is supported */
if (msg->len > 1)
return -ENOTSUPP; <<< that's not right
We should probably double-check that all functions return enums don't
return negative values.
> ---
> drivers/soundwire/cadence_master.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
> index ca241bbeadd9..3543a923ee6b 100644
> --- a/drivers/soundwire/cadence_master.c
> +++ b/drivers/soundwire/cadence_master.c
> @@ -708,7 +708,7 @@ cdns_xfer_msg(struct sdw_bus *bus, struct sdw_msg *msg)
> for (i = 0; i < msg->len / CDNS_MCP_CMD_LEN; i++) {
> ret = _cdns_xfer_msg(cdns, msg, cmd, i * CDNS_MCP_CMD_LEN,
> CDNS_MCP_CMD_LEN, false);
> - if (ret < 0)
> + if (ret != SDW_CMD_OK)
> goto exit;
> }
>
next prev parent reply other threads:[~2022-09-19 8:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 15:48 Richard Fitzgerald
2022-09-17 15:48 ` [PATCH 2/2] soundwire: cadence: Simplify error paths " Richard Fitzgerald
2022-09-19 8:48 ` Pierre-Louis Bossart
2022-09-19 8:48 ` Pierre-Louis Bossart [this message]
2022-09-20 5:07 ` [PATCH 1/2] soundwire: cadence: Fix error check " Vinod Koul
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=e20acd52-a501-713c-c0c3-f5d76670ecf6@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=rf@opensource.cirrus.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®