From patchwork Fri Aug 4 05:03:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9880447 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 BD22A603B4 for ; Fri, 4 Aug 2017 05:04:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2E862874E for ; Fri, 4 Aug 2017 05:04:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7B1228765; Fri, 4 Aug 2017 05:04:10 +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 3AC712874E for ; Fri, 4 Aug 2017 05:04:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A61389FE3; Fri, 4 Aug 2017 05:04:09 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B61F892D5; Fri, 4 Aug 2017 05:04:08 +0000 (UTC) Received: by mail-pg0-x241.google.com with SMTP id 83so737654pgb.4; Thu, 03 Aug 2017 22:04:08 -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=NPMCiFCTq+/2WyKbapDQR/5NThDcxZcqa1cIhWSY0CA=; b=erNbA6uUiT15GC1nmHq2TVNgJFxB+QJ2Q6VZOcZKOjgym+jYqnCxJ2/yiC/lG8RDu6 rQXNAya7FaUB42cJjGD9tTbmm2FAHvf+EOoVnL3GhAJRuF0y+9lZjtlaJncEr4KN9+pQ KAIdADL3TLw7dvPmfbWNsEsl6k0YPfV8guIS9ohEeTTV4RhZP3lA+HvMdfEFIieyDWrE nXI6jtBECjGh2LdtOwZCq9RNnDN2uYNwdibuALB3tFKtqPiID92sfHPs0Kpibu8Wh5oN dAmGIrmWXr8CC51UGZCs3tmHv7/2EFwKvUxcGYNtqTUXKlxpUV5k6Y/8V6tvVIRTJekN HSAg== 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=NPMCiFCTq+/2WyKbapDQR/5NThDcxZcqa1cIhWSY0CA=; b=hbkbjlb2rCG0skBew/p8BJvJFViiFptmPKBzKEJF8xlPLG5YIgCC2HrNvYmz+BLMHb u5NBSIR2fT4gt3HKQbRxBG0pMF5keaEuKT5jMG1rLRtxa75rDJ04/Dd8bEAMQJRlk8TS Hh3RdDggjFntHvAZzD24THXLunzOHZg43bJXsyYkE1ndrhPKXbuZ3nfe3NKc6vgG2LVo iDgy1t8kvIw1es1dJ2R99/XCefOTBKPsULn1PGpf6kvH6xVRStMh5PegzD11tCiSCIEi W8RQQVRQUAbqTHXXwJCJ/mUFuKqdXQie9cHWw4n69obnoyoLGX/WL4QXYvFC/haWaJCT NA8Q== X-Gm-Message-State: AIVw1109UzwMssyySjMaTcjH6aeL43wN4VLRC/nHtfIoWG5LOv22dvO5 b3kfhb9ZL2shMw== X-Received: by 10.84.209.142 with SMTP id y14mr1328848plh.286.1501823047787; Thu, 03 Aug 2017 22:04:07 -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.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 22:04:07 -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:27 +0530 Message-Id: <1501823016-6779-3-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 02/11] drm: i915: i915_oa_bdw: 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_bdw.c | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_oa_bdw.c b/drivers/gpu/drm/i915/i915_oa_bdw.c index d4462c2..90c96c2 100644 --- a/drivers/gpu/drm/i915/i915_oa_bdw.c +++ b/drivers/gpu/drm/i915/i915_oa_bdw.c @@ -4669,7 +4669,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_render_basic = { +static const struct attribute_group group_render_basic = { .name = "b541bd57-0e0f-4154-b4c0-5858010a2bf7", .attrs = attrs_render_basic, }; @@ -4691,7 +4691,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_basic = { +static const struct attribute_group group_compute_basic = { .name = "35fbc9b2-a891-40a6-a38d-022bb7057552", .attrs = attrs_compute_basic, }; @@ -4713,7 +4713,7 @@ int i915_oa_select_metric_set_bdw(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 = "233d0544-fff7-4281-8291-e02f222aff72", .attrs = attrs_render_pipe_profile, }; @@ -4735,7 +4735,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_reads = { +static const struct attribute_group group_memory_reads = { .name = "2b255d48-2117-4fef-a8f7-f151e1d25a2c", .attrs = attrs_memory_reads, }; @@ -4757,7 +4757,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_memory_writes = { +static const struct attribute_group group_memory_writes = { .name = "f7fd3220-b466-4a4d-9f98-b0caf3f2394c", .attrs = attrs_memory_writes, }; @@ -4779,7 +4779,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extended = { +static const struct attribute_group group_compute_extended = { .name = "e99ccaca-821c-4df9-97a7-96bdb7204e43", .attrs = attrs_compute_extended, }; @@ -4801,7 +4801,7 @@ int i915_oa_select_metric_set_bdw(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 = "27a364dc-8225-4ecb-b607-d6f1925598d9", .attrs = attrs_compute_l3_cache, }; @@ -4823,7 +4823,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_data_port_reads_coalescing = { +static const struct attribute_group group_data_port_reads_coalescing = { .name = "857fc630-2f09-4804-85f1-084adfadd5ab", .attrs = attrs_data_port_reads_coalescing, }; @@ -4845,7 +4845,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_data_port_writes_coalescing = { +static const struct attribute_group group_data_port_writes_coalescing = { .name = "343ebc99-4a55-414c-8c17-d8e259cf5e20", .attrs = attrs_data_port_writes_coalescing, }; @@ -4867,7 +4867,7 @@ int i915_oa_select_metric_set_bdw(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 = "7bdafd88-a4fa-4ed5-bc09-1a977aa5be3e", .attrs = attrs_hdc_and_sf, }; @@ -4889,7 +4889,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_1 = { +static const struct attribute_group group_l3_1 = { .name = "9385ebb2-f34f-4aa5-aec5-7e9cbbea0f0b", .attrs = attrs_l3_1, }; @@ -4911,7 +4911,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_2 = { +static const struct attribute_group group_l3_2 = { .name = "446ae59b-ff2e-41c9-b49e-0184a54bf00a", .attrs = attrs_l3_2, }; @@ -4933,7 +4933,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_3 = { +static const struct attribute_group group_l3_3 = { .name = "84a7956f-1ea4-4d0d-837f-e39a0376e38c", .attrs = attrs_l3_3, }; @@ -4955,7 +4955,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_l3_4 = { +static const struct attribute_group group_l3_4 = { .name = "92b493d9-df18-4bed-be06-5cac6f2a6f5f", .attrs = attrs_l3_4, }; @@ -4977,7 +4977,7 @@ int i915_oa_select_metric_set_bdw(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 = "14345c35-cc46-40d0-bb04-6ed1fbb43679", .attrs = attrs_rasterizer_and_pixel_backend, }; @@ -4999,7 +4999,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler_1 = { +static const struct attribute_group group_sampler_1 = { .name = "f0c6ba37-d3d3-4211-91b5-226730312a54", .attrs = attrs_sampler_1, }; @@ -5021,7 +5021,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_sampler_2 = { +static const struct attribute_group group_sampler_2 = { .name = "30bf3702-48cf-4bca-b412-7cf50bb2f564", .attrs = attrs_sampler_2, }; @@ -5043,7 +5043,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_1 = { +static const struct attribute_group group_tdl_1 = { .name = "238bec85-df05-44f3-b905-d166712f2451", .attrs = attrs_tdl_1, }; @@ -5065,7 +5065,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_tdl_2 = { +static const struct attribute_group group_tdl_2 = { .name = "24bf02cd-8693-4583-981c-c4165b33da01", .attrs = attrs_tdl_2, }; @@ -5087,7 +5087,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_compute_extra = { +static const struct attribute_group group_compute_extra = { .name = "8fb61ba2-2fbb-454c-a136-2dec5a8a595e", .attrs = attrs_compute_extra, }; @@ -5109,7 +5109,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_vme_pipe = { +static const struct attribute_group group_vme_pipe = { .name = "e1743ca0-7fc8-410b-a066-de7bbb9280b7", .attrs = attrs_vme_pipe, }; @@ -5131,7 +5131,7 @@ int i915_oa_select_metric_set_bdw(struct drm_i915_private *dev_priv) NULL, }; -static struct attribute_group group_test_oa = { +static const struct attribute_group group_test_oa = { .name = "d6de6f55-e526-4f79-a6a6-d7315c09044e", .attrs = attrs_test_oa, };