From patchwork Fri Aug 4 05:03:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9880465 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F0F28603B4 for ; Fri, 4 Aug 2017 05:04:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6CE12899A for ; Fri, 4 Aug 2017 05:04:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBB452899C; Fri, 4 Aug 2017 05:04:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 767E02899A for ; Fri, 4 Aug 2017 05:04:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 053FF6E346; Fri, 4 Aug 2017 05:04:23 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id ADDF26E341; Fri, 4 Aug 2017 05:04:21 +0000 (UTC) Received: by mail-pf0-x241.google.com with SMTP id t86so785133pfe.1; Thu, 03 Aug 2017 22:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JO0eEwicRaUz2YsyCHNw+Bz6ua1LRq+zfi2kx/JP8NY=; b=RQT/tXESyNSvQ5OiXdGoOTMJyL1PNtsdlBZiRSjDOFaR/nF9/y7XpQJ7WWO8mw2a34 VfBnMUzsVwcN9O37oQaMJndG/j98WDXuAOwTgyoSPZiCIzlE1VZHxq3W4zCYzd0QlsEA 4XAikkQuwMkXru6FxLmXR6Ahr7gtYREJ9iYQqckt9V/P3SdsaBJDTbHMjvihFVrZEiAd MPN4zo2flW5iSORnRImFYqy2B2IhBnmb57wbMsIFZqldS6oVoGF/lhQR3wYGIf/TMw8R 2goUFpO2quqlmwX96zzHG3YjLORR35mALZl9boZfuKt4VJyi/DTIUrhw8fG58FD43lGx IfNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JO0eEwicRaUz2YsyCHNw+Bz6ua1LRq+zfi2kx/JP8NY=; b=lk9+9jAND//1MPApEUNGfvcp43EqiLVSwqvZNHern98v/b2e1abc7ISI98QXq7gaEd QcO444Q8M6UnoS5KytY/0gubRIAlbQd3FjjTcHe2MWy6RPqWVMG37oOSN8xYJgZGjdX2 OHN27fDsp/VDZs5/pIh1aQw7fJEoj8V+peT6ja8ZwfxqOeSH3BK3Hu7ezkN8Vl0L5ccV QzFbehTAHnOXsvIungpRdWp+OEWgUDkCKVUIsYIPM/QUAoCmnS2g1oMQIV57y2gS+Fpx lZqqGR7O/gFhX+PJmwAkeClKswHOQVSh8HHnMjYuK0d7lPaIAsXrCKpJEDiIdt6kPHtp TESA== X-Gm-Message-State: AIVw1116SZwXoAlc3xeC6GW+FYCYOZmi8Q1wSTepUPrDdbEcE+U7/XCu DQxdJ0nigwn0Cw== X-Received: by 10.99.127.90 with SMTP id p26mr1032451pgn.377.1501823061352; Thu, 03 Aug 2017 22:04:21 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id y22sm925977pfi.159.2017.08.03.22.04.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 22:04:20 -0700 (PDT) From: Arvind Yadav To: daniel.vetter@intel.com, jani.nikula@linux.intel.com, airlied@linux.ie Date: Fri, 4 Aug 2017 10:33:32 +0530 Message-Id: <1501823016-6779-8-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501823016-6779-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1501823016-6779-1-git-send-email-arvind.yadav.cs@gmail.com> Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 07/11] drm: i915: i915_oa_kblgt3: constify attribute_group structures. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/i915/i915_oa_kblgt3.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_oa_kblgt3.c b/drivers/gpu/drm/i915/i915_oa_kblgt3.c index 6ed0925..f234801 100644 --- a/drivers/gpu/drm/i915/i915_oa_kblgt3.c +++ b/drivers/gpu/drm/i915/i915_oa_kblgt3.c @@ -2461,7 +2461,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_basic = { +static const struct attribute_group group_render_basic = { .name = "0286c920-2f6d-493b-b22d-7a5280df43de", .attrs = attrs_render_basic, }; @@ -2483,7 +2483,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_basic = { +static const struct attribute_group group_compute_basic = { .name = "9823aaa1-b06f-40ce-884b-cd798c79f0c2", .attrs = attrs_compute_basic, }; @@ -2505,7 +2505,7 @@ int i915_oa_select_metric_set_kblgt3(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 = "c7c735f3-ce58-45cf-aa04-30b183f1faff", .attrs = attrs_render_pipe_profile, }; @@ -2527,7 +2527,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_reads = { +static const struct attribute_group group_memory_reads = { .name = "96ec2219-040b-428a-856a-6bc03363a057", .attrs = attrs_memory_reads, }; @@ -2549,7 +2549,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_writes = { +static const struct attribute_group group_memory_writes = { .name = "03372b64-4996-4d3b-aa18-790e75eeb9c2", .attrs = attrs_memory_writes, }; @@ -2571,7 +2571,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extended = { +static const struct attribute_group group_compute_extended = { .name = "31b4ce5a-bd61-4c1f-bb5d-f2e731412150", .attrs = attrs_compute_extended, }; @@ -2593,7 +2593,7 @@ int i915_oa_select_metric_set_kblgt3(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 = "2ce0911a-27fc-4887-96f0-11084fa807c3", .attrs = attrs_compute_l3_cache, }; @@ -2615,7 +2615,7 @@ int i915_oa_select_metric_set_kblgt3(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 = "546c4c1d-99b8-42fb-a107-5aaabb5314a8", .attrs = attrs_hdc_and_sf, }; @@ -2637,7 +2637,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_1 = { +static const struct attribute_group group_l3_1 = { .name = "4e93d156-9b39-4268-8544-a8e0480806d7", .attrs = attrs_l3_1, }; @@ -2659,7 +2659,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_2 = { +static const struct attribute_group group_l3_2 = { .name = "de1bec86-ca92-4b43-89fa-147653221cc0", .attrs = attrs_l3_2, }; @@ -2681,7 +2681,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_3 = { +static const struct attribute_group group_l3_3 = { .name = "e63537bb-10be-4d4a-92c4-c6b0c65e02ef", .attrs = attrs_l3_3, }; @@ -2703,7 +2703,7 @@ int i915_oa_select_metric_set_kblgt3(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 = "7a03a9f8-ec5e-46bb-8b67-1f0ff1476281", .attrs = attrs_rasterizer_and_pixel_backend, }; @@ -2725,7 +2725,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler = { +static const struct attribute_group group_sampler = { .name = "b25d2ebf-a6e0-4b29-96be-a9b010edeeda", .attrs = attrs_sampler, }; @@ -2747,7 +2747,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_1 = { +static const struct attribute_group group_tdl_1 = { .name = "469a05e5-e299-46f7-9598-7b05f3c34991", .attrs = attrs_tdl_1, }; @@ -2769,7 +2769,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_2 = { +static const struct attribute_group group_tdl_2 = { .name = "52f925c6-786a-4ec6-86ce-cba85c83453a", .attrs = attrs_tdl_2, }; @@ -2791,7 +2791,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extra = { +static const struct attribute_group group_compute_extra = { .name = "efc497ac-884e-4ee4-a4a8-15fba22aaf21", .attrs = attrs_compute_extra, }; @@ -2813,7 +2813,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_vme_pipe = { +static const struct attribute_group group_vme_pipe = { .name = "bfd9764d-2c5b-4c16-bfc1-89de3ca10917", .attrs = attrs_vme_pipe, }; @@ -2835,7 +2835,7 @@ int i915_oa_select_metric_set_kblgt3(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_test_oa = { +static const struct attribute_group group_test_oa = { .name = "f1792f32-6db2-4b50-b4b2-557128f1688d", .attrs = attrs_test_oa, };