From patchwork Tue Oct 25 18:06:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9395179 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 5596460762 for ; Tue, 25 Oct 2016 18:09:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CDB3296FF for ; Tue, 25 Oct 2016 18:09:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 419712970E; Tue, 25 Oct 2016 18:09:34 +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=-0.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D0471296FF for ; Tue, 25 Oct 2016 18:09:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bz69C-0002zW-OC; Tue, 25 Oct 2016 18:08:26 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bz68o-0002YW-BX for linux-arm-kernel@lists.infradead.org; Tue, 25 Oct 2016 18:08:04 +0000 Received: by mail-pf0-x241.google.com with SMTP id 128so20298259pfz.1 for ; Tue, 25 Oct 2016 11:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AESJb8aAdynmXUwMCoqgJwcQ+VL128PEjabLtaPZ8C8=; b=STTjuXHAXb9pHbIBOSWKC7lT7Y+hV6sfnMDDNZsCArrAnxZeQxde3hEnVcGAN0/lSr pT3QZ/ZTX7LzCoGUSSCIpMeOj/zP8P6mUxrqPiDhpJjcJdLmvzyFwGWLvi4aKTy1J4vA 3FTgT1rmho3kMbH8ix2FLa/Y3YGziI/1mWO6bAb03FX6CpPVuFqBf3vfeTOhAF6p2Q5c 8kRbLjtP5odKW5vm4jXShpnL61KFAAjiOesas+zJUzjoRLjuLA8ghzXRvz48EcPblSia kANsrbeTuSIG752JnAd/VD2rRwAb5zB+AWt9NoyogvDXYC10nVA+6YhU2Ryt3PyWiwgy RZNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AESJb8aAdynmXUwMCoqgJwcQ+VL128PEjabLtaPZ8C8=; b=PmhcujMmI6IguP5F1fXBGj90LJY9a5VtLjExLai9g1IT/QkkAW/THco7HB7BO6//2A 4UFVLXUeuTu8pSoaSQ81Q3d/DYOXpxh7zKLMjTYA+qQW968JNHaaQyIOYBOgXdWnj65h RdvmKi0VUborU54MYSzIj89X6MwT88yIkqH04t6HdARxRFth/Z3zafgIzSx688cFeYJ1 In7bcRtJRwcspkqZEy5zgX7rIdETd+C3pI23OOwX583q8/w+hP0NhFAFtRUW0CDsQLpW bsCL0RlhaafU4RwxOvGc3YrEj7fD7F/1YfhLj0XBH2wV0VuhFpQ9AhoApIc3/yl33br/ iAYg== X-Gm-Message-State: ABUngvfjTeFjuY3C3LfWYsO2qVjgHh4WLSnEP6p27v///AbTW3FiO82a1Cco1KTL1ke/5Q== X-Received: by 10.99.111.2 with SMTP id k2mr34860006pgc.136.1477418861148; Tue, 25 Oct 2016 11:07:41 -0700 (PDT) Received: from gmail.com ([106.215.185.228]) by smtp.gmail.com with ESMTPSA id 3sm35096130pam.21.2016.10.25.11.07.32 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 25 Oct 2016 11:07:40 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Tue, 25 Oct 2016 23:37:26 +0530 From: Bhumika Goyal To: will.deacon@arm.com, robin.murphy@arm.com, joro@8bytes.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, julia.lawall@lip6.fr Subject: [PATCH 3/3] drivers: iommu: io-pgtable-arm: use const and __initconst for iommu_gather_ops structures Date: Tue, 25 Oct 2016 23:36:12 +0530 Message-Id: <1477418772-12184-4-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477418772-12184-1-git-send-email-bhumirks@gmail.com> References: <1477418772-12184-1-git-send-email-bhumirks@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161025_110802_786544_9D3F2824 X-CRM114-Status: GOOD ( 11.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bhumika Goyal MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Check for iommu_gather_ops structures that are only stored in the tlb field of an io_pgtable_cfg structure. The tlb field is of type const struct iommu_gather_ops *, so iommu_gather_ops structures having this property can be declared as const. Also, replace __initdata with __initconst. Signed-off-by: Bhumika Goyal Acked-by: Julia Lawall --- drivers/iommu/io-pgtable-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c index f5c90e1..412e21d 100644 --- a/drivers/iommu/io-pgtable-arm.c +++ b/drivers/iommu/io-pgtable-arm.c @@ -916,7 +916,7 @@ static void dummy_tlb_sync(void *cookie) WARN_ON(cookie != cfg_cookie); } -static struct iommu_gather_ops dummy_tlb_ops __initdata = { +static const struct iommu_gather_ops dummy_tlb_ops __initconst = { .tlb_flush_all = dummy_tlb_flush_all, .tlb_add_flush = dummy_tlb_add_flush, .tlb_sync = dummy_tlb_sync,