* Re: [PATCH] ASoC: mediatek: mt7986: silence error in case of -EPROBE_DEFER
2023-12-11 1:33 [PATCH] ASoC: mediatek: mt7986: silence error in case of -EPROBE_DEFER Daniel Golle
@ 2023-12-11 4:07 ` Fei Shao
2023-12-11 4:08 ` Maso Huang (黃加竹)
2023-12-11 9:48 ` AngeloGioacchino Del Regno
2 siblings, 0 replies; 4+ messages in thread
From: Fei Shao @ 2023-12-11 4:07 UTC (permalink / raw)
To: Daniel Golle
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Matthias Brugger, AngeloGioacchino Del Regno, Maso Huang,
linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek
Hi Daniel,
On Mon, Dec 11, 2023 at 9:33 AM Daniel Golle <daniel@makrotopia.org> wrote:
>
> If probe is defered no error should be printed. Mute it.
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
> sound/soc/mediatek/mt7986/mt7986-wm8960.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/mediatek/mt7986/mt7986-wm8960.c b/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> index c1390b3734101..24a4b943030d7 100644
> --- a/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> +++ b/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> @@ -144,7 +144,9 @@ static int mt7986_wm8960_machine_probe(struct platform_device *pdev)
>
> ret = devm_snd_soc_register_card(&pdev->dev, card);
> if (ret) {
> - dev_err(&pdev->dev, "%s snd_soc_register_card fail: %d\n", __func__, ret);
> + if (ret != -EPROBE_DEFER)
> + dev_err(&pdev->dev, "%s snd_soc_register_card fail: %d\n", __func__, ret);
> +
Please consider using dev_err_probe() instead.
Regards,
Fei
> goto err_of_node_put;
> }
>
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: mediatek: mt7986: silence error in case of -EPROBE_DEFER
2023-12-11 1:33 [PATCH] ASoC: mediatek: mt7986: silence error in case of -EPROBE_DEFER Daniel Golle
2023-12-11 4:07 ` Fei Shao
@ 2023-12-11 4:08 ` Maso Huang (黃加竹)
2023-12-11 9:48 ` AngeloGioacchino Del Regno
2 siblings, 0 replies; 4+ messages in thread
From: Maso Huang (黃加竹) @ 2023-12-11 4:08 UTC (permalink / raw)
To: linux-kernel, linux-mediatek, linux-sound, broonie, tiwai,
lgirdwood, linux-arm-kernel, matthias.bgg, daniel, perex,
angelogioacchino.delregno
On Mon, 2023-12-11 at 01:33 +0000, Daniel Golle wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> If probe is defered no error should be printed. Mute it.
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
>
Reviewed-by: Maso Huang <maso.huang@mediatek.com>
> ---
> sound/soc/mediatek/mt7986/mt7986-wm8960.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> b/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> index c1390b3734101..24a4b943030d7 100644
> --- a/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> +++ b/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> @@ -144,7 +144,9 @@ static int mt7986_wm8960_machine_probe(struct
> platform_device *pdev)
>
> ret = devm_snd_soc_register_card(&pdev->dev, card);
> if (ret) {
> -dev_err(&pdev->dev, "%s snd_soc_register_card fail: %d\n", __func__,
> ret);
> +if (ret != -EPROBE_DEFER)
> +dev_err(&pdev->dev, "%s snd_soc_register_card fail: %d\n", __func__,
> ret);
> +
> goto err_of_node_put;
> }
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: mediatek: mt7986: silence error in case of -EPROBE_DEFER
2023-12-11 1:33 [PATCH] ASoC: mediatek: mt7986: silence error in case of -EPROBE_DEFER Daniel Golle
2023-12-11 4:07 ` Fei Shao
2023-12-11 4:08 ` Maso Huang (黃加竹)
@ 2023-12-11 9:48 ` AngeloGioacchino Del Regno
2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-12-11 9:48 UTC (permalink / raw)
To: Daniel Golle, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Matthias Brugger, Maso Huang, linux-sound,
linux-kernel, linux-arm-kernel, linux-mediatek
Il 11/12/23 02:33, Daniel Golle ha scritto:
> If probe is defered no error should be printed. Mute it.
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
> sound/soc/mediatek/mt7986/mt7986-wm8960.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/mediatek/mt7986/mt7986-wm8960.c b/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> index c1390b3734101..24a4b943030d7 100644
> --- a/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> +++ b/sound/soc/mediatek/mt7986/mt7986-wm8960.c
> @@ -144,7 +144,9 @@ static int mt7986_wm8960_machine_probe(struct platform_device *pdev)
>
> ret = devm_snd_soc_register_card(&pdev->dev, card);
> if (ret) {
> - dev_err(&pdev->dev, "%s snd_soc_register_card fail: %d\n", __func__, ret);
> + if (ret != -EPROBE_DEFER)
> + dev_err(&pdev->dev, "%s snd_soc_register_card fail: %d\n", __func__, ret);
This is *exactly* what dev_err_probe() does! :-)
dev_err_probe(&pdev->dev, ret, "%s snd_soc_register_card fail: %d\n", __func__);
Regards,
Angelo
^ permalink raw reply [flat|nested] 4+ messages in thread