Commit 9c60583c authored by Ville Syrjälä's avatar Ville Syrjälä

Revert "drm: Use a flexible array member for blob property data"

Using a flexible array for the blob data was a mistake by me. It
forces all users of the blob data to cast blob->data to something
else. void* is clearly superior so let's go back to the original
scheme.

Not a clean revert as the code has moved.

This reverts commit d63f5e6b.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180223192506.29992-1-ville.syrjala@linux.intel.comReviewed-by: default avatarShashank Sharma <shashank.sharma@intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 0a00ac97
...@@ -567,6 +567,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length, ...@@ -567,6 +567,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length,
/* This must be explicitly initialised, so we can safely call list_del /* This must be explicitly initialised, so we can safely call list_del
* on it in the removal handler, even if it isn't in a file list. */ * on it in the removal handler, even if it isn't in a file list. */
INIT_LIST_HEAD(&blob->head_file); INIT_LIST_HEAD(&blob->head_file);
blob->data = (void *)blob + sizeof(*blob);
blob->length = length; blob->length = length;
blob->dev = dev; blob->dev = dev;
......
...@@ -209,7 +209,7 @@ struct drm_property_blob { ...@@ -209,7 +209,7 @@ struct drm_property_blob {
struct list_head head_global; struct list_head head_global;
struct list_head head_file; struct list_head head_file;
size_t length; size_t length;
unsigned char data[]; void *data;
}; };
struct drm_prop_enum_list { struct drm_prop_enum_list {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment