Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751655AbdISLLD (ORCPT ); Tue, 19 Sep 2017 07:11:03 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35373 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237AbdISLLC (ORCPT ); Tue, 19 Sep 2017 07:11:02 -0400 X-Google-Smtp-Source: AOwi7QCtOqPaWMzhH3J4I5iiDctVTiqiVJ29GGH2IeVCPSWutXZXFadXM69XZI9Sm2O8NIRDjvQg+g== From: Bhumika Goyal To: julia.lawall@lip6.fr, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] x86/events/amd/iommu: make iommu_pmu const and __initconst Date: Tue, 19 Sep 2017 16:40:43 +0530 Message-Id: <1505819443-670-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 743 Lines: 24 Make this const as it is only used during a copy operation. Also, make it __initconst as it is only used during the init phase and after this it is not referenced anywhere. Signed-off-by: Bhumika Goyal --- arch/x86/events/amd/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c index 3641e24..38b5d41 100644 --- a/arch/x86/events/amd/iommu.c +++ b/arch/x86/events/amd/iommu.c @@ -405,7 +405,7 @@ static __init int _init_events_attrs(void) NULL, }; -static struct pmu iommu_pmu = { +static const struct pmu iommu_pmu __initconst = { .event_init = perf_iommu_event_init, .add = perf_iommu_add, .del = perf_iommu_del, -- 1.9.1