[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231102022946.115603-1-penghao@dingdao.com>
Date: Thu, 2 Nov 2023 10:29:46 +0800
From: "Peng Hao" <penghao@...gdao.com>
To: <maarten.lankhorst@...ux.intel.com>, <mripard@...nel.org>,
<tzimmermann@...e.de>, <airlied@...il.com>, <daniel@...ll.ch>
Cc: <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
<penghao@...gdao.com>
Subject: [PATCH] gpu/drm/drm_framebuffer.c: Use Macro instead of actual number.
Use Macro DRM_FORMAT_MAX_PLANES instead of 4, to improve modifiability.
Signed-off-by: Peng Hao <penghao@...gdao.com>
---
drivers/gpu/drm/drm_framebuffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 2dd97473ca10..bf283dae9090 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -254,7 +254,7 @@ static int framebuffer_check(struct drm_device *dev,
}
}
- for (i = info->num_planes; i < 4; i++) {
+ for (i = info->num_planes; i < DRM_FORMAT_MAX_PLANES; i++) {
if (r->modifier[i]) {
drm_dbg_kms(dev, "non-zero modifier for unused plane %d\n", i);
return -EINVAL;
--
2.37.1
Powered by blists - more mailing lists