All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next 1/3] ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper
@ 2022-09-14 13:33 Yang Yingliang
  2022-09-14 13:33 ` [PATCH -next 2/3] ASoC: cs42l42: " Yang Yingliang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yang Yingliang @ 2022-09-14 13:33 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, lgirdwood, yangyingliang

dev_err/dev_dbg() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 sound/soc/bcm/bcm2835-i2s.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index f4d84774dac7..85f705afcdbb 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -841,14 +841,9 @@ static int bcm2835_i2s_probe(struct platform_device *pdev)
 	/* get the clock */
 	dev->clk_prepared = false;
 	dev->clk = devm_clk_get(&pdev->dev, NULL);
-	if (IS_ERR(dev->clk)) {
-		ret = PTR_ERR(dev->clk);
-		if (ret == -EPROBE_DEFER)
-			dev_dbg(&pdev->dev, "could not get clk: %d\n", ret);
-		else
-			dev_err(&pdev->dev, "could not get clk: %d\n", ret);
-		return ret;
-	}
+	if (IS_ERR(dev->clk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(dev->clk),
+				     "could not get clk\n");
 
 	/* Request ioarea */
 	base = devm_platform_ioremap_resource(pdev, 0);
-- 
2.25.1


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

* [PATCH -next 2/3] ASoC: cs42l42: Switch to use dev_err_probe() helper
  2022-09-14 13:33 [PATCH -next 1/3] ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper Yang Yingliang
@ 2022-09-14 13:33 ` Yang Yingliang
  2022-09-14 13:33 ` [PATCH -next 3/3] ASoC: soc-dapm: " Yang Yingliang
  2022-09-14 16:07 ` [PATCH -next 1/3] ASoC: bcm2835-i2s: " Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Yang Yingliang @ 2022-09-14 13:33 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, lgirdwood, yangyingliang

dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 sound/soc/codecs/cs42l42.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index 7d8f1b161a65..205babc4268b 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -2263,11 +2263,9 @@ static int cs42l42_i2c_probe(struct i2c_client *i2c_client)
 					   NULL, cs42l42_irq_thread,
 					   IRQF_ONESHOT | IRQF_TRIGGER_LOW,
 					   "cs42l42", cs42l42);
-		if (ret == -EPROBE_DEFER) {
-			goto err_disable_noirq;
-		} else if (ret != 0) {
-			dev_err(&i2c_client->dev,
-				"Failed to request IRQ: %d\n", ret);
+		if (ret) {
+			dev_err_probe(&i2c_client->dev, ret,
+				      "Failed to request IRQ\n");
 			goto err_disable_noirq;
 		}
 	}
-- 
2.25.1


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

* [PATCH -next 3/3] ASoC: soc-dapm: Switch to use dev_err_probe() helper
  2022-09-14 13:33 [PATCH -next 1/3] ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper Yang Yingliang
  2022-09-14 13:33 ` [PATCH -next 2/3] ASoC: cs42l42: " Yang Yingliang
@ 2022-09-14 13:33 ` Yang Yingliang
  2022-09-14 16:07 ` [PATCH -next 1/3] ASoC: bcm2835-i2s: " Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Yang Yingliang @ 2022-09-14 13:33 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, lgirdwood, yangyingliang

dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 sound/soc/soc-dapm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 47a7bf99472e..2d105bfee387 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3764,9 +3764,8 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
 	return w;
 
 request_failed:
-	if (ret != -EPROBE_DEFER)
-		dev_err(dapm->dev, "ASoC: Failed to request %s: %d\n",
-			w->name, ret);
+	dev_err_probe(dapm->dev, ret, "ASoC: Failed to request %s\n",
+		      w->name);
 	kfree_const(w->name);
 name_failed:
 	kfree_const(w->sname);
-- 
2.25.1


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

* Re: [PATCH -next 1/3] ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper
  2022-09-14 13:33 [PATCH -next 1/3] ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper Yang Yingliang
  2022-09-14 13:33 ` [PATCH -next 2/3] ASoC: cs42l42: " Yang Yingliang
  2022-09-14 13:33 ` [PATCH -next 3/3] ASoC: soc-dapm: " Yang Yingliang
@ 2022-09-14 16:07 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-09-14 16:07 UTC (permalink / raw)
  To: alsa-devel, Yang Yingliang; +Cc: lgirdwood

On Wed, 14 Sep 2022 21:33:53 +0800, Yang Yingliang wrote:
> dev_err/dev_dbg() can be replace with dev_err_probe() which will check if error
> code is -EPROBE_DEFER.
> 
> 

Applied to

   broonie/sound.git for-next

Thanks!

[1/3] ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper
      commit: b407589583da08405a19f4b0139d128e1ae41658
[2/3] ASoC: cs42l42: Switch to use dev_err_probe() helper
      commit: 28a3fb26e83e013c929a2e1185743ece7e8173ff
[3/3] ASoC: soc-dapm: Switch to use dev_err_probe() helper
      commit: a6b0be65123e1dfbcce6653a82394f989d3372ff

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2022-09-14 16:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 13:33 [PATCH -next 1/3] ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper Yang Yingliang
2022-09-14 13:33 ` [PATCH -next 2/3] ASoC: cs42l42: " Yang Yingliang
2022-09-14 13:33 ` [PATCH -next 3/3] ASoC: soc-dapm: " Yang Yingliang
2022-09-14 16:07 ` [PATCH -next 1/3] ASoC: bcm2835-i2s: " Mark Brown

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.