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 06/11] drm: i915: i915_oa_hsw: constify attribute_group structures.
Date: Fri, 4 Aug 2017 10:33:31 +0530 [thread overview]
Message-ID: <1501823016-6779-7-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_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
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 ` [PATCH 02/11] drm: i915: i915_oa_bdw: " Arvind Yadav
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 ` Arvind Yadav [this message]
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-7-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
Powered by JetHome