From: Emilio Mendoza Reyes <emendoz@g.clemson.edu>
To: neil.armstrong@linaro.org, dianders@chromium.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Jani Nikula <jani.nikula@linux.intel.com>
Subject: Re: [PATCH 2/2] drm/panel: Promote warn_dev to WARN for invalid calls in drm_panel.c
Date: Mon, 25 Mar 2024 08:46:16 -0400 [thread overview]
Message-ID: <4878769.GXAFRqVoOG@mephi-laptop> (raw)
In-Reply-To: <87jzlqk5xr.fsf@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2483 bytes --]
On Monday, March 25, 2024 5:37:52 AM EDT Jani Nikula wrote:
> Please use git format-patch and/or send-email to send patches, without
> the inline PGP.
Yeah, sorry about that. I only noticed it was inline PGP after I sent the
patches. I didn't know if it would be okay to resend right after since I
didn't want to email spam. Sorry!
> Please use dev_WARN() which will handle the device specific warns for
> you, including dev_name().
Alright I changed my patch to use dev_WARN. The new version is at the
end of this email. Thank you for your time. Let me know if I there is
anything else to change.
Thanks,
EMR
Subject: [PATCH] drm/panel: Promote warn_dev to dev_WARN for invalid calls in
drm_panel.c
Partially solve todo in kernel doc by promoting dev_warn calls to
dev_WARN.
Link: https://www.kernel.org/doc/html/v6.8/gpu/todo.html#clean-up-checks-for-already-prepared-enabled-in-panels
Signed-off-by: Emilio Mendoza Reyes <emendoz@clemson.edu>
---
drivers/gpu/drm/drm_panel.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index cfbe020de54e..4459f4f5fe66 100644
--- a/drivers/gpu/drm/drm_panel.c
+++ b/drivers/gpu/drm/drm_panel.c
@@ -114,7 +114,7 @@ int drm_panel_prepare(struct drm_panel *panel)
return -EINVAL;
if (panel->prepared) {
- dev_warn(panel->dev, "Skipping prepare of already prepared panel\n");
+ dev_WARN(panel->dev, "Unexpected attempt to prepare an already prepared panel\n");
return 0;
}
@@ -162,7 +162,7 @@ int drm_panel_unprepare(struct drm_panel *panel)
return -EINVAL;
if (!panel->prepared) {
- dev_warn(panel->dev, "Skipping unprepare of already unprepared panel\n");
+ dev_WARN(panel->dev, "Unexpected attempt to unprepare an already unprepared panel\n");
return 0;
}
@@ -208,7 +208,7 @@ int drm_panel_enable(struct drm_panel *panel)
return -EINVAL;
if (panel->enabled) {
- dev_warn(panel->dev, "Skipping enable of already enabled panel\n");
+ dev_WARN(panel->dev, "Unexpected attempt to enable an already enabled panel\n");
return 0;
}
@@ -246,7 +246,7 @@ int drm_panel_disable(struct drm_panel *panel)
return -EINVAL;
if (!panel->enabled) {
- dev_warn(panel->dev, "Skipping disable of already disabled panel\n");
+ dev_WARN(panel->dev, "Unexpected attempt to disable an already disabled panel\n");
return 0;
}
--
2.44.0
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2024-03-25 12:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-24 2:04 [PATCH 2/2] drm/panel: Promote warn_dev to WARN for invalid calls in drm_panel.c Emilio Mendoza Reyes
2024-03-25 9:37 ` Jani Nikula
2024-03-25 12:46 ` Emilio Mendoza Reyes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4878769.GXAFRqVoOG@mephi-laptop \
--to=emendoz@g.clemson.edu \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox