diff options
author | Thierry Reding <treding@nvidia.com> | 2014-05-13 11:36:13 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-11-13 10:43:48 +0100 |
commit | ecbbe59bbb1cd2973e031c5b6ba28653d66a17de (patch) | |
tree | 7db9f365a3e6c370e43b94a009d8fb75622bc71a | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
download | linux-ecbbe59bbb1cd2973e031c5b6ba28653d66a17de.tar.bz2 |
drm: Use size_t for blob property sizes
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>
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 12 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index e79c8d3700d8..d4d783477c99 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -3938,8 +3938,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; @@ -4023,8 +4024,8 @@ int drm_mode_connector_set_path_property(struct drm_connector *connector, char *path) { struct drm_device *dev = connector->dev; - int ret, size; - size = strlen(path) + 1; + size_t size = strlen(path) + 1; + int ret; connector->path_blob_ptr = drm_property_create_blob(connector->dev, size, path); @@ -4053,7 +4054,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; /* ignore requests to set edid when overridden */ if (connector->override_edid) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index c40070a92d6b..628369c08503 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -196,7 +196,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[]; }; |