From patchwork Fri Aug 4 05:03:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9880445 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 2133D603B4 for ; Fri, 4 Aug 2017 05:04:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 171262874E for ; Fri, 4 Aug 2017 05:04:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BECD28765; Fri, 4 Aug 2017 05:04:08 +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 8CEB02874E for ; Fri, 4 Aug 2017 05:04:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A227B6E318; Fri, 4 Aug 2017 05:04:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F1B06E318; Fri, 4 Aug 2017 05:04:05 +0000 (UTC) Received: by mail-pg0-x243.google.com with SMTP id y129so738625pgy.3; Thu, 03 Aug 2017 22:04:05 -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=5J33MJBSCodDl2qyiAaDWvCNLJwqXMWXMC9RpimAJK0=; b=DfuSkhfO9dELyKba1ZGKiZ/QdB7CIDvxIgKdFcq7teQDL5oN1baloirAEtvopc56Fm xeLS7D4nSqNXNGyWOEA44MzRoH1jOJj7cEXeeEkc5perOecyfGZHlDZrIkkKit9rM8Cr 3pJz6VhBmKUZhFOiB/kUgoqGVEoYvu5y5vcq38wFBb/CJYs+SvkTfkpRtxVeFk/8k85M tGJAoJrsDsOvkZm7/dfZe8R7eO29vZwDIh1hndMi+lgr14faW2zSFlvISJbkqdbEIus+ a36staU01Xp70uT+W4D3ISC/0FAVwIwPV6NVGpQqd+7QU9DH9aIv4nnvDkfssBFCUjhs JmyA== 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=5J33MJBSCodDl2qyiAaDWvCNLJwqXMWXMC9RpimAJK0=; b=sshpTS1ZH/8PCkrOk114rhwokBkCoEJHkJ6bQxNcU4tH6rg14mhsOPP5kIBJaD+s7o oBH1SaJRMNOyZavc2bv/9bdHDu8dnI8Pmcp4JjIzjHsMYCB8fLCWJ1uDA2SJmhnRy6hx JJAh6YusxORIIAgYWyqPcITbwxTGiiuuwR7CJDTlBBCJ68CB9rPZngGKB4niehNBAF1T X7Rff85JjQ2QuawSGA6vjCdsdLsD/Z1bvv8qEmhYKuFY6r2BWrh8H92lpfOvTrD8rgWA Yw30EsEu8U+AvQbRnMzMqx8hYfhLnLlHoPesuKHYqCLDXcCY/hh2KjokqXS2cyGiVeHH ttdg== X-Gm-Message-State: AIVw113LZfAD1FSCPcqXfdAWppI1wpJ4utUGBIMRpSzmE2jpq01/KLSj 0nzMtN+ASpiTJw== X-Received: by 10.84.169.3 with SMTP id g3mr1308730plb.136.1501823045113; Thu, 03 Aug 2017 22:04:05 -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.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 22:04:04 -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:26 +0530 Message-Id: <1501823016-6779-2-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 01/11] drm: i915: i915_oa_kblgt2: 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_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, };