[PATCH 10/11] drm: i915: i915_oa_sklgt4: 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_sklgt4.c | 36 +++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_oa_sklgt4.c b/drivers/gpu/drm/i915/i915_oa_sklgt4.c
index 9ddab43..0671899 100644
--- a/drivers/gpu/drm/i915/i915_oa_sklgt4.c
+++ b/drivers/gpu/drm/i915/i915_oa_sklgt4.c
@@ -2514,7 +2514,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_render_basic = {
+static const struct attribute_group group_render_basic = {
 	.name = "bad77c24-cc64-480d-99bf-e7b740713800",
 	.attrs =  attrs_render_basic,
 };
@@ -2536,7 +2536,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_basic = {
+static const struct attribute_group group_compute_basic = {
 	.name = "7277228f-e7f3-4743-945a-6a2049d11377",
 	.attrs =  attrs_compute_basic,
 };
@@ -2558,7 +2558,7 @@ int i915_oa_select_metric_set_sklgt4(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 = "463c668c-3f60-49b6-8f85-d995b635b3b2",
 	.attrs =  attrs_render_pipe_profile,
 };
@@ -2580,7 +2580,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_reads = {
+static const struct attribute_group group_memory_reads = {
 	.name = "3ae6e74c-72c3-4040-9bd0-7961430b8cc8",
 	.attrs =  attrs_memory_reads,
 };
@@ -2602,7 +2602,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_writes = {
+static const struct attribute_group group_memory_writes = {
 	.name = "055f256d-4052-467c-8dec-6064a4806433",
 	.attrs =  attrs_memory_writes,
 };
@@ -2624,7 +2624,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extended = {
+static const struct attribute_group group_compute_extended = {
 	.name = "753972d4-87cd-4460-824d-754463ac5054",
 	.attrs =  attrs_compute_extended,
 };
@@ -2646,7 +2646,7 @@ int i915_oa_select_metric_set_sklgt4(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 = "4e4392e9-8f73-457b-ab44-b49f7a0c733b",
 	.attrs =  attrs_compute_l3_cache,
 };
@@ -2668,7 +2668,7 @@ int i915_oa_select_metric_set_sklgt4(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 = "730d95dd-7da8-4e1c-ab8d-c0eb1e4c1805",
 	.attrs =  attrs_hdc_and_sf,
 };
@@ -2690,7 +2690,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_1 = {
+static const struct attribute_group group_l3_1 = {
 	.name = "d9e86d70-462b-462a-851e-fd63e8c13d63",
 	.attrs =  attrs_l3_1,
 };
@@ -2712,7 +2712,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_2 = {
+static const struct attribute_group group_l3_2 = {
 	.name = "52200424-6ee9-48b3-b7fa-0afcf1975e4d",
 	.attrs =  attrs_l3_2,
 };
@@ -2734,7 +2734,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_3 = {
+static const struct attribute_group group_l3_3 = {
 	.name = "1988315f-0a26-44df-acb0-df7ec86b1456",
 	.attrs =  attrs_l3_3,
 };
@@ -2756,7 +2756,7 @@ int i915_oa_select_metric_set_sklgt4(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 = "f1f17ca7-286e-4ae5-9d15-9fccad6c665d",
 	.attrs =  attrs_rasterizer_and_pixel_backend,
 };
@@ -2778,7 +2778,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_sampler = {
+static const struct attribute_group group_sampler = {
 	.name = "00a9e0fb-3d2e-4405-852c-dce6334ffb3b",
 	.attrs =  attrs_sampler,
 };
@@ -2800,7 +2800,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_1 = {
+static const struct attribute_group group_tdl_1 = {
 	.name = "13dcc50a-7ec0-409b-99d6-a3f932cedcb3",
 	.attrs =  attrs_tdl_1,
 };
@@ -2822,7 +2822,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_2 = {
+static const struct attribute_group group_tdl_2 = {
 	.name = "97875e21-6624-4aee-9191-682feb3eae21",
 	.attrs =  attrs_tdl_2,
 };
@@ -2844,7 +2844,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extra = {
+static const struct attribute_group group_compute_extra = {
 	.name = "a5aa857d-e8f0-4dfa-8981-ce340fa748fd",
 	.attrs =  attrs_compute_extra,
 };
@@ -2866,7 +2866,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_vme_pipe = {
+static const struct attribute_group group_vme_pipe = {
 	.name = "0e8d8b86-4ee7-4cdd-aaaa-58adc92cb29e",
 	.attrs =  attrs_vme_pipe,
 };
@@ -2888,7 +2888,7 @@ int i915_oa_select_metric_set_sklgt4(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_test_oa = {
+static const struct attribute_group group_test_oa = {
 	.name = "882fa433-1f4a-4a67-a962-c741888fe5f5",
 	.attrs =  attrs_test_oa,
 };
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux