dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: Use size_t for blob property sizes
@ 2014-05-13 10:45 Thierry Reding
  2014-05-13 10:45 ` [PATCH 2/2] drm: Use const data when creating blob properties Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2014-05-13 10:45 UTC (permalink / raw)
  To: dri-devel

From: Thierry Reding <treding@nvidia.com>

size_t is the standard type when dealing with sizes of all kinds. Use it
consistently when instantiating DRM blob properties.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/drm_crtc.c | 8 +++++---
 include/drm/drm_crtc.h     | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index d8b7099abece..fe511674b1c4 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -3538,8 +3538,9 @@ done:
 	return ret;
 }
 
-static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev, int length,
-							  void *data)
+static struct drm_property_blob *
+drm_property_create_blob(struct drm_device *dev, size_t length,
+			 void *data)
 {
 	struct drm_property_blob *blob;
 	int ret;
@@ -3636,7 +3637,8 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector,
 					    struct edid *edid)
 {
 	struct drm_device *dev = connector->dev;
-	int ret, size;
+	size_t size;
+	int ret;
 
 	if (connector->edid_blob_ptr)
 		drm_property_destroy_blob(dev, connector->edid_blob_ptr);
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index e55fccbe7c42..19884cc583d9 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -173,7 +173,7 @@ struct drm_framebuffer {
 struct drm_property_blob {
 	struct drm_mode_object base;
 	struct list_head head;
-	unsigned int length;
+	size_t length;
 	unsigned char data[];
 };
 
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-13 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 10:45 [PATCH 1/2] drm: Use size_t for blob property sizes Thierry Reding
2014-05-13 10:45 ` [PATCH 2/2] drm: Use const data when creating blob properties Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox