mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 10/11] drm: i915: i915_oa_sklgt4: constify attribute_group structures.
Date: Fri,  4 Aug 2017 10:33:35 +0530	[thread overview]
Message-ID: <1501823016-6779-11-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_sklgt4.c | 36 +++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_oa_sklgt4.c b/drivers/gpu/drm/i915/i915_oa_sklgt4.c
index 9ddab43..0671899 100644
--- a/drivers/gpu/drm/i915/i915_oa_sklgt4.c
+++ b/drivers/gpu/drm/i915/i915_oa_sklgt4.c
@@ -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,
 };
-- 
1.9.1

  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 ` [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 ` Arvind Yadav [this message]
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-11-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®