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

diff --git a/drivers/gpu/drm/i915/i915_oa_sklgt2.c b/drivers/gpu/drm/i915/i915_oa_sklgt2.c
index 1268bed..80e6054 100644
--- a/drivers/gpu/drm/i915/i915_oa_sklgt2.c
+++ b/drivers/gpu/drm/i915/i915_oa_sklgt2.c
@@ -2900,7 +2900,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_render_basic = {
+static const struct attribute_group group_render_basic = {
 	.name = "f519e481-24d2-4d42-87c9-3fdd12c00202",
 	.attrs =  attrs_render_basic,
 };
@@ -2922,7 +2922,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_basic = {
+static const struct attribute_group group_compute_basic = {
 	.name = "fe47b29d-ae51-423e-bff4-27d965a95b60",
 	.attrs =  attrs_compute_basic,
 };
@@ -2944,7 +2944,7 @@ int i915_oa_select_metric_set_sklgt2(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 = "e0ad5ae0-84ba-4f29-a723-1906c12cb774",
 	.attrs =  attrs_render_pipe_profile,
 };
@@ -2966,7 +2966,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_reads = {
+static const struct attribute_group group_memory_reads = {
 	.name = "9bc436dd-6130-4add-affc-283eb6eaa864",
 	.attrs =  attrs_memory_reads,
 };
@@ -2988,7 +2988,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_writes = {
+static const struct attribute_group group_memory_writes = {
 	.name = "2ea0da8f-3527-4669-9d9d-13099a7435bf",
 	.attrs =  attrs_memory_writes,
 };
@@ -3010,7 +3010,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extended = {
+static const struct attribute_group group_compute_extended = {
 	.name = "d97d16af-028b-4cd1-a672-6210cb5513dd",
 	.attrs =  attrs_compute_extended,
 };
@@ -3032,7 +3032,7 @@ int i915_oa_select_metric_set_sklgt2(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 = "9fb22842-e708-43f7-9752-e0e41670c39e",
 	.attrs =  attrs_compute_l3_cache,
 };
@@ -3054,7 +3054,7 @@ int i915_oa_select_metric_set_sklgt2(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 = "5378e2a1-4248-4188-a4ae-da25a794c603",
 	.attrs =  attrs_hdc_and_sf,
 };
@@ -3076,7 +3076,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_1 = {
+static const struct attribute_group group_l3_1 = {
 	.name = "f42cdd6a-b000-42cb-870f-5eb423a7f514",
 	.attrs =  attrs_l3_1,
 };
@@ -3098,7 +3098,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_2 = {
+static const struct attribute_group group_l3_2 = {
 	.name = "b9bf2423-d88c-4a7b-a051-627611d00dcc",
 	.attrs =  attrs_l3_2,
 };
@@ -3120,7 +3120,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_3 = {
+static const struct attribute_group group_l3_3 = {
 	.name = "2414a93d-d84f-406e-99c0-472161194b40",
 	.attrs =  attrs_l3_3,
 };
@@ -3142,7 +3142,7 @@ int i915_oa_select_metric_set_sklgt2(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 = "53a45d2d-170b-4cf5-b7bb-585120c8e2f5",
 	.attrs =  attrs_rasterizer_and_pixel_backend,
 };
@@ -3164,7 +3164,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_sampler = {
+static const struct attribute_group group_sampler = {
 	.name = "b4cff514-a91e-4798-a0b3-426ca13fc9c1",
 	.attrs =  attrs_sampler,
 };
@@ -3186,7 +3186,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_1 = {
+static const struct attribute_group group_tdl_1 = {
 	.name = "7821d13b-9b8b-4405-9618-78cd56b62cce",
 	.attrs =  attrs_tdl_1,
 };
@@ -3208,7 +3208,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_2 = {
+static const struct attribute_group group_tdl_2 = {
 	.name = "893f1a4d-919d-4388-8cb7-746d73ea7259",
 	.attrs =  attrs_tdl_2,
 };
@@ -3230,7 +3230,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extra = {
+static const struct attribute_group group_compute_extra = {
 	.name = "41a24047-7484-4ead-ae37-de907e5ff2b2",
 	.attrs =  attrs_compute_extra,
 };
@@ -3252,7 +3252,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_vme_pipe = {
+static const struct attribute_group group_vme_pipe = {
 	.name = "95910492-943f-44bd-9461-390240f243fd",
 	.attrs =  attrs_vme_pipe,
 };
@@ -3274,7 +3274,7 @@ int i915_oa_select_metric_set_sklgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_test_oa = {
+static const struct attribute_group group_test_oa = {
 	.name = "1651949f-0ac0-4cb1-a06f-dafd74a407d1",
 	.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