From: Michal Simek <michal.simek@amd.com>
To: Bui Duc Phuc <phucduc.bui@gmail.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] ASoC: xilinx: xlnx_spdif: Use dev_err_probe() and drop redundant error handling
Date: Fri, 10 Jul 2026 10:48:38 +0200 [thread overview]
Message-ID: <da6e74cd-05d7-4ba8-aa75-e186ed8a49cf@amd.com> (raw)
In-Reply-To: <CAABR9nFFMMk6i_sjKGjt4t-_QZF_hu2gBPRNK8c-GfhyKdVP8A@mail.gmail.com>
On 7/10/26 10:17, Bui Duc Phuc wrote:
> Hi Michal,
>
> Thank you for your review !
>
>>> + if (IS_ERR(ctx->axi_clk))
>>> + return dev_err_probe(dev, PTR_ERR(ctx->axi_clk), "failed to get s_axi_aclk\n");
>>
>> This is pretty long line. Message should go on the next line.
>>
>
> The line is still within the 100-character limit.
> I'll split the message onto the next line in the next version.
>
>>> @@ -274,29 +270,23 @@ static int xlnx_spdif_probe(struct platform_device *pdev)
>>> ret = devm_request_irq(dev, ret,
>>> xlnx_spdifrx_irq_handler,
>>> 0, "XLNX_SPDIF_RX", ctx);
>>> - if (ret) {
>>> - dev_err(dev, "spdif rx irq request failed\n");
>>> - return -ENODEV;
>>> - }
>>> + if (ret)
>>> + return ret;
>>
>> Here you are changing error value and commit message is not saying anything
>> about it.
>>
>
> Oh, sorry. I should have explained this in the commit message.
> devm_request_irq() can return various error codes, such as -EINVAL, -ENOTCONN,
> -ENOMEM, -ENOSYS, and -EBUSY. The existing code overwrites all of them with
> -ENODEV, which does not reflect the actual failure.
> I'll update the commit message to explain this change, and add a
> Fixes: tag if appropriate.
I am not saying it is wrong. I am just saying that it should be likely handled
as separate change/patch to address this issue.
>
>>> ret = devm_snd_soc_register_component(dev, &xlnx_spdif_component,
>>> dai_drv, 1);
>>> - if (ret) {
>>> - dev_err(dev, "SPDIF component registration failed\n");
>>> + if (ret)
>>> return ret;
>>> - }
>>
>> And this is another case. Where origin code didn't return any error which was
>> wrong. That's also not described in commit message and likely this should have
>> Fixed tag.
>>
>
> Sorry, I don't think I fully understand your point.
> The original code already returns the error from
> devm_snd_soc_register_component():
>
> ret = devm_snd_soc_register_component(dev, &xlnx_spdif_component,
> dai_drv, 1);
> if (ret) {
> dev_err(dev, "SPDIF component registration failed\n");
> return ret;
> }
>
> writel(XSPDIF_SOFT_RESET_VALUE, ctx->base + XSPDIF_SOFT_RESET_REG);
> dev_info(dev, "%s DAI registered\n", dai_drv->name);
>
> return 0;
>
> As I understand it, this patch only removes the redundant dev_err()
> call and still returns
> the same error code.
> Could you please clarify what you mean by "the original code didn't
> return any error"?
Sorry I misread this part. Please ignore my comment.
M
next prev parent reply other threads:[~2026-07-10 8:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 5:02 [PATCH 0/2] ASoC: xilinx: Use dev_err_probe() and drop redundant error handling phucduc.bui
2026-07-10 5:02 ` [PATCH 1/2] ASoC: xilinx: xlnx_i2s: " phucduc.bui
2026-07-10 7:29 ` Michal Simek
2026-07-10 5:02 ` [PATCH 2/2] ASoC: xilinx: xlnx_spdif: " phucduc.bui
2026-07-10 7:34 ` Michal Simek
2026-07-10 8:17 ` Bui Duc Phuc
2026-07-10 8:48 ` Michal Simek [this message]
2026-07-10 10:20 ` Bui Duc Phuc
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=da6e74cd-05d7-4ba8-aa75-e186ed8a49cf@amd.com \
--to=michal.simek@amd.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=phucduc.bui@gmail.com \
--cc=tiwai@suse.com \
--cc=vincenzo.frascino@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.