* [PATCH] drm/panfrost: devfreq: Don't display error for EPROBE_DEFER
@ 2021-07-21 21:48 Chris Morgan
2021-07-23 11:06 ` Steven Price
0 siblings, 1 reply; 2+ messages in thread
From: Chris Morgan @ 2021-07-21 21:48 UTC (permalink / raw)
To: dri-devel; +Cc: airlied, Chris Morgan, alyssa.rosenzweig, steven.price
From: Chris Morgan <macromorgan@hotmail.com>
Set a condition for the message of "Couldn't set OPP regulators" to not
display if the error code is EPROBE_DEFER. Note that I used an if
statement to capture the condition instead of the dev_err_probe
function because I didn't want to change the DRM_DEV_ERROR usage.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 3644652f726f..194af7f607a6 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -106,7 +106,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
if (ret) {
/* Continue if the optional regulator is missing */
if (ret != -ENODEV) {
- DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
+ if (ret != -EPROBE_DEFER)
+ DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
return ret;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/panfrost: devfreq: Don't display error for EPROBE_DEFER
2021-07-21 21:48 [PATCH] drm/panfrost: devfreq: Don't display error for EPROBE_DEFER Chris Morgan
@ 2021-07-23 11:06 ` Steven Price
0 siblings, 0 replies; 2+ messages in thread
From: Steven Price @ 2021-07-23 11:06 UTC (permalink / raw)
To: Chris Morgan, dri-devel; +Cc: airlied, alyssa.rosenzweig, Chris Morgan
On 21/07/2021 22:48, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
>
> Set a condition for the message of "Couldn't set OPP regulators" to not
> display if the error code is EPROBE_DEFER. Note that I used an if
> statement to capture the condition instead of the dev_err_probe
> function because I didn't want to change the DRM_DEV_ERROR usage.
Note that this file (panfost_devfreq.c) is actually the odd one out in
terms of using the DRM_DEV_xxx macros. The rest of the panfrost driver
uses the standard dev_xxx ones. So tidying this up to match the rest of
the driver would also allow us to use dev_err_probe(). But as a point
fix this patch is fine and correct. Thanks!
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Steven Price <steven.price@arm.com>
I'll apply this to drm-misc-next.
Thanks,
Steve
> ---
> drivers/gpu/drm/panfrost/panfrost_devfreq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> index 3644652f726f..194af7f607a6 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
> @@ -106,7 +106,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
> if (ret) {
> /* Continue if the optional regulator is missing */
> if (ret != -ENODEV) {
> - DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
> + if (ret != -EPROBE_DEFER)
> + DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
> return ret;
> }
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-23 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 21:48 [PATCH] drm/panfrost: devfreq: Don't display error for EPROBE_DEFER Chris Morgan
2021-07-23 11:06 ` Steven Price
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).