[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1501823016-6779-5-git-send-email-arvind.yadav.cs@gmail.com>
Date: Fri, 4 Aug 2017 10:33:29 +0530
From: Arvind Yadav <arvind.yadav.cs@...il.com>
To: daniel.vetter@...el.com, jani.nikula@...ux.intel.com,
airlied@...ux.ie
Cc: intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 04/11] drm: i915: i915_oa_chv: constify attribute_group structures.
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@...il.com>
---
drivers/gpu/drm/i915/i915_oa_chv.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_oa_chv.c b/drivers/gpu/drm/i915/i915_oa_chv.c
index aa6bece..85c6c36 100644
--- a/drivers/gpu/drm/i915/i915_oa_chv.c
+++ b/drivers/gpu/drm/i915/i915_oa_chv.c
@@ -2422,7 +2422,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_render_basic = {
+static const struct attribute_group group_render_basic = {
.name = "9d8a3af5-c02c-4a4a-b947-f1672469e0fb",
.attrs = attrs_render_basic,
};
@@ -2444,7 +2444,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_compute_basic = {
+static const struct attribute_group group_compute_basic = {
.name = "f522a89c-ecd1-4522-8331-3383c54af5f5",
.attrs = attrs_compute_basic,
};
@@ -2466,7 +2466,7 @@ int i915_oa_select_metric_set_chv(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 = "a9ccc03d-a943-4e6b-9cd6-13e063075927",
.attrs = attrs_render_pipe_profile,
};
@@ -2488,7 +2488,7 @@ int i915_oa_select_metric_set_chv(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 = "2cf0c064-68df-4fac-9b3f-57f51ca8a069",
.attrs = attrs_hdc_and_sf,
};
@@ -2510,7 +2510,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_l3_1 = {
+static const struct attribute_group group_l3_1 = {
.name = "78a87ff9-543a-49ce-95ea-26d86071ea93",
.attrs = attrs_l3_1,
};
@@ -2532,7 +2532,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_l3_2 = {
+static const struct attribute_group group_l3_2 = {
.name = "9f2cece5-7bfe-4320-ad66-8c7cc526bec5",
.attrs = attrs_l3_2,
};
@@ -2554,7 +2554,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_l3_3 = {
+static const struct attribute_group group_l3_3 = {
.name = "d890ef38-d309-47e4-b8b5-aa779bb19ab0",
.attrs = attrs_l3_3,
};
@@ -2576,7 +2576,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_l3_4 = {
+static const struct attribute_group group_l3_4 = {
.name = "5fdff4a6-9dc8-45e1-bfda-ef54869fbdd4",
.attrs = attrs_l3_4,
};
@@ -2598,7 +2598,7 @@ int i915_oa_select_metric_set_chv(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 = "2c0e45e1-7e2c-4a14-ae00-0b7ec868b8aa",
.attrs = attrs_rasterizer_and_pixel_backend,
};
@@ -2620,7 +2620,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_sampler_1 = {
+static const struct attribute_group group_sampler_1 = {
.name = "71148d78-baf5-474f-878a-e23158d0265d",
.attrs = attrs_sampler_1,
};
@@ -2642,7 +2642,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_sampler_2 = {
+static const struct attribute_group group_sampler_2 = {
.name = "b996a2b7-c59c-492d-877a-8cd54fd6df84",
.attrs = attrs_sampler_2,
};
@@ -2664,7 +2664,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_tdl_1 = {
+static const struct attribute_group group_tdl_1 = {
.name = "eb2fecba-b431-42e7-8261-fe9429a6e67a",
.attrs = attrs_tdl_1,
};
@@ -2686,7 +2686,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_tdl_2 = {
+static const struct attribute_group group_tdl_2 = {
.name = "60749470-a648-4a4b-9f10-dbfe1e36e44d",
.attrs = attrs_tdl_2,
};
@@ -2708,7 +2708,7 @@ int i915_oa_select_metric_set_chv(struct drm_i915_private *dev_priv)
NULL,
};
-static struct attribute_group group_test_oa = {
+static const struct attribute_group group_test_oa = {
.name = "4a534b07-cba3-414d-8d60-874830e883aa",
.attrs = attrs_test_oa,
};
--
1.9.1
Powered by blists - more mailing lists