constify i915 attribute_group structures.
Subsystems (2)
cover constify i915 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.
Arvind Yadav (11):
[PATCH 01/11] drm: i915: i915_oa_kblgt2: constify attribute_group structures. [PATCH 02/11] drm: i915: i915_oa_bdw: constify attribute_group structures. [PATCH 03/11] drm: i915: i915_oa_bxt: constify attribute_group structures. [PATCH 04/11] drm: i915: i915_oa_chv: constify attribute_group structures. [PATCH 05/11] drm: i915: i915_oa_glk: constify attribute_group structures. [PATCH 06/11] drm: i915: i915_oa_hsw: constify attribute_group structures. [PATCH 07/11] drm: i915: i915_oa_kblgt3: constify attribute_group structures. [PATCH 08/11] drm: i915: i915_oa_sklgt2: constify attribute_group structures. [PATCH 09/11] drm: i915: i915_oa_sklgt3: constify attribute_group structures. [PATCH 10/11] drm: i915: i915_oa_sklgt4: constify attribute_group structures. [PATCH 11/11] drm: i915: i915_sysfs: constify attribute_group structures.
drivers/gpu/drm/i915/i915_oa_bdw.c | 44 +++++++++++++++++------------------ drivers/gpu/drm/i915/i915_oa_bxt.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_chv.c | 28 +++++++++++----------- drivers/gpu/drm/i915/i915_oa_glk.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_hsw.c | 12 +++++----- drivers/gpu/drm/i915/i915_oa_kblgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_kblgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_sysfs.c | 6 ++--- 11 files changed, 165 insertions(+), 165 deletions(-)
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/11 drm: i915: i915_oa_kblgt2: 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.
--- drivers/gpu/drm/i915/i915_oa_kblgt2.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/i915_oa_kblgt2.c +18 -18
@@ -2412,7 +2412,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_basic = { +static const struct attribute_group group_render_basic = { .name ="f8d677e9-ff6f-4df1-9310-0334c6efacce" , .attrs = attrs_render_basic, };
@@ -2434,7 +2434,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_basic = { +static const struct attribute_group group_compute_basic = { .name ="e17fc42a-e614-41b6-90c4-1074841a6c77" , .attrs = attrs_compute_basic, };
@@ -2456,7 +2456,7 @@ int i915_oa_select_metric_set_kblgt2(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 ="d7a17a3a-ca71-40d2-a919-ace80d50633f" , .attrs = attrs_render_pipe_profile, };
@@ -2478,7 +2478,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_reads = { +static const struct attribute_group group_memory_reads = { .name ="57b59202-172b-477a-87de-33f85572c589" , .attrs = attrs_memory_reads, };
@@ -2500,7 +2500,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_writes = { +static const struct attribute_group group_memory_writes = { .name ="3addf8ef-8e9b-40f5-a448-3dbb5d5128b0" , .attrs = attrs_memory_writes, };
@@ -2522,7 +2522,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extended = { +static const struct attribute_group group_compute_extended = { .name ="4af0400a-81c3-47db-a6b6-deddbd75680e" , .attrs = attrs_compute_extended, };
@@ -2544,7 +2544,7 @@ int i915_oa_select_metric_set_kblgt2(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 ="0e22f995-79ca-4f67-83ab-e9d9772488d8" , .attrs = attrs_compute_l3_cache, };
@@ -2566,7 +2566,7 @@ int i915_oa_select_metric_set_kblgt2(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 ="bc2a00f7-cb8a-4ff2-8ad0-e241dad16937" , .attrs = attrs_hdc_and_sf, };
@@ -2588,7 +2588,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_1 = { +static const struct attribute_group group_l3_1 = { .name ="d2bbe790-f058-42d9-81c6-cdedcf655bc2" , .attrs = attrs_l3_1, };
@@ -2610,7 +2610,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_2 = { +static const struct attribute_group group_l3_2 = { .name ="2f8e32e4-5956-46e2-af31-c8ea95887332" , .attrs = attrs_l3_2, };
@@ -2632,7 +2632,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_3 = { +static const struct attribute_group group_l3_3 = { .name ="ca046aad-b5fb-4101-adce-6473ee6e5b14" , .attrs = attrs_l3_3, };
@@ -2654,7 +2654,7 @@ int i915_oa_select_metric_set_kblgt2(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 ="605f388f-24bb-455c-88e3-8d57ae0d7e9f" , .attrs = attrs_rasterizer_and_pixel_backend, };
@@ -2676,7 +2676,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler = { +static const struct attribute_group group_sampler = { .name ="31dd157c-bf4e-4bab-bf2b-f5c8174af1af" , .attrs = attrs_sampler, };
@@ -2698,7 +2698,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_1 = { +static const struct attribute_group group_tdl_1 = { .name ="105db928-5542-466b-9128-e1f3c91426cb" , .attrs = attrs_tdl_1, };
@@ -2720,7 +2720,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_2 = { +static const struct attribute_group group_tdl_2 = { .name ="03db94d2-b37f-4c58-a791-0d2067b013bb" , .attrs = attrs_tdl_2, };
@@ -2742,7 +2742,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extra = { +static const struct attribute_group group_compute_extra = { .name ="aa7a3fb9-22fb-43ff-a32d-0ab6c13bbd16" , .attrs = attrs_compute_extra, };
@@ -2764,7 +2764,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_vme_pipe = { +static const struct attribute_group group_vme_pipe = { .name ="398a4268-ef6f-4ffc-b55f-3c7b5363ce61" , .attrs = attrs_vme_pipe, };
@@ -2786,7 +2786,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_test_oa = { +static const struct attribute_group group_test_oa = { .name ="baa3c7e4-52b6-4b85-801e-465a94b746dd" , .attrs = attrs_test_oa, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/11 drm: i915: i915_oa_bdw: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_oa_bdw.c | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-)
drivers/gpu/drm/i915/i915_oa_bdw.c +22 -22
@@ -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, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/11 drm: i915: i915_oa_bxt: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_oa_bxt.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/i915_oa_bxt.c +15 -15
@@ -2207,7 +2207,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_basic = { +static const struct attribute_group group_render_basic = { .name ="22b9519a-e9ba-4c41-8b54-f4f8ca14fa0a" , .attrs = attrs_render_basic, };
@@ -2229,7 +2229,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_basic = { +static const struct attribute_group group_compute_basic = { .name ="012d72cf-82a9-4d25-8ddf-74076fd30797" , .attrs = attrs_compute_basic, };
@@ -2251,7 +2251,7 @@ int i915_oa_select_metric_set_bxt(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 ="ce416533-e49e-4211-80af-ec513590a914" , .attrs = attrs_render_pipe_profile, };
@@ -2273,7 +2273,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_reads = { +static const struct attribute_group group_memory_reads = { .name ="398e2452-18d7-42d0-b241-e4d0a9148ada" , .attrs = attrs_memory_reads, };
@@ -2295,7 +2295,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_writes = { +static const struct attribute_group group_memory_writes = { .name ="d324a0d6-7269-4847-a5c2-6f71ddc7fed5" , .attrs = attrs_memory_writes, };
@@ -2317,7 +2317,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extended = { +static const struct attribute_group group_compute_extended = { .name ="caf3596a-7bb1-4dec-b3b3-2a080d283b49" , .attrs = attrs_compute_extended, };
@@ -2339,7 +2339,7 @@ int i915_oa_select_metric_set_bxt(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 ="49b956e2-d5b9-47e0-9d8a-cee5e8cec527" , .attrs = attrs_compute_l3_cache, };
@@ -2361,7 +2361,7 @@ int i915_oa_select_metric_set_bxt(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 ="f64ef50a-bdba-4b35-8f09-203c13d8ee5a" , .attrs = attrs_hdc_and_sf, };
@@ -2383,7 +2383,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_1 = { +static const struct attribute_group group_l3_1 = { .name ="00ad5a41-7eab-4f7a-9103-49d411c67219" , .attrs = attrs_l3_1, };
@@ -2405,7 +2405,7 @@ int i915_oa_select_metric_set_bxt(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 ="46dc44ca-491c-4cc1-a951-e7b3e62bf02b" , .attrs = attrs_rasterizer_and_pixel_backend, };
@@ -2427,7 +2427,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler = { +static const struct attribute_group group_sampler = { .name ="8364e2a8-af63-40af-b0d5-42969a255654" , .attrs = attrs_sampler, };
@@ -2449,7 +2449,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_1 = { +static const struct attribute_group group_tdl_1 = { .name ="175c8092-cb25-4d1e-8dc7-b4fdd39e2d92" , .attrs = attrs_tdl_1, };
@@ -2471,7 +2471,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_2 = { +static const struct attribute_group group_tdl_2 = { .name ="d260f03f-b34d-4b49-a44e-436819117332" , .attrs = attrs_tdl_2, };
@@ -2493,7 +2493,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extra = { +static const struct attribute_group group_compute_extra = { .name ="fa6ecf21-2cb8-4d0b-9308-6e4a7b4ca87a" , .attrs = attrs_compute_extra, };
@@ -2515,7 +2515,7 @@ int i915_oa_select_metric_set_bxt(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_test_oa = { +static const struct attribute_group group_test_oa = { .name ="5ee72f5c-092f-421e-8b70-225f7c3e9612" , .attrs = attrs_test_oa, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/11 drm: i915: i915_oa_chv: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_oa_chv.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/i915_oa_chv.c +14 -14
@@ -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, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/11 drm: i915: i915_oa_glk: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_oa_glk.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/i915_oa_glk.c +15 -15
@@ -2119,7 +2119,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_basic = { +static const struct attribute_group group_render_basic = { .name ="d72df5c7-5b4a-4274-a43f-00b0fd51fc68" , .attrs = attrs_render_basic, };
@@ -2141,7 +2141,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_basic = { +static const struct attribute_group group_compute_basic = { .name ="814285f6-354d-41d2-ba49-e24e622714a0" , .attrs = attrs_compute_basic, };
@@ -2163,7 +2163,7 @@ int i915_oa_select_metric_set_glk(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 ="07d397a6-b3e6-49f6-9433-a4f293d55978" , .attrs = attrs_render_pipe_profile, };
@@ -2185,7 +2185,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_reads = { +static const struct attribute_group group_memory_reads = { .name ="1a356946-5428-450b-a2f0-89f8783a302d" , .attrs = attrs_memory_reads, };
@@ -2207,7 +2207,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_writes = { +static const struct attribute_group group_memory_writes = { .name ="5299be9d-7a61-4c99-9f81-f87e6c5aaca9" , .attrs = attrs_memory_writes, };
@@ -2229,7 +2229,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extended = { +static const struct attribute_group group_compute_extended = { .name ="bc9bcff2-459a-4cbc-986d-a84b077153f3" , .attrs = attrs_compute_extended, };
@@ -2251,7 +2251,7 @@ int i915_oa_select_metric_set_glk(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 ="88ec931f-5b4a-453a-9db6-a61232b6143d" , .attrs = attrs_compute_l3_cache, };
@@ -2273,7 +2273,7 @@ int i915_oa_select_metric_set_glk(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 ="530d176d-2a18-4014-adf8-1500c6c60835" , .attrs = attrs_hdc_and_sf, };
@@ -2295,7 +2295,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_1 = { +static const struct attribute_group group_l3_1 = { .name ="fdee5a5a-f23c-43d1-aa73-f6257c71671d" , .attrs = attrs_l3_1, };
@@ -2317,7 +2317,7 @@ int i915_oa_select_metric_set_glk(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 ="6617623e-ca73-4791-b2b7-ddedd0846a0c" , .attrs = attrs_rasterizer_and_pixel_backend, };
@@ -2339,7 +2339,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler = { +static const struct attribute_group group_sampler = { .name ="f3b2ea63-e82e-4234-b418-44dd20dd34d0" , .attrs = attrs_sampler, };
@@ -2361,7 +2361,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_1 = { +static const struct attribute_group group_tdl_1 = { .name ="14411d35-cbf6-4f5e-b68b-190faf9a1a83" , .attrs = attrs_tdl_1, };
@@ -2383,7 +2383,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_2 = { +static const struct attribute_group group_tdl_2 = { .name ="ffa3f263-0478-4724-8c9f-c911c5ec0f1d" , .attrs = attrs_tdl_2, };
@@ -2405,7 +2405,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extra = { +static const struct attribute_group group_compute_extra = { .name ="15274c82-27d2-4819-876a-7cb1a2c59ba4" , .attrs = attrs_compute_extra, };
@@ -2427,7 +2427,7 @@ int i915_oa_select_metric_set_glk(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_test_oa = { +static const struct attribute_group group_test_oa = { .name ="dd3fd789-e783-4204-8cd0-b671bbccb0cf" , .attrs = attrs_test_oa, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/11 drm: i915: i915_oa_hsw: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_oa_hsw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_oa_hsw.c +6 -6
@@ -668,7 +668,7 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_basic = { +static const struct attribute_group group_render_basic = { .name ="403d8832-1a27-4aa6-a64e-f5389ce7b212" , .attrs = attrs_render_basic, };
@@ -690,7 +690,7 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_basic = { +static const struct attribute_group group_compute_basic = { .name ="39ad14bc-2380-45c4-91eb-fbcb3aa7ae7b" , .attrs = attrs_compute_basic, };
@@ -712,7 +712,7 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extended = { +static const struct attribute_group group_compute_extended = { .name ="3865be28-6982-49fe-9494-e4d1b4795413" , .attrs = attrs_compute_extended, };
@@ -734,7 +734,7 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_reads = { +static const struct attribute_group group_memory_reads = { .name ="bb5ed49b-2497-4095-94f6-26ba294db88a" , .attrs = attrs_memory_reads, };
@@ -756,7 +756,7 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_writes = { +static const struct attribute_group group_memory_writes = { .name ="3358d639-9b5f-45ab-976d-9b08cbfc6240" , .attrs = attrs_memory_writes, };
@@ -778,7 +778,7 @@ int i915_oa_select_metric_set_hsw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler_balance = { +static const struct attribute_group group_sampler_balance = { .name ="bc274488-b4b6-40c7-90da-b77d7ad16189" , .attrs = attrs_sampler_balance, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/11 drm: i915: i915_oa_kblgt3: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_oa_kblgt3.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/i915_oa_kblgt3.c +18 -18
@@ -2461,7 +2461,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_basic = { +static const struct attribute_group group_render_basic = { .name ="0286c920-2f6d-493b-b22d-7a5280df43de" , .attrs = attrs_render_basic, };
@@ -2483,7 +2483,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_basic = { +static const struct attribute_group group_compute_basic = { .name ="9823aaa1-b06f-40ce-884b-cd798c79f0c2" , .attrs = attrs_compute_basic, };
@@ -2505,7 +2505,7 @@ int i915_oa_select_metric_set_kblgt3(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 ="c7c735f3-ce58-45cf-aa04-30b183f1faff" , .attrs = attrs_render_pipe_profile, };
@@ -2527,7 +2527,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_reads = { +static const struct attribute_group group_memory_reads = { .name ="96ec2219-040b-428a-856a-6bc03363a057" , .attrs = attrs_memory_reads, };
@@ -2549,7 +2549,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_writes = { +static const struct attribute_group group_memory_writes = { .name ="03372b64-4996-4d3b-aa18-790e75eeb9c2" , .attrs = attrs_memory_writes, };
@@ -2571,7 +2571,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extended = { +static const struct attribute_group group_compute_extended = { .name ="31b4ce5a-bd61-4c1f-bb5d-f2e731412150" , .attrs = attrs_compute_extended, };
@@ -2593,7 +2593,7 @@ int i915_oa_select_metric_set_kblgt3(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 ="2ce0911a-27fc-4887-96f0-11084fa807c3" , .attrs = attrs_compute_l3_cache, };
@@ -2615,7 +2615,7 @@ int i915_oa_select_metric_set_kblgt3(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 ="546c4c1d-99b8-42fb-a107-5aaabb5314a8" , .attrs = attrs_hdc_and_sf, };
@@ -2637,7 +2637,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_1 = { +static const struct attribute_group group_l3_1 = { .name ="4e93d156-9b39-4268-8544-a8e0480806d7" , .attrs = attrs_l3_1, };
@@ -2659,7 +2659,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_2 = { +static const struct attribute_group group_l3_2 = { .name ="de1bec86-ca92-4b43-89fa-147653221cc0" , .attrs = attrs_l3_2, };
@@ -2681,7 +2681,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_3 = { +static const struct attribute_group group_l3_3 = { .name ="e63537bb-10be-4d4a-92c4-c6b0c65e02ef" , .attrs = attrs_l3_3, };
@@ -2703,7 +2703,7 @@ int i915_oa_select_metric_set_kblgt3(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 ="7a03a9f8-ec5e-46bb-8b67-1f0ff1476281" , .attrs = attrs_rasterizer_and_pixel_backend, };
@@ -2725,7 +2725,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler = { +static const struct attribute_group group_sampler = { .name ="b25d2ebf-a6e0-4b29-96be-a9b010edeeda" , .attrs = attrs_sampler, };
@@ -2747,7 +2747,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_1 = { +static const struct attribute_group group_tdl_1 = { .name ="469a05e5-e299-46f7-9598-7b05f3c34991" , .attrs = attrs_tdl_1, };
@@ -2769,7 +2769,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_2 = { +static const struct attribute_group group_tdl_2 = { .name ="52f925c6-786a-4ec6-86ce-cba85c83453a" , .attrs = attrs_tdl_2, };
@@ -2791,7 +2791,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extra = { +static const struct attribute_group group_compute_extra = { .name ="efc497ac-884e-4ee4-a4a8-15fba22aaf21" , .attrs = attrs_compute_extra, };
@@ -2813,7 +2813,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_vme_pipe = { +static const struct attribute_group group_vme_pipe = { .name ="bfd9764d-2c5b-4c16-bfc1-89de3ca10917" , .attrs = attrs_vme_pipe, };
@@ -2835,7 +2835,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_test_oa = { +static const struct attribute_group group_test_oa = { .name ="f1792f32-6db2-4b50-b4b2-557128f1688d" , .attrs = attrs_test_oa, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/11 drm: i915: i915_oa_sklgt2: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/i915_oa_sklgt2.c +18 -18
@@ -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, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 9/11 drm: i915: i915_oa_sklgt3: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/i915_oa_sklgt3.c +18 -18
@@ -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, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 10/11 drm: i915: i915_oa_sklgt4: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/i915_oa_sklgt4.c +18 -18
@@ -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, };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 11/11 drm: i915: i915_sysfs: constify attribute_group structures.
In reply to Arvind Yadavattribute_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.
--- drivers/gpu/drm/i915/i915_sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_sysfs.c +3 -3
@@ -96,7 +96,7 @@ static u32 calc_residency(struct drm_i915_private *dev_priv, NULL }; -static struct attribute_group rc6_attr_group = { +static const struct attribute_group rc6_attr_group = { .name = power_group_name, .attrs = rc6_attrs };
@@ -107,7 +107,7 @@ static u32 calc_residency(struct drm_i915_private *dev_priv, NULL }; -static struct attribute_group rc6p_attr_group = { +static const struct attribute_group rc6p_attr_group = { .name = power_group_name, .attrs = rc6p_attrs };
@@ -117,7 +117,7 @@ static u32 calc_residency(struct drm_i915_private *dev_priv, NULL }; -static struct attribute_group media_rc6_attr_group = { +static const struct attribute_group media_rc6_attr_group = { .name = power_group_name, .attrs = media_rc6_attrs };
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Arwind,
These files were generated by a script maintained in this repository : https://github.com/rib/gputop/blob/master/scripts/i915-perf-kernelgen.py
It would best to update this script first to make sure future platforms get the fixes too.
Some changes have just been merged, deleted most configs but the test ones. You'll need to update your series.
Otherwise it looks like a good change.
Thanks,
-
Lionel
Quoted 30 lines · Arvind Yadav
attribute_groupare not supposed to change at runtime. All functions working withattribute_groupprovided by <linux/sysfs.h> work with constattribute_group. So mark the non-const structs as const.Arvind Yadav (11):
[PATCH 01/11] drm: i915: i915_oa_kblgt2: constify attribute_group structures. [PATCH 02/11] drm: i915: i915_oa_bdw: constify attribute_group structures. [PATCH 03/11] drm: i915: i915_oa_bxt: constify attribute_group structures. [PATCH 04/11] drm: i915: i915_oa_chv: constify attribute_group structures. [PATCH 05/11] drm: i915: i915_oa_glk: constify attribute_group structures. [PATCH 06/11] drm: i915: i915_oa_hsw: constify attribute_group structures. [PATCH 07/11] drm: i915: i915_oa_kblgt3: constify attribute_group structures. [PATCH 08/11] drm: i915: i915_oa_sklgt2: constify attribute_group structures. [PATCH 09/11] drm: i915: i915_oa_sklgt3: constify attribute_group structures. [PATCH 10/11] drm: i915: i915_oa_sklgt4: constify attribute_group structures. [PATCH 11/11] drm: i915: i915_sysfs: constify attribute_group structures.drivers/gpu/drm/i915/i915_oa_bdw.c | 44 +++++++++++++++++------------------ drivers/gpu/drm/i915/i915_oa_bxt.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_chv.c | 28 +++++++++++----------- drivers/gpu/drm/i915/i915_oa_glk.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_hsw.c | 12 +++++----- drivers/gpu/drm/i915/i915_oa_kblgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_kblgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_sysfs.c | 6 ++--- 11 files changed, 165 insertions(+), 165 deletions(-)
Hi Lionel,
Quoted 8 lines · Lionel Landwerlin
Hi Arwind,
These files were generated by a script maintained in this repository : https://github.com/rib/gputop/blob/master/scripts/i915-perf-kernelgen.py
It would best to update this script first to make sure future platforms get the fixes too.Some changes have just been merged, deleted most configs but the test ones. You'll need to update your series.
I have done the changes. Please review it. :) Shared patch is 0001-i915-perf-kernelgen.py-constify-attribute_group-stru.patch.
Quoted 56 lines
Otherwise it looks like a good change.
Thanks,
-
LionelQuoted 47 lines · Arvind Yadav
attribute_groupare not supposed to change at runtime. All functions working withattribute_groupprovided by <linux/sysfs.h> work with constattribute_group. So mark the non-const structs as const.Arvind Yadav (11):
[PATCH 01/11] drm: i915: i915_oa_kblgt2: constify attribute_groupstructures.
[PATCH 02/11] drm: i915:i915_oa_bdw: constifyattribute_group
structures.
[PATCH 03/11] drm: i915:i915_oa_bxt: constifyattribute_group
structures.
[PATCH 04/11] drm: i915:i915_oa_chv: constifyattribute_group
structures.
[PATCH 05/11] drm: i915:i915_oa_glk: constifyattribute_group
structures.
[PATCH 06/11] drm: i915:i915_oa_hsw: constifyattribute_group
structures.
[PATCH 07/11] drm: i915:i915_oa_kblgt3: constifyattribute_group
structures.
[PATCH 08/11] drm: i915:i915_oa_sklgt2: constifyattribute_group
structures.
[PATCH 09/11] drm: i915:i915_oa_sklgt3: constifyattribute_group
structures.
[PATCH 10/11] drm: i915:i915_oa_sklgt4: constifyattribute_group
structures.
[PATCH 11/11] drm: i915:i915_sysfs: constifyattribute_group
structures.drivers/gpu/drm/i915/i915_oa_bdw.c | 44 +++++++++++++++++------------------ drivers/gpu/drm/i915/i915_oa_bxt.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_chv.c | 28 +++++++++++----------- drivers/gpu/drm/i915/i915_oa_glk.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_hsw.c | 12 +++++----- drivers/gpu/drm/i915/i915_oa_kblgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_kblgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_sysfs.c | 6 ++--- 11 files changed, 165 insertions(+), 165 deletions(-)
~arvind
Quoted 6 lines · Arvind Yadav
Hi Lionel,
Quoted 2 lines · Lionel Landwerlin
Hi Arwind,
Quoted 7 lines
Quoted 6 lines
These files were generated by a script maintained in this repository : https://github.com/rib/gputop/blob/master/scripts/i915-perf-kernelgen.py
It would best to update this script first to make sure future platforms get the fixes too.Some changes have just been merged, deleted most configs but the test ones. You'll need to update your series.
I have done the changes. Please review it. :) Shared patch is 0001-i915-perf-kernelgen.py-constify-attribute_group-stru.patch.
Hm... Where is it? (I can't see it on the mailing list nor attached) The best would be to submit a PR on the github project directly.
Quoted 57 lines
Quoted 57 lines
Otherwise it looks like a good change.
Thanks,
-
LionelQuoted 47 lines · Arvind Yadav
attribute_groupare not supposed to change at runtime. All functions working withattribute_groupprovided by <linux/sysfs.h> work with constattribute_group. So mark the non-const structs as const.Arvind Yadav (11):
[PATCH 01/11] drm: i915: i915_oa_kblgt2: constify attribute_groupstructures.
[PATCH 02/11] drm: i915:i915_oa_bdw: constifyattribute_group
structures.
[PATCH 03/11] drm: i915:i915_oa_bxt: constifyattribute_group
structures.
[PATCH 04/11] drm: i915:i915_oa_chv: constifyattribute_group
structures.
[PATCH 05/11] drm: i915:i915_oa_glk: constifyattribute_group
structures.
[PATCH 06/11] drm: i915:i915_oa_hsw: constifyattribute_group
structures.
[PATCH 07/11] drm: i915:i915_oa_kblgt3: constifyattribute_group
structures.
[PATCH 08/11] drm: i915:i915_oa_sklgt2: constifyattribute_group
structures.
[PATCH 09/11] drm: i915:i915_oa_sklgt3: constifyattribute_group
structures.
[PATCH 10/11] drm: i915:i915_oa_sklgt4: constifyattribute_group
structures.
[PATCH 11/11] drm: i915:i915_sysfs: constifyattribute_group
structures.drivers/gpu/drm/i915/i915_oa_bdw.c | 44 +++++++++++++++++------------------ drivers/gpu/drm/i915/i915_oa_bxt.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_chv.c | 28 +++++++++++----------- drivers/gpu/drm/i915/i915_oa_glk.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_hsw.c | 12 +++++----- drivers/gpu/drm/i915/i915_oa_kblgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_kblgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_sysfs.c | 6 ++--- 11 files changed, 165 insertions(+), 165 deletions(-)
Quoted 2 lines
~arvind
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Lionel Landwerlin
Quoted 10 lines · Arvind Yadav
Hi Lionel,
Quoted 6 lines · Lionel Landwerlin
Hi Arwind,
These files were generated by a script maintained in this repository : https://github.com/rib/gputop/blob/master/scripts/i915-perf-kernelgen.py
It would best to update this script first to make sure future platforms get the fixes too.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Some changes have just been merged, deleted most configs but the test ones. You'll need to update your series.
I have done the changes. Please review it. :) Shared patch is 0001-i915-perf-kernelgen.py-constify-attribute_group-stru.patch.
Hm... Where is it? (I can't see it on the mailing list nor attached) The best would be to submit a PR on the github project directly.
I have push directly on github project. I have send patch to you. Is there any different way to send mail.?
Changes are looks like this.
--- scripts/i915-perf-kernelgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0
py b/scripts/i915-perf-kernelgen.py
index 7178f47..7633624 100755
scripts/i915-perf-kernelgen.py +1 -1
@@ -382,7 +382,7 @@ def output_sysfs_code(sets): c("};") c("\n") - c("static struct attribute_group group_" + perf_name_lc + " = {") + c("static const struct attribute_group group_" + perf_name_lc + " = {") c.indent(8) c(".name = \"" + metric_set['guid'] + "\",") c(".attrs = attrs_" + perf_name_lc + ",")
---
Quoted 57 lines
Quoted 57 lines
Quoted 57 lines
Otherwise it looks like a good change.
Thanks,
-
LionelQuoted 47 lines · Arvind Yadav
attribute_groupare not supposed to change at runtime. All functions working withattribute_groupprovided by <linux/sysfs.h> work with constattribute_group. So mark the non-const structs as const.Arvind Yadav (11):
[PATCH 01/11] drm: i915: i915_oa_kblgt2: constify
attribute_groupstructures.
[PATCH 02/11] drm: i915:i915_oa_bdw: constifyattribute_group
structures.
[PATCH 03/11] drm: i915:i915_oa_bxt: constifyattribute_group
structures.
[PATCH 04/11] drm: i915:i915_oa_chv: constifyattribute_group
structures.
[PATCH 05/11] drm: i915:i915_oa_glk: constifyattribute_group
structures.
[PATCH 06/11] drm: i915:i915_oa_hsw: constifyattribute_group
structures.
[PATCH 07/11] drm: i915:i915_oa_kblgt3: constifyattribute_groupstructures.
[PATCH 08/11] drm: i915:i915_oa_sklgt2: constifyattribute_groupstructures.
[PATCH 09/11] drm: i915:i915_oa_sklgt3: constifyattribute_groupstructures.
[PATCH 10/11] drm: i915:i915_oa_sklgt4: constifyattribute_groupstructures.
[PATCH 11/11] drm: i915:i915_sysfs: constifyattribute_group
structures.drivers/gpu/drm/i915/i915_oa_bdw.c | 44 +++++++++++++++++------------------ drivers/gpu/drm/i915/i915_oa_bxt.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_chv.c | 28 +++++++++++----------- drivers/gpu/drm/i915/i915_oa_glk.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_hsw.c | 12 +++++----- drivers/gpu/drm/i915/i915_oa_kblgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_kblgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_sysfs.c | 6 ++--- 11 files changed, 165 insertions(+), 165 deletions(-)
Quoted 3 lines
Quoted 2 lines
~arvind
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 18 lines · Arvind Yadav
Quoted 14 lines · Lionel Landwerlin
Quoted 13 lines · Arvind Yadav
Hi Lionel,
Quoted 9 lines · Lionel Landwerlin
Hi Arwind,
These files were generated by a script maintained in this repository : https://github.com/rib/gputop/blob/master/scripts/i915-perf-kernelgen.py
It would best to update this script first to make sure future platforms get the fixes too.
Some changes have just been merged, deleted most configs but the test ones. You'll need to update your series.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
I have done the changes. Please review it. :) Shared patch is 0001-i915-perf-kernelgen.py-constify-attribute_group-stru.patch.
Hm... Where is it? (I can't see it on the mailing list nor attached) The best would be to submit a PR on the github project directly.
I have push directly on github project. I have send patch to you. Is there any different way to send mail.?
Changes are looks like this.
It turns out the structs you've made const aren't in the tree anymore.
Thanks though!
Quoted 79 lines
--- scripts/i915-perf-kernelgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0py
b/scripts/i915-perf-kernelgen.py
index 7178f47..7633624 100755scripts/i915-perf-kernelgen.py +2
-2@@ -382,7 +382,7 @@ def output_sysfs_code(sets): c("};") c("\n") - c("static struct attribute_group group_" + perf_name_lc + " = {") + c("static const struct attribute_group group_" + perf_name_lc + " = {") c.indent(8) c(".name = \"" + metric_set['guid'] + "\",") c(".attrs = attrs_" + perf_name_lc + ",") ---Quoted 57 lines
Quoted 57 lines
Quoted 57 lines
Otherwise it looks like a good change.
Thanks,
-
LionelQuoted 47 lines · Arvind Yadav
attribute_groupare not supposed to change at runtime. All functions working withattribute_groupprovided by <linux/sysfs.h> work with constattribute_group. So mark the non-const structs as const.Arvind Yadav (11):
[PATCH 01/11] drm: i915: i915_oa_kblgt2: constify
attribute_groupstructures.
[PATCH 02/11] drm: i915:i915_oa_bdw: constifyattribute_group
structures.
[PATCH 03/11] drm: i915:i915_oa_bxt: constifyattribute_group
structures.
[PATCH 04/11] drm: i915:i915_oa_chv: constifyattribute_group
structures.
[PATCH 05/11] drm: i915:i915_oa_glk: constifyattribute_group
structures.
[PATCH 06/11] drm: i915:i915_oa_hsw: constifyattribute_group
structures.
[PATCH 07/11] drm: i915:i915_oa_kblgt3: constifyattribute_groupstructures.
[PATCH 08/11] drm: i915:i915_oa_sklgt2: constifyattribute_groupstructures.
[PATCH 09/11] drm: i915:i915_oa_sklgt3: constifyattribute_groupstructures.
[PATCH 10/11] drm: i915:i915_oa_sklgt4: constifyattribute_groupstructures.
[PATCH 11/11] drm: i915:i915_sysfs: constifyattribute_group
structures.drivers/gpu/drm/i915/i915_oa_bdw.c | 44 +++++++++++++++++------------------ drivers/gpu/drm/i915/i915_oa_bxt.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_chv.c | 28 +++++++++++----------- drivers/gpu/drm/i915/i915_oa_glk.c | 30 ++++++++++++------------ drivers/gpu/drm/i915/i915_oa_hsw.c | 12 +++++----- drivers/gpu/drm/i915/i915_oa_kblgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_kblgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt2.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt3.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_oa_sklgt4.c | 36 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_sysfs.c | 6 ++--- 11 files changed, 165 insertions(+), 165 deletions(-)
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
~arvind
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx