[PATCH 08/11] drm: i915: i915_oa_sklgt2: constify attribute_group structures.
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav--- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36 +-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_oa_sklgt2.c b/drivers/gpu/drm/i915/i915_oa_sklgt2.c index 1268bed..80e6054 100644 --- a/drivers/gpu/drm/i915/i915_oa_sklgt2.c +++ b/drivers/gpu/drm/i915/i915_oa_sklgt2.c @@ -2900,7 +2900,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_basic = { +static const struct attribute_group group_render_basic = { .name = "f519e481-24d2-4d42-87c9-3fdd12c00202", .attrs = attrs_render_basic, }; @@ -2922,7 +2922,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_basic = { +static const struct attribute_group group_compute_basic = { .name = "fe47b29d-ae51-423e-bff4-27d965a95b60", .attrs = attrs_compute_basic, }; @@ -2944,7 +2944,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_pipe_profile = { +static const struct attribute_group group_render_pipe_profile = { .name = "e0ad5ae0-84ba-4f29-a723-1906c12cb774", .attrs = attrs_render_pipe_profile, }; @@ -2966,7 +2966,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_reads = { +static const struct attribute_group group_memory_reads = { .name = "9bc436dd-6130-4add-affc-283eb6eaa864", .attrs = attrs_memory_reads, }; @@ -2988,7 +2988,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_writes = { +static const struct attribute_group group_memory_writes = { .name = "2ea0da8f-3527-4669-9d9d-13099a7435bf", .attrs = attrs_memory_writes, }; @@ -3010,7 +3010,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extended = { +static const struct attribute_group group_compute_extended = { .name = "d97d16af-028b-4cd1-a672-6210cb5513dd", .attrs = attrs_compute_extended, }; @@ -3032,7 +3032,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_l3_cache = { +static const struct attribute_group group_compute_l3_cache = { .name = "9fb22842-e708-43f7-9752-e0e41670c39e", .attrs = attrs_compute_l3_cache, }; @@ -3054,7 +3054,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_hdc_and_sf = { +static const struct attribute_group group_hdc_and_sf = { .name = "5378e2a1-4248-4188-a4ae-da25a794c603", .attrs = attrs_hdc_and_sf, }; @@ -3076,7 +3076,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_1 = { +static const struct attribute_group group_l3_1 = { .name = "f42cdd6a-b000-42cb-870f-5eb423a7f514", .attrs = attrs_l3_1, }; @@ -3098,7 +3098,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_2 = { +static const struct attribute_group group_l3_2 = { .name = "b9bf2423-d88c-4a7b-a051-627611d00dcc", .attrs = attrs_l3_2, }; @@ -3120,7 +3120,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_3 = { +static const struct attribute_group group_l3_3 = { .name = "2414a93d-d84f-406e-99c0-472161194b40", .attrs = attrs_l3_3, }; @@ -3142,7 +3142,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_rasterizer_and_pixel_backend = { +static const struct attribute_group group_rasterizer_and_pixel_backend = { .name = "53a45d2d-170b-4cf5-b7bb-585120c8e2f5", .attrs = attrs_rasterizer_and_pixel_backend, }; @@ -3164,7 +3164,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler = { +static const struct attribute_group group_sampler = { .name = "b4cff514-a91e-4798-a0b3-426ca13fc9c1", .attrs = attrs_sampler, }; @@ -3186,7 +3186,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group
[PATCH 08/11] drm: i915: i915_oa_sklgt2: constify attribute_group structures.
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36 +-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_oa_sklgt2.c b/drivers/gpu/drm/i915/i915_oa_sklgt2.c index 1268bed..80e6054 100644 --- a/drivers/gpu/drm/i915/i915_oa_sklgt2.c +++ b/drivers/gpu/drm/i915/i915_oa_sklgt2.c @@ -2900,7 +2900,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_basic = { +static const struct attribute_group group_render_basic = { .name = "f519e481-24d2-4d42-87c9-3fdd12c00202", .attrs = attrs_render_basic, }; @@ -2922,7 +2922,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_basic = { +static const struct attribute_group group_compute_basic = { .name = "fe47b29d-ae51-423e-bff4-27d965a95b60", .attrs = attrs_compute_basic, }; @@ -2944,7 +2944,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_pipe_profile = { +static const struct attribute_group group_render_pipe_profile = { .name = "e0ad5ae0-84ba-4f29-a723-1906c12cb774", .attrs = attrs_render_pipe_profile, }; @@ -2966,7 +2966,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_reads = { +static const struct attribute_group group_memory_reads = { .name = "9bc436dd-6130-4add-affc-283eb6eaa864", .attrs = attrs_memory_reads, }; @@ -2988,7 +2988,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_writes = { +static const struct attribute_group group_memory_writes = { .name = "2ea0da8f-3527-4669-9d9d-13099a7435bf", .attrs = attrs_memory_writes, }; @@ -3010,7 +3010,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extended = { +static const struct attribute_group group_compute_extended = { .name = "d97d16af-028b-4cd1-a672-6210cb5513dd", .attrs = attrs_compute_extended, }; @@ -3032,7 +3032,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_l3_cache = { +static const struct attribute_group group_compute_l3_cache = { .name = "9fb22842-e708-43f7-9752-e0e41670c39e", .attrs = attrs_compute_l3_cache, }; @@ -3054,7 +3054,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_hdc_and_sf = { +static const struct attribute_group group_hdc_and_sf = { .name = "5378e2a1-4248-4188-a4ae-da25a794c603", .attrs = attrs_hdc_and_sf, }; @@ -3076,7 +3076,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_1 = { +static const struct attribute_group group_l3_1 = { .name = "f42cdd6a-b000-42cb-870f-5eb423a7f514", .attrs = attrs_l3_1, }; @@ -3098,7 +3098,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_2 = { +static const struct attribute_group group_l3_2 = { .name = "b9bf2423-d88c-4a7b-a051-627611d00dcc", .attrs = attrs_l3_2, }; @@ -3120,7 +3120,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_3 = { +static const struct attribute_group group_l3_3 = { .name = "2414a93d-d84f-406e-99c0-472161194b40", .attrs = attrs_l3_3, }; @@ -3142,7 +3142,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_rasterizer_and_pixel_backend = { +static const struct attribute_group group_rasterizer_and_pixel_backend = { .name = "53a45d2d-170b-4cf5-b7bb-585120c8e2f5", .attrs = attrs_rasterizer_and_pixel_backend, }; @@ -3164,7 +3164,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler = { +static const struct attribute_group group_sampler = { .name = "b4cff514-a91e-4798-a0b3-426ca13fc9c1", .attrs = attrs_sampler, }; @@ -3186,7 +3186,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_1 = { +static const