Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1703663
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 06/11] drm: i915: i915_oa_hsw: constify attribute_group structures. |
| Date | 2017-08-04 07:10 +0200 |
| Message-ID | <uaD22-2Em-33@gated-at.bofh.it> (permalink) |
| References | <uaD21-2Em-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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_hsw.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_oa_hsw.c b/drivers/gpu/drm/i915/i915_oa_hsw.c
index 10f169f..93fbe33 100644
--- a/drivers/gpu/drm/i915/i915_oa_hsw.c
+++ b/drivers/gpu/drm/i915/i915_oa_hsw.c
@@ -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,
};
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/11] constify i915 attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 07:10 +0200
[PATCH 11/11] drm: i915: i915_sysfs: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 07:10 +0200
[PATCH 06/11] drm: i915: i915_oa_hsw: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 07:10 +0200
[PATCH 08/11] drm: i915: i915_oa_sklgt2: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 07:10 +0200
[PATCH 02/11] drm: i915: i915_oa_bdw: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 07:10 +0200
[PATCH 04/11] drm: i915: i915_oa_chv: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 07:10 +0200
[PATCH 03/11] drm: i915: i915_oa_bxt: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 07:10 +0200
Re: [Intel-gfx] [PATCH 00/11] constify i915 attribute_group structures. Lionel Landwerlin <lionel.g.landwerlin@intel.com> - 2017-08-04 11:10 +0200
Re: [Intel-gfx] [PATCH 00/11] constify i915 attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 12:30 +0200
Re: [Intel-gfx] [PATCH 00/11] constify i915 attribute_group structures. Lionel Landwerlin <lionel.g.landwerlin@intel.com> - 2017-08-04 12:40 +0200
csiph-web