From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: daniel.vetter@intel.com, jani.nikula@linux.intel.com, airlied@linux.ie
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 02/11] drm: i915: i915_oa_bdw: constify attribute_group structures.
Date: Fri, 4 Aug 2017 10:33:27 +0530 [thread overview]
Message-ID: <1501823016-6779-3-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1501823016-6779-1-git-send-email-arvind.yadav.cs@gmail.com>
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_bdw.c | 44 +++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_oa_bdw.c b/drivers/gpu/drm/i915/i915_oa_bdw.c
index d4462c2..90c96c2 100644
--- a/drivers/gpu/drm/i915/i915_oa_bdw.c
+++ b/drivers/gpu/drm/i915/i915_oa_bdw.c
@@ -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,
};
--
1.9.1
next prev parent reply other threads:[~2017-08-04 5:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 5:03 [PATCH 00/11] constify i915 " Arvind Yadav
2017-08-04 5:03 ` [PATCH 01/11] drm: i915: i915_oa_kblgt2: constify " Arvind Yadav
2017-08-04 5:03 ` Arvind Yadav [this message]
2017-08-04 5:03 ` [PATCH 03/11] drm: i915: i915_oa_bxt: " Arvind Yadav
2017-08-04 5:03 ` [PATCH 04/11] drm: i915: i915_oa_chv: " Arvind Yadav
2017-08-04 5:03 ` [PATCH 05/11] drm: i915: i915_oa_glk: " Arvind Yadav
2017-08-04 5:03 ` [PATCH 06/11] drm: i915: i915_oa_hsw: " Arvind Yadav
2017-08-04 5:03 ` [PATCH 07/11] drm: i915: i915_oa_kblgt3: " Arvind Yadav
2017-08-04 5:03 ` [PATCH 08/11] drm: i915: i915_oa_sklgt2: " Arvind Yadav
2017-08-04 5:03 ` [PATCH 09/11] drm: i915: i915_oa_sklgt3: " Arvind Yadav
2017-08-04 5:03 ` [PATCH 10/11] drm: i915: i915_oa_sklgt4: " Arvind Yadav
2017-08-04 5:03 ` [PATCH 11/11] drm: i915: i915_sysfs: " Arvind Yadav
2017-08-04 9:03 ` [Intel-gfx] [PATCH 00/11] constify i915 " Lionel Landwerlin
2017-08-04 10:22 ` Arvind Yadav
2017-08-04 10:34 ` Lionel Landwerlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1501823016-6779-3-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®