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 01/11] drm: i915: i915_oa_kblgt2: constify attribute_group structures.
Date: Fri,  4 Aug 2017 10:33:26 +0530	[thread overview]
Message-ID: <1501823016-6779-2-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_kblgt2.c | 36 +++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_oa_kblgt2.c b/drivers/gpu/drm/i915/i915_oa_kblgt2.c
index 87dbd0a..c9b6751 100644
--- a/drivers/gpu/drm/i915/i915_oa_kblgt2.c
+++ b/drivers/gpu/drm/i915/i915_oa_kblgt2.c
@@ -2412,7 +2412,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_render_basic = {
+static const struct attribute_group group_render_basic = {
 	.name = "f8d677e9-ff6f-4df1-9310-0334c6efacce",
 	.attrs =  attrs_render_basic,
 };
@@ -2434,7 +2434,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_basic = {
+static const struct attribute_group group_compute_basic = {
 	.name = "e17fc42a-e614-41b6-90c4-1074841a6c77",
 	.attrs =  attrs_compute_basic,
 };
@@ -2456,7 +2456,7 @@ int i915_oa_select_metric_set_kblgt2(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 = "d7a17a3a-ca71-40d2-a919-ace80d50633f",
 	.attrs =  attrs_render_pipe_profile,
 };
@@ -2478,7 +2478,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_reads = {
+static const struct attribute_group group_memory_reads = {
 	.name = "57b59202-172b-477a-87de-33f85572c589",
 	.attrs =  attrs_memory_reads,
 };
@@ -2500,7 +2500,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_memory_writes = {
+static const struct attribute_group group_memory_writes = {
 	.name = "3addf8ef-8e9b-40f5-a448-3dbb5d5128b0",
 	.attrs =  attrs_memory_writes,
 };
@@ -2522,7 +2522,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extended = {
+static const struct attribute_group group_compute_extended = {
 	.name = "4af0400a-81c3-47db-a6b6-deddbd75680e",
 	.attrs =  attrs_compute_extended,
 };
@@ -2544,7 +2544,7 @@ int i915_oa_select_metric_set_kblgt2(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 = "0e22f995-79ca-4f67-83ab-e9d9772488d8",
 	.attrs =  attrs_compute_l3_cache,
 };
@@ -2566,7 +2566,7 @@ int i915_oa_select_metric_set_kblgt2(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 = "bc2a00f7-cb8a-4ff2-8ad0-e241dad16937",
 	.attrs =  attrs_hdc_and_sf,
 };
@@ -2588,7 +2588,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_1 = {
+static const struct attribute_group group_l3_1 = {
 	.name = "d2bbe790-f058-42d9-81c6-cdedcf655bc2",
 	.attrs =  attrs_l3_1,
 };
@@ -2610,7 +2610,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_2 = {
+static const struct attribute_group group_l3_2 = {
 	.name = "2f8e32e4-5956-46e2-af31-c8ea95887332",
 	.attrs =  attrs_l3_2,
 };
@@ -2632,7 +2632,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_l3_3 = {
+static const struct attribute_group group_l3_3 = {
 	.name = "ca046aad-b5fb-4101-adce-6473ee6e5b14",
 	.attrs =  attrs_l3_3,
 };
@@ -2654,7 +2654,7 @@ int i915_oa_select_metric_set_kblgt2(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 = "605f388f-24bb-455c-88e3-8d57ae0d7e9f",
 	.attrs =  attrs_rasterizer_and_pixel_backend,
 };
@@ -2676,7 +2676,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_sampler = {
+static const struct attribute_group group_sampler = {
 	.name = "31dd157c-bf4e-4bab-bf2b-f5c8174af1af",
 	.attrs =  attrs_sampler,
 };
@@ -2698,7 +2698,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_1 = {
+static const struct attribute_group group_tdl_1 = {
 	.name = "105db928-5542-466b-9128-e1f3c91426cb",
 	.attrs =  attrs_tdl_1,
 };
@@ -2720,7 +2720,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_tdl_2 = {
+static const struct attribute_group group_tdl_2 = {
 	.name = "03db94d2-b37f-4c58-a791-0d2067b013bb",
 	.attrs =  attrs_tdl_2,
 };
@@ -2742,7 +2742,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_compute_extra = {
+static const struct attribute_group group_compute_extra = {
 	.name = "aa7a3fb9-22fb-43ff-a32d-0ab6c13bbd16",
 	.attrs =  attrs_compute_extra,
 };
@@ -2764,7 +2764,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_vme_pipe = {
+static const struct attribute_group group_vme_pipe = {
 	.name = "398a4268-ef6f-4ffc-b55f-3c7b5363ce61",
 	.attrs =  attrs_vme_pipe,
 };
@@ -2786,7 +2786,7 @@ int i915_oa_select_metric_set_kblgt2(struct drm_i915_private *dev_priv)
 	NULL,
 };
 
-static struct attribute_group group_test_oa = {
+static const struct attribute_group group_test_oa = {
 	.name = "baa3c7e4-52b6-4b85-801e-465a94b746dd",
 	.attrs =  attrs_test_oa,
 };
-- 
1.9.1

  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 ` Arvind Yadav [this message]
2017-08-04  5:03 ` [PATCH 02/11] drm: i915: i915_oa_bdw: constify " 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 ` [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-2-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