drm/qxl: use flexible-array member instead of zero-length array
Subsystems (3)
PATCH 1/1 drm/qxl: use flexible-array member instead of zero-length array
Use flexible-array member introduced in C99 instead of zero-length array. Most of zero-length array was already taken care in previous patch [1]. Now modified few more cases which were not handled earlier.
[1]. https://patchwork.kernel.org/patch/11394197/
--- drivers/gpu/drm/qxl/qxl_dev.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/qxl/qxl_dev.h +8 -8
@@ -271,7 +271,7 @@ struct qxl_mode {/* qxl-1 compat: fixed */ struct qxl_modes {uint32_t n_modes; -struct qxl_mode modes[0 ]; +struct qxl_mode modes[]; };/* qxl-1 compat: append only */
@@ -382,12 +382,12 @@ struct qxl_data_chunk {uint32_t data_size;QXLPHYSICAL prev_chunk;QXLPHYSICAL next_chunk; -uint8_t data[0 ]; +uint8_t data[]; };struct qxl_message {union qxl_release_info release_info; -uint8_t data[0 ]; +uint8_t data[]; };struct qxl_compat_update_cmd {
@@ -469,7 +469,7 @@ struct qxl_raster_glyph {struct qxl_point glyph_origin;uint16_t width;uint16_t height; -uint8_t data[0 ]; +uint8_t data[]; };struct qxl_string {
@@ -768,7 +768,7 @@ enum {struct qxl_path_seg {uint32_t flags;uint32_t count; -struct qxl_point_fix points[0 ]; +struct qxl_point_fix points[]; };struct qxl_path {
@@ -819,7 +819,7 @@ struct qxl_image_descriptor {struct qxl_palette {uint64_t unique;uint16_t num_ents; -uint32_t ents[0 ]; +uint32_t ents[]; };struct qxl_bitmap {
@@ -838,7 +838,7 @@ struct qxl_surface_id {struct qxl_encoder_data {uint32_t data_size; -uint8_t data[0 ]; +uint8_t data[]; };struct qxl_image {
@@ -868,7 +868,7 @@ struct qxl_monitors_config {uint16_t count;uint16_t max_allowed;/* If it is 0 no fixed limit is given by the driver */ -struct qxl_head heads[0 ]; +struct qxl_head heads[]; };#pragma pack(pop)
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Tian Tao
Use flexible-array member introduced in C99 instead of zero-length array. Most of zero-length array was already taken care in previous patch [1]. Now modified few more cases which were not handled earlier.
[1]. https://patchwork.kernel.org/patch/11394197/
Signed-off-by Tian Tao <[email protected]>
Pushed to drm-misc-next.
thanks,
Gerd
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel