[PATCH 09/11] drm: i915: i915_oa_sklgt3: constify attribute_group structures.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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_sklgt3.c | 36 +++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_oa_sklgt3.c b/drivers/gpu/drm/i915/i915_oa_sklgt3.c
index 7765e22..e26f300 100644
--- a/drivers/gpu/drm/i915/i915_oa_sklgt3.c
+++ b/drivers/gpu/drm/i915/i915_oa_sklgt3.c
@@ -2460,7 +2460,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_render_basic = {
+static const struct attribute_group group_render_basic = {
 	.name = "4616d450-2393-4836-8146-53c5ed84d359",
 	.attrs =  attrs_render_basic,
 };
@@ -2482,7 +2482,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_basic = {
+static const struct attribute_group group_compute_basic = {
 	.name = "4320492b-fd03-42ac-922f-dbe1ef3b7b58",
 	.attrs =  attrs_compute_basic,
 };
@@ -2504,7 +2504,7 @@ int i915_oa_select_metric_set_sklgt3(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 = "bd2d9cae-b9ec-4f5b-9d2f-934bed398a2d",
 	.attrs =  attrs_render_pipe_profile,
 };
@@ -2526,7 +2526,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_reads = {
+static const struct attribute_group group_memory_reads = {
 	.name = "4ca0f3fe-7fd3-4924-98cb-1807d9879767",
 	.attrs =  attrs_memory_reads,
 };
@@ -2548,7 +2548,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_writes = {
+static const struct attribute_group group_memory_writes = {
 	.name = "a0c0172c-ee13-403d-99ff-2bdf6936cf14",
 	.attrs =  attrs_memory_writes,
 };
@@ -2570,7 +2570,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extended = {
+static const struct attribute_group group_compute_extended = {
 	.name = "52435e0b-f188-42ea-8680-21a56ee20dee",
 	.attrs =  attrs_compute_extended,
 };
@@ -2592,7 +2592,7 @@ int i915_oa_select_metric_set_sklgt3(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 = "27076eeb-49f3-4fed-8423-c66506005c63",
 	.attrs =  attrs_compute_l3_cache,
 };
@@ -2614,7 +2614,7 @@ int i915_oa_select_metric_set_sklgt3(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 = "8071b409-c39a-4674-94d7-32962ecfb512",
 	.attrs =  attrs_hdc_and_sf,
 };
@@ -2636,7 +2636,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_1 = {
+static const struct attribute_group group_l3_1 = {
 	.name = "5e0b391e-9ea8-4901-b2ff-b64ff616c7ed",
 	.attrs =  attrs_l3_1,
 };
@@ -2658,7 +2658,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_2 = {
+static const struct attribute_group group_l3_2 = {
 	.name = "25dc828e-1d2d-426e-9546-a1d4233cdf16",
 	.attrs =  attrs_l3_2,
 };
@@ -2680,7 +2680,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_3 = {
+static const struct attribute_group group_l3_3 = {
 	.name = "3dba9405-2d7e-4d70-8199-e734e82fd6bf",
 	.attrs =  attrs_l3_3,
 };
@@ -2702,7 +2702,7 @@ int i915_oa_select_metric_set_sklgt3(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 = "76935d7b-09c9-46bf-87f1-c18b4a86ebe5",
 	.attrs =  attrs_rasterizer_and_pixel_backend,
 };
@@ -2724,7 +2724,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_sampler = {
+static const struct attribute_group group_sampler = {
 	.name = "1b34c0d6-4f4c-4d7b-833f-4aaf236d87a6",
 	.attrs =  attrs_sampler,
 };
@@ -2746,7 +2746,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_1 = {
+static const struct attribute_group group_tdl_1 = {
 	.name = "b375c985-9953-455b-bda2-b03f7594e9db",
 	.attrs =  attrs_tdl_1,
 };
@@ -2768,7 +2768,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_2 = {
+static const struct attribute_group group_tdl_2 = {
 	.name = "3e2be2bb-884a-49bb-82c5-2358e6bd5f2d",
 	.attrs =  attrs_tdl_2,
 };
@@ -2790,7 +2790,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extra = {
+static const struct attribute_group group_compute_extra = {
 	.name = "2d80a648-7b5a-4e92-bbe7-3b5c76f2e221",
 	.attrs =  attrs_compute_extra,
 };
@@ -2812,7 +2812,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_vme_pipe = {
+static const struct attribute_group group_vme_pipe = {
 	.name = "cfae9232-6ffc-42cc-a703-9790016925f0",
 	.attrs =  attrs_vme_pipe,
 };
@@ -2834,7 +2834,7 @@ int i915_oa_select_metric_set_sklgt3(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_test_oa = {
+static const struct attribute_group group_test_oa = {
 	.name = "2b985803-d3c9-4629-8a4f-634bfecba0e8",
 	.attrs =  attrs_test_oa,
 };
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux