[RESEND PATCH v2] ASoC: fsl-asoc-card: change dev_err to dev_err_probe for defer probe

Subsystems: freescale soc sound drivers, sound, sound - soc layer / dynamic audio power management (asoc), the rest

STALE1935d

4 messages, 3 authors, 2021-06-22 · open the first message on its own page

[RESEND PATCH v2] ASoC: fsl-asoc-card: change dev_err to dev_err_probe for defer probe

From: Shengjiu Wang <hidden>
Date: 2021-06-22 01:31:59

Don't need to print error message for defer probe

Signed-off-by: Shengjiu Wang <redacted>
---
changes in v2:
- use dev_err_probe instead of dev_dbg

 sound/soc/fsl/fsl-asoc-card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 121e08c2af2a..24c890d76da0 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -708,8 +708,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
 	of_node_put(framemaster);
 
 	if (!fsl_asoc_card_is_ac97(priv) && !codec_dev) {
-		dev_err(&pdev->dev, "failed to find codec device\n");
 		ret = -EPROBE_DEFER;
+		dev_err_probe(&pdev->dev, ret, "failed to find codec device\n");
 		goto asrc_fail;
 	}
 
-- 
2.27.0

Re: [RESEND PATCH v2] ASoC: fsl-asoc-card: change dev_err to dev_err_probe for defer probe

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-06-22 01:44:45

Hi Shengjiu,

On Mon, Jun 21, 2021 at 10:31 PM Shengjiu Wang [off-list ref] wrote:
quoted hunk
Don't need to print error message for defer probe

Signed-off-by: Shengjiu Wang <redacted>
---
changes in v2:
- use dev_err_probe instead of dev_dbg

 sound/soc/fsl/fsl-asoc-card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 121e08c2af2a..24c890d76da0 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -708,8 +708,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
        of_node_put(framemaster);

        if (!fsl_asoc_card_is_ac97(priv) && !codec_dev) {
-               dev_err(&pdev->dev, "failed to find codec device\n");
                ret = -EPROBE_DEFER;
+               dev_err_probe(&pdev->dev, ret, "failed to find codec device\n");
I know I suggested dev_err_probe() before, but looking at this again, I realized
that the error message will never be printed.

Maybe the error message could just be deleted?

Re: [RESEND PATCH v2] ASoC: fsl-asoc-card: change dev_err to dev_err_probe for defer probe

From: Shengjiu Wang <shengjiu.wang@gmail.com>
Date: 2021-06-22 01:53:32

On Tue, Jun 22, 2021 at 9:45 AM Fabio Estevam [off-list ref] wrote:
Hi Shengjiu,

On Mon, Jun 21, 2021 at 10:31 PM Shengjiu Wang [off-list ref] wrote:
quoted
Don't need to print error message for defer probe

Signed-off-by: Shengjiu Wang <redacted>
---
changes in v2:
- use dev_err_probe instead of dev_dbg

 sound/soc/fsl/fsl-asoc-card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 121e08c2af2a..24c890d76da0 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -708,8 +708,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
        of_node_put(framemaster);

        if (!fsl_asoc_card_is_ac97(priv) && !codec_dev) {
-               dev_err(&pdev->dev, "failed to find codec device\n");
                ret = -EPROBE_DEFER;
+               dev_err_probe(&pdev->dev, ret, "failed to find codec device\n");
I know I suggested dev_err_probe() before, but looking at this again, I realized
that the error message will never be printed.

Maybe the error message could just be deleted?
so I think we can use the v1 one,  use dev_dbg instead.

best regards
wang shengjiu

Re: [RESEND PATCH v2] ASoC: fsl-asoc-card: change dev_err to dev_err_probe for defer probe

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-06-22 02:16:40

On Mon, Jun 21, 2021 at 10:53 PM Shengjiu Wang [off-list ref] wrote:
so I think we can use the v1 one,  use dev_dbg instead.
Agreed. I have just reviewed v1.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help