[02/11] drm: i915: i915_oa_bdw: constify attribute_group structures.
diff mbox

Message ID 1501823016-6779-3-git-send-email-arvind.yadav.cs@gmail.com
State New
Headers show

Commit Message

Arvind Yadav Aug. 4, 2017, 5:03 a.m. UTC
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@gmail.com>
---
 drivers/gpu/drm/i915/i915_oa_bdw.c | 44 +++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/i915_oa_bdw.c b/drivers/gpu/drm/i915/i915_oa_bdw.c
index d4462c2..90c96c2 100644
--- a/drivers/gpu/drm/i915/i915_oa_bdw.c
+++ b/drivers/gpu/drm/i915/i915_oa_bdw.c
@@ -4669,7 +4669,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_render_basic = {
+static const struct attribute_group group_render_basic = {
 	.name = "b541bd57-0e0f-4154-b4c0-5858010a2bf7",
 	.attrs =  attrs_render_basic,
 };
@@ -4691,7 +4691,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_basic = {
+static const struct attribute_group group_compute_basic = {
 	.name = "35fbc9b2-a891-40a6-a38d-022bb7057552",
 	.attrs =  attrs_compute_basic,
 };
@@ -4713,7 +4713,7 @@  int i915_oa_select_metric_set_bdw(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 = "233d0544-fff7-4281-8291-e02f222aff72",
 	.attrs =  attrs_render_pipe_profile,
 };
@@ -4735,7 +4735,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_reads = {
+static const struct attribute_group group_memory_reads = {
 	.name = "2b255d48-2117-4fef-a8f7-f151e1d25a2c",
 	.attrs =  attrs_memory_reads,
 };
@@ -4757,7 +4757,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_writes = {
+static const struct attribute_group group_memory_writes = {
 	.name = "f7fd3220-b466-4a4d-9f98-b0caf3f2394c",
 	.attrs =  attrs_memory_writes,
 };
@@ -4779,7 +4779,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extended = {
+static const struct attribute_group group_compute_extended = {
 	.name = "e99ccaca-821c-4df9-97a7-96bdb7204e43",
 	.attrs =  attrs_compute_extended,
 };
@@ -4801,7 +4801,7 @@  int i915_oa_select_metric_set_bdw(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 = "27a364dc-8225-4ecb-b607-d6f1925598d9",
 	.attrs =  attrs_compute_l3_cache,
 };
@@ -4823,7 +4823,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_data_port_reads_coalescing = {
+static const struct attribute_group group_data_port_reads_coalescing = {
 	.name = "857fc630-2f09-4804-85f1-084adfadd5ab",
 	.attrs =  attrs_data_port_reads_coalescing,
 };
@@ -4845,7 +4845,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_data_port_writes_coalescing = {
+static const struct attribute_group group_data_port_writes_coalescing = {
 	.name = "343ebc99-4a55-414c-8c17-d8e259cf5e20",
 	.attrs =  attrs_data_port_writes_coalescing,
 };
@@ -4867,7 +4867,7 @@  int i915_oa_select_metric_set_bdw(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 = "7bdafd88-a4fa-4ed5-bc09-1a977aa5be3e",
 	.attrs =  attrs_hdc_and_sf,
 };
@@ -4889,7 +4889,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_1 = {
+static const struct attribute_group group_l3_1 = {
 	.name = "9385ebb2-f34f-4aa5-aec5-7e9cbbea0f0b",
 	.attrs =  attrs_l3_1,
 };
@@ -4911,7 +4911,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_2 = {
+static const struct attribute_group group_l3_2 = {
 	.name = "446ae59b-ff2e-41c9-b49e-0184a54bf00a",
 	.attrs =  attrs_l3_2,
 };
@@ -4933,7 +4933,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_3 = {
+static const struct attribute_group group_l3_3 = {
 	.name = "84a7956f-1ea4-4d0d-837f-e39a0376e38c",
 	.attrs =  attrs_l3_3,
 };
@@ -4955,7 +4955,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_4 = {
+static const struct attribute_group group_l3_4 = {
 	.name = "92b493d9-df18-4bed-be06-5cac6f2a6f5f",
 	.attrs =  attrs_l3_4,
 };
@@ -4977,7 +4977,7 @@  int i915_oa_select_metric_set_bdw(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 = "14345c35-cc46-40d0-bb04-6ed1fbb43679",
 	.attrs =  attrs_rasterizer_and_pixel_backend,
 };
@@ -4999,7 +4999,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_sampler_1 = {
+static const struct attribute_group group_sampler_1 = {
 	.name = "f0c6ba37-d3d3-4211-91b5-226730312a54",
 	.attrs =  attrs_sampler_1,
 };
@@ -5021,7 +5021,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_sampler_2 = {
+static const struct attribute_group group_sampler_2 = {
 	.name = "30bf3702-48cf-4bca-b412-7cf50bb2f564",
 	.attrs =  attrs_sampler_2,
 };
@@ -5043,7 +5043,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_1 = {
+static const struct attribute_group group_tdl_1 = {
 	.name = "238bec85-df05-44f3-b905-d166712f2451",
 	.attrs =  attrs_tdl_1,
 };
@@ -5065,7 +5065,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_2 = {
+static const struct attribute_group group_tdl_2 = {
 	.name = "24bf02cd-8693-4583-981c-c4165b33da01",
 	.attrs =  attrs_tdl_2,
 };
@@ -5087,7 +5087,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extra = {
+static const struct attribute_group group_compute_extra = {
 	.name = "8fb61ba2-2fbb-454c-a136-2dec5a8a595e",
 	.attrs =  attrs_compute_extra,
 };
@@ -5109,7 +5109,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_vme_pipe = {
+static const struct attribute_group group_vme_pipe = {
 	.name = "e1743ca0-7fc8-410b-a066-de7bbb9280b7",
 	.attrs =  attrs_vme_pipe,
 };
@@ -5131,7 +5131,7 @@  int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_test_oa = {
+static const struct attribute_group group_test_oa = {
 	.name = "d6de6f55-e526-4f79-a6a6-d7315c09044e",
 	.attrs =  attrs_test_oa,
 };