All of lore.kernel.org
 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 05/11] drm: i915: i915_oa_glk: constify attribute_group structures.
Date: Fri,  4 Aug 2017 10:33:30 +0530	[thread overview]
Message-ID: <1501823016-6779-6-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_glk.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_oa_glk.c b/drivers/gpu/drm/i915/i915_oa_glk.c
index 2f356d5..a8eea3a 100644
--- a/drivers/gpu/drm/i915/i915_oa_glk.c
+++ b/drivers/gpu/drm/i915/i915_oa_glk.c
@@ -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,
 };
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
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, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: [PATCH 05/11] drm: i915: i915_oa_glk: constify attribute_group structures.
Date: Fri,  4 Aug 2017 10:33:30 +0530	[thread overview]
Message-ID: <1501823016-6779-6-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_glk.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_oa_glk.c b/drivers/gpu/drm/i915/i915_oa_glk.c
index 2f356d5..a8eea3a 100644
--- a/drivers/gpu/drm/i915/i915_oa_glk.c
+++ b/drivers/gpu/drm/i915/i915_oa_glk.c
@@ -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,
 };
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-08-04  5:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04  5:03 [PATCH 00/11] constify i915 attribute_group structures Arvind Yadav
2017-08-04  5:03 ` 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
2017-08-04  5:03 ` [PATCH 02/11] drm: i915: i915_oa_bdw: " Arvind Yadav
2017-08-04  5:03   ` Arvind Yadav
2017-08-04  5:03 ` [PATCH 03/11] drm: i915: i915_oa_bxt: " Arvind Yadav
2017-08-04  5:03   ` Arvind Yadav
2017-08-04  5:03 ` [PATCH 04/11] drm: i915: i915_oa_chv: " Arvind Yadav
2017-08-04  5:03   ` Arvind Yadav
2017-08-04  5:03 ` Arvind Yadav [this message]
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   ` Arvind Yadav
2017-08-04  5:03 ` [PATCH 07/11] drm: i915: i915_oa_kblgt3: " Arvind Yadav
2017-08-04  5:03   ` Arvind Yadav
2017-08-04  5:03 ` [PATCH 08/11] drm: i915: i915_oa_sklgt2: " Arvind Yadav
2017-08-04  5:03   ` Arvind Yadav
2017-08-04  5:03 ` [PATCH 09/11] drm: i915: i915_oa_sklgt3: " Arvind Yadav
2017-08-04  5:03   ` Arvind Yadav
2017-08-04  5:03 ` [PATCH 10/11] drm: i915: i915_oa_sklgt4: " Arvind Yadav
2017-08-04  5:03   ` Arvind Yadav
2017-08-04  5:03 ` [PATCH 11/11] drm: i915: i915_sysfs: " Arvind Yadav
2017-08-04  5:03   ` 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
2017-08-04 10:34       ` Lionel Landwerlin
2017-08-04 10:39       ` Arvind Yadav
2017-08-04 16:01         ` 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-6-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.