From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH 4/4] drm/i915/fb: return proper error codes instead of magic -1
Date: Wed, 24 Apr 2024 14:11:01 +0300 [thread overview]
Message-ID: <20240424111101.1152824-4-jani.nikula@intel.com> (raw)
In-Reply-To: <20240424111101.1152824-1-jani.nikula@intel.com>
Use proper negative error codes intead of magic -1. Don't set a bad
example, as -1 is -EPERM.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/intel_fb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index 86b443433e8b..705f97ef677b 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -563,15 +563,15 @@ static bool intel_fb_is_gen12_ccs_aux_plane(const struct drm_framebuffer *fb, in
* @fb: Framebuffer
*
* Returns:
- * Returns the index of the color clear plane for @fb, or -1 if @fb is not a
- * framebuffer using a render compression/color clear modifier.
+ * Returns the index of the color clear plane for @fb, or -EINVAL if @fb is not
+ * a framebuffer using a render compression/color clear modifier.
*/
int intel_fb_rc_ccs_cc_plane(const struct drm_framebuffer *fb)
{
const struct intel_modifier_desc *md = lookup_modifier(fb->modifier);
if (!md->ccs.cc_planes)
- return -1;
+ return -EINVAL;
drm_WARN_ON_ONCE(fb->dev, hweight8(md->ccs.cc_planes) > 1);
--
2.39.2
next prev parent reply other threads:[~2024-04-24 11:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 11:10 [PATCH 1/4] drm/i915/dvo: return proper error code instead of magic -1 Jani Nikula
2024-04-24 11:10 ` [PATCH 2/4] drm/i915/bios: return proper error codes " Jani Nikula
2024-04-24 11:11 ` [PATCH 3/4] drm/i915/dp: " Jani Nikula
2024-04-24 11:11 ` Jani Nikula [this message]
2024-04-24 11:36 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/4] drm/i915/dvo: return proper error code " Patchwork
2024-04-24 11:44 ` ✓ Fi.CI.BAT: success " Patchwork
2024-04-24 17:33 ` ✗ Fi.CI.IGT: failure " Patchwork
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=20240424111101.1152824-4-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.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