mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel <alsa-devel@alsa-project.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Pavel Machek <pavel@denx.de>, LKML <linux-kernel@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Biju Das <biju.das.jz@bp.renesas.com>
Subject: Re: [PATCH v2 2/3] ASoC: sh: rz-ssi: Propagate error codes returned from platform_get_irq_byname()
Date: Tue, 26 Apr 2022 13:17:18 +0300	[thread overview]
Message-ID: <fb6b6a4c-d184-8c26-ac25-4afbacf3d534@omp.ru> (raw)
In-Reply-To: <CA+V-a8s=7nDHEE=kcdqcyM5SurY9KwteNwnc7PZ4xiqGQFvY=g@mail.gmail.com>

On 4/26/22 12:55 PM, Lad, Prabhakar wrote:

[...]
>>> Propagate error codes returned from platform_get_irq_byname() instead of
>>> returning -ENODEV. platform_get_irq_byname() may return -EPROBE_DEFER, to
>>> handle such cases propagate the error codes.
>>>
>>> While at it drop the dev_err_probe() messages as platform_get_irq_byname()
>>> already does this for us in case of error.
>>>
>>> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>>> ---
>>> v1->v2
>>> * No change
>>> ---
>>>  sound/soc/sh/rz-ssi.c | 9 +++------
>>>  1 file changed, 3 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c
>>> index cec458b8c507..d9a684e71ec3 100644
>>> --- a/sound/soc/sh/rz-ssi.c
>>> +++ b/sound/soc/sh/rz-ssi.c
>>> @@ -977,8 +977,7 @@ static int rz_ssi_probe(struct platform_device *pdev)
>>>       /* Error Interrupt */
>>>       ssi->irq_int = platform_get_irq_byname(pdev, "int_req");
>>>       if (ssi->irq_int < 0)
>>> -             return dev_err_probe(&pdev->dev, -ENODEV,
>>> -                                  "Unable to get SSI int_req IRQ\n");
>>> +             return ssi->irq_int;
>>
>>    Why not:
>>
>>                 return dev_err_probe(&pdev->dev, ssi->irq_int,
>>                                      "Unable to get SSI int_req IRQ\n");
>>
> That is because platform_get_irq_byname() already does this for us [0]
> (also mentioned in the commit message). In case I keep the
> dev_err_probe() I'll get two prints for each error.
> 
> [0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/platform.c?h=v5.18-rc4#n471

   Ah! Sorry, didn't read your commit log... :-/
   More shame on me as it was me who added dev_err_probe() call there! :-) 

> Cheers,
> Prabhakar

[...]

MBR, Sergey

  reply	other threads:[~2022-04-26 10:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26  7:49 [PATCH v2 0/3] ASoC: sh: rz-ssi: Trivial fixes Lad Prabhakar
2022-04-26  7:49 ` [PATCH v2 1/3] ASoC: sh: rz-ssi: Drop SSIFSR_TDC and SSIFSR_RDC macros Lad Prabhakar
2022-04-26 13:12   ` Geert Uytterhoeven
2022-04-26  7:49 ` [PATCH v2 2/3] ASoC: sh: rz-ssi: Propagate error codes returned from platform_get_irq_byname() Lad Prabhakar
2022-04-26  9:47   ` Sergey Shtylyov
2022-04-26  9:55     ` Lad, Prabhakar
2022-04-26 10:17       ` Sergey Shtylyov [this message]
2022-04-26  7:49 ` [PATCH v2 3/3] ASoC: sh: rz-ssi: Release the DMA channels in rz_ssi_probe() error path Lad Prabhakar
2022-04-26 13:48   ` Biju Das
2022-04-27 22:02 ` [PATCH v2 0/3] ASoC: sh: rz-ssi: Trivial fixes 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=fb6b6a4c-d184-8c26-ac25-4afbacf3d534@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=alsa-devel@alsa-project.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=pavel@denx.de \
    --cc=perex@perex.cz \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --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

all inboxes | Powered by JetHome®