2022-07-11 11:26:32

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v1 1/4] ALSA: hda: cs35l41: Improve dev_err_probe() messaging

Drop duplicate print of returned value in the messages and use pattern
return dev_err_probe(...) where it's possible.

Signed-off-by: Andy Shevchenko <[email protected]>
---
sound/pci/hda/cs35l41_hda.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index cce27a86267f..23a97ada7272 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -460,10 +460,8 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
dev_set_drvdata(dev, cs35l41);

ret = cs35l41_hda_read_acpi(cs35l41, device_name, id);
- if (ret) {
- dev_err_probe(cs35l41->dev, ret, "Platform not supported %d\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(cs35l41->dev, ret, "Platform not supported\n");

if (IS_ERR(cs35l41->reset_gpio)) {
ret = PTR_ERR(cs35l41->reset_gpio);
@@ -471,7 +469,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
if (ret == -EBUSY) {
dev_info(cs35l41->dev, "Reset line busy, assuming shared reset\n");
} else {
- dev_err_probe(cs35l41->dev, ret, "Failed to get reset GPIO: %d\n", ret);
+ dev_err_probe(cs35l41->dev, ret, "Failed to get reset GPIO\n");
goto err;
}
}
--
2.35.1


2022-07-12 09:36:07

by Takashi Iwai

[permalink] [raw]
Subject: Re: [PATCH v1 1/4] ALSA: hda: cs35l41: Improve dev_err_probe() messaging

On Mon, 11 Jul 2022 11:52:16 +0200,
Andy Shevchenko wrote:
>
> Drop duplicate print of returned value in the messages and use pattern
> return dev_err_probe(...) where it's possible.
>
> Signed-off-by: Andy Shevchenko <[email protected]>

Applied this one, but postpone the rest three patches, as there seems
a build regression according 0day bot.


thanks,

Takashi

2022-07-12 10:10:36

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v1 1/4] ALSA: hda: cs35l41: Improve dev_err_probe() messaging

On Tue, Jul 12, 2022 at 11:35 AM Takashi Iwai <[email protected]> wrote:
>
> On Mon, 11 Jul 2022 11:52:16 +0200,
> Andy Shevchenko wrote:
> >
> > Drop duplicate print of returned value in the messages and use pattern
> > return dev_err_probe(...) where it's possible.
> >
> > Signed-off-by: Andy Shevchenko <[email protected]>
>
> Applied this one, but postpone the rest three patches, as there seems
> a build regression according 0day bot.

Thanks and sorry for that, something (mis)happens, I'll test it
carefully for v2.

--
With Best Regards,
Andy Shevchenko