* [PATCH -next] regulator: drivers: Remove unnecessary print function dev_err()
@ 2022-08-25 7:04 Yang Li
2022-08-25 13:09 ` Mark Brown
2022-08-26 6:10 ` Christophe JAILLET
0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2022-08-25 7:04 UTC (permalink / raw)
To: tony; +Cc: lgirdwood, broonie, linux-omap, linux-kernel, Yang Li,
Abaci Robot
The print function dev_err() is redundant because
platform_get_irq_byname() already prints an error.
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1986
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/regulator/tps65219-regulator.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c
index 7ba2594e437c..ab16e6665625 100644
--- a/drivers/regulator/tps65219-regulator.c
+++ b/drivers/regulator/tps65219-regulator.c
@@ -363,11 +363,9 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
irq_type = &tps65219_regulator_irq_types[i];
irq = platform_get_irq_byname(pdev, irq_type->irq_name);
- if (irq < 0) {
- dev_err(tps->dev, "Failed to get IRQ %s: %d\n",
- irq_type->irq_name, irq);
+ if (irq < 0)
return -EINVAL;
- }
+
irq_data[i].dev = tps->dev;
irq_data[i].type = irq_type;
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] regulator: drivers: Remove unnecessary print function dev_err()
2022-08-25 7:04 [PATCH -next] regulator: drivers: Remove unnecessary print function dev_err() Yang Li
@ 2022-08-25 13:09 ` Mark Brown
2022-08-26 6:10 ` Christophe JAILLET
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-08-25 13:09 UTC (permalink / raw)
To: Yang Li, tony; +Cc: lgirdwood, linux-omap, linux-kernel, Abaci Robot
On Thu, 25 Aug 2022 15:04:38 +0800, Yang Li wrote:
> The print function dev_err() is redundant because
> platform_get_irq_byname() already prints an error.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: drivers: Remove unnecessary print function dev_err()
commit: d46f737208a45ddff2aef4b57218caa0476af2b6
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] 3+ messages in thread
* Re: [PATCH -next] regulator: drivers: Remove unnecessary print function dev_err()
2022-08-25 7:04 [PATCH -next] regulator: drivers: Remove unnecessary print function dev_err() Yang Li
2022-08-25 13:09 ` Mark Brown
@ 2022-08-26 6:10 ` Christophe JAILLET
1 sibling, 0 replies; 3+ messages in thread
From: Christophe JAILLET @ 2022-08-26 6:10 UTC (permalink / raw)
To: Yang Li, tony; +Cc: lgirdwood, broonie, linux-omap, linux-kernel, Abaci Robot
Le 25/08/2022 à 09:04, Yang Li a écrit :
> The print function dev_err() is redundant because
> platform_get_irq_byname() already prints an error.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1986
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> drivers/regulator/tps65219-regulator.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c
> index 7ba2594e437c..ab16e6665625 100644
> --- a/drivers/regulator/tps65219-regulator.c
> +++ b/drivers/regulator/tps65219-regulator.c
> @@ -363,11 +363,9 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
> irq_type = &tps65219_regulator_irq_types[i];
>
> irq = platform_get_irq_byname(pdev, irq_type->irq_name);
> - if (irq < 0) {
> - dev_err(tps->dev, "Failed to get IRQ %s: %d\n",
> - irq_type->irq_name, irq);
> + if (irq < 0)
> return -EINVAL;
> - }
> +
> irq_data[i].dev = tps->dev;
> irq_data[i].type = irq_type;
>
Hi,
just in case it has an importance, this is not exactly the same.
Previously, the error was related to 'pdev', now it is related to 'tps'
and we have:
'struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent);'
I don't think it really matters, but just in case...
CJ
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-26 6:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-25 7:04 [PATCH -next] regulator: drivers: Remove unnecessary print function dev_err() Yang Li
2022-08-25 13:09 ` Mark Brown
2022-08-26 6:10 ` Christophe JAILLET
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox