* [PATCH v2] mfd: wm8994: Switch to use dev_err_probe() helper
@ 2023-12-20 2:59 yang.guang5
2023-12-21 15:22 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: yang.guang5 @ 2023-12-20 2:59 UTC (permalink / raw)
To: lee; +Cc: jiang.xuexin, chen.haonan2, cgel.zte, patches, linux-kernel
From: Yang Guang <yang.guang5@zte.com.cn>
dev_err() can be replace with dev_err_probe() which will
check if error code is -EPROBE_DEFER.
Signed-off-by: Chen Haonan <chen.haonan2@zte.com.cn>
---
drivers/mfd/wm8994-core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index d5ac066f9db4..c43273527425 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -378,10 +378,8 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
*/
ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies,
wm8994->supplies);
- if (ret != 0) {
- if (ret != -EPROBE_DEFER)
- dev_err(wm8994->dev, "Failed to get supplies: %d\n",
- ret);
+ if (ret != 0) {
+ dev_err_probe(wm8994->dev, ret, "Failed to get supplies\n");
goto err;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] mfd: wm8994: Switch to use dev_err_probe() helper
2023-12-20 2:59 [PATCH v2] mfd: wm8994: Switch to use dev_err_probe() helper yang.guang5
@ 2023-12-21 15:22 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2023-12-21 15:22 UTC (permalink / raw)
To: yang.guang5; +Cc: jiang.xuexin, chen.haonan2, cgel.zte, patches, linux-kernel
On Wed, 20 Dec 2023, yang.guang5@zte.com.cn wrote:
> From: Yang Guang <yang.guang5@zte.com.cn>
>
> dev_err() can be replace with dev_err_probe() which will
> check if error code is -EPROBE_DEFER.
>
> Signed-off-by: Chen Haonan <chen.haonan2@zte.com.cn>
> ---
> drivers/mfd/wm8994-core.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
How did you create and send this patch?
When I try to apply this, I get:
ERROR: patch seems to be corrupt (line wrapped?)
#37: FILE: drivers/mfd/wm8994-core.c:384:
2.25.1
ERROR: Missing Signed-off-by: line by nominal patch author 'Yang Guang <yang.guang5@zte.com.cn>'
total: 2 errors, 0 warnings, 14 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
"[PATCH v2] mfd: wm8994: Switch to use dev_err_probe() helper" has style problems, please review.
AND:
Applying: mfd: wm8994: Switch to use dev_err_probe() helper
error: corrupt patch at line 22
error: could not build fake ancestor
Patch failed at 0001 mfd: wm8994: Switch to use dev_err_probe() helper
Please fix and resubmit.
> diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
> index d5ac066f9db4..c43273527425 100644
> --- a/drivers/mfd/wm8994-core.c
> +++ b/drivers/mfd/wm8994-core.c
> @@ -378,10 +378,8 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
> */
> ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies,
> wm8994->supplies);
> - if (ret != 0) {
> - if (ret != -EPROBE_DEFER)
> - dev_err(wm8994->dev, "Failed to get supplies: %d\n",
> - ret);
> + if (ret != 0) {
> + dev_err_probe(wm8994->dev, ret, "Failed to get supplies\n");
> goto err;
> }
>
> --
> 2.25.1
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-21 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-20 2:59 [PATCH v2] mfd: wm8994: Switch to use dev_err_probe() helper yang.guang5
2023-12-21 15:22 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox