[PATCH 03/11] drm: i915: i915_oa_bxt: constify attribute_group structures.

From: Arvind Yadav
Date: Fri Aug 04 2017 - 01:04:18 EST


attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>
---
drivers/gpu/drm/i915/i915_oa_bxt.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_oa_bxt.c b/drivers/gpu/drm/i915/i915_oa_bxt.c
index 93864d8..db80045 100644
--- a/drivers/gpu/drm/i915/i915_oa_bxt.c
+++ b/drivers/gpu/drm/i915/i915_oa_bxt.c
@@ -2207,7 +2207,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_render_basic = {
+static const struct attribute_group group_render_basic = {
.name = "22b9519a-e9ba-4c41-8b54-f4f8ca14fa0a",
.attrs = attrs_render_basic,
};
@@ -2229,7 +2229,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_compute_basic = {
+static const struct attribute_group group_compute_basic = {
.name = "012d72cf-82a9-4d25-8ddf-74076fd30797",
.attrs = attrs_compute_basic,
};
@@ -2251,7 +2251,7 @@ int i915_oa_select_metric_set_bxt(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 = "ce416533-e49e-4211-80af-ec513590a914",
.attrs = attrs_render_pipe_profile,
};
@@ -2273,7 +2273,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_memory_reads = {
+static const struct attribute_group group_memory_reads = {
.name = "398e2452-18d7-42d0-b241-e4d0a9148ada",
.attrs = attrs_memory_reads,
};
@@ -2295,7 +2295,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_memory_writes = {
+static const struct attribute_group group_memory_writes = {
.name = "d324a0d6-7269-4847-a5c2-6f71ddc7fed5",
.attrs = attrs_memory_writes,
};
@@ -2317,7 +2317,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_compute_extended = {
+static const struct attribute_group group_compute_extended = {
.name = "caf3596a-7bb1-4dec-b3b3-2a080d283b49",
.attrs = attrs_compute_extended,
};
@@ -2339,7 +2339,7 @@ int i915_oa_select_metric_set_bxt(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 = "49b956e2-d5b9-47e0-9d8a-cee5e8cec527",
.attrs = attrs_compute_l3_cache,
};
@@ -2361,7 +2361,7 @@ int i915_oa_select_metric_set_bxt(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 = "f64ef50a-bdba-4b35-8f09-203c13d8ee5a",
.attrs = attrs_hdc_and_sf,
};
@@ -2383,7 +2383,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_l3_1 = {
+static const struct attribute_group group_l3_1 = {
.name = "00ad5a41-7eab-4f7a-9103-49d411c67219",
.attrs = attrs_l3_1,
};
@@ -2405,7 +2405,7 @@ int i915_oa_select_metric_set_bxt(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 = "46dc44ca-491c-4cc1-a951-e7b3e62bf02b",
.attrs = attrs_rasterizer_and_pixel_backend,
};
@@ -2427,7 +2427,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_sampler = {
+static const struct attribute_group group_sampler = {
.name = "8364e2a8-af63-40af-b0d5-42969a255654",
.attrs = attrs_sampler,
};
@@ -2449,7 +2449,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_tdl_1 = {
+static const struct attribute_group group_tdl_1 = {
.name = "175c8092-cb25-4d1e-8dc7-b4fdd39e2d92",
.attrs = attrs_tdl_1,
};
@@ -2471,7 +2471,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_tdl_2 = {
+static const struct attribute_group group_tdl_2 = {
.name = "d260f03f-b34d-4b49-a44e-436819117332",
.attrs = attrs_tdl_2,
};
@@ -2493,7 +2493,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_compute_extra = {
+static const struct attribute_group group_compute_extra = {
.name = "fa6ecf21-2cb8-4d0b-9308-6e4a7b4ca87a",
.attrs = attrs_compute_extra,
};
@@ -2515,7 +2515,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv)
NULL,
};

-static struct attribute_group group_test_oa = {
+static const struct attribute_group group_test_oa = {
.name = "5ee72f5c-092f-421e-8b70-225f7c3e9612",
.attrs = attrs_test_oa,
};
--
1.9.1