linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/vc4: hdmi: Limit noise when deferring snd card registration
@ 2021-06-29 12:17 Nicolas Saenz Julienne
  2021-07-06  9:15 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Saenz Julienne @ 2021-06-29 12:17 UTC (permalink / raw)
  To: mripard
  Cc: emma, airlied, daniel, dri-devel, linux-kernel, linux-rpi-kernel,
	Nicolas Saenz Julienne

We don't want to print an error message each time
devm_snd_soc_register_card() returns -EPROBE_DEFER, the function will
most likely succeed some time in the future, once the missing resources
are available. So use dev_err_probe(), which will redirect the messages
to the debug log level in such case.

Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index 04936cd6db8c..32da45821d3a 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -1575,7 +1575,7 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
 	snd_soc_card_set_drvdata(card, vc4_hdmi);
 	ret = devm_snd_soc_register_card(dev, card);
 	if (ret)
-		dev_err(dev, "Could not register sound card: %d\n", ret);
+		dev_err_probe(dev, ret, "Could not register sound card\n");
 
 	return ret;
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/vc4: hdmi: Limit noise when deferring snd card registration
  2021-06-29 12:17 [PATCH] drm/vc4: hdmi: Limit noise when deferring snd card registration Nicolas Saenz Julienne
@ 2021-07-06  9:15 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2021-07-06  9:15 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: emma, airlied, daniel, dri-devel, linux-kernel, linux-rpi-kernel

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

On Tue, Jun 29, 2021 at 02:17:23PM +0200, Nicolas Saenz Julienne wrote:
> We don't want to print an error message each time
> devm_snd_soc_register_card() returns -EPROBE_DEFER, the function will
> most likely succeed some time in the future, once the missing resources
> are available. So use dev_err_probe(), which will redirect the messages
> to the debug log level in such case.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>

Applied, thanks
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-06  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 12:17 [PATCH] drm/vc4: hdmi: Limit noise when deferring snd card registration Nicolas Saenz Julienne
2021-07-06  9:15 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).