From patchwork Mon Aug 28 12:12:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9925361 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 430F160375 for ; Mon, 28 Aug 2017 12:13:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31473286C1 for ; Mon, 28 Aug 2017 12:13:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25EB7286CD; Mon, 28 Aug 2017 12:13:00 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50C0B286D9 for ; Mon, 28 Aug 2017 12:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751323AbdH1MMc (ORCPT ); Mon, 28 Aug 2017 08:12:32 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37699 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751146AbdH1MMa (ORCPT ); Mon, 28 Aug 2017 08:12:30 -0400 Received: by mail-pg0-f67.google.com with SMTP id t193so230023pgc.4; Mon, 28 Aug 2017 05:12:30 -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; bh=Kz9prHJLLR7Vh4fGCnPyc3Jh3SlH0zGIv8Yc9/ojFbA=; b=F5I5ZV+CL5BZ8bn3J9wUfNm0iRNhI0TB50WyXZi9loR+kXJfXwaEopzHmnKrRw2AYP leokPclz+al673Z3nu9WVSUGpyZBoTtuo51j0O15YxQDK3hsF8JNRLI/cw2z3hcVAS3+ sDr2ULe1/ed4StrqNUcQrmFbAIZKwt9xA3NKDBwm3bZ+5eETJ/2cei8iVxbrj2Ot5OtV hEksB8eYtNMhDmPTpFNIdLcmNhHhyqTky054nT7xo5ptlKTWCwoWZXGvAFZJjyjJrCUU clTbjNuwUnXg1RGvVgUJSWG+iaHJRasqKziHzgXRbB+mRs8nMLX8av6iX/qicHunEmp6 PJyA== 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; bh=Kz9prHJLLR7Vh4fGCnPyc3Jh3SlH0zGIv8Yc9/ojFbA=; b=I7no2wVNbR0cPvW4QDGi8O5+02ZiN68LgEjR9IoXGFTF2vPTThzaZ26Chhd/uTiQAP Xbq8zWX64I6f2W+GURsvh5w0uLnYDJvX5FbF08hzDCQ/CGPha0ORKEfBQr8Ye15tUcdE b9WnMeJy4nvRKlyFXW4YImy7Wycz/+3xWZ0hrHNXjTzEE9LheD0AJJ94tlwt2usddPXr VraPg06IFBZ2h4TNOkWsJj0GPsh4Zuom/kkXN1T2wFzKtHUvQfxtij4pDf0PcutDqAhv 7Y1I5mNzlRXnn0HRr/Pv6O99OWYcApTzY8McuIDARRBhYF+WTbEvIBRZgaF+xCV8Ua+A 4koQ== X-Gm-Message-State: AHYfb5g3Ho/tCuB9Ff4EfnR+ROAAZWhtPD578T1mbicJuHY5mntVbT8I FNfQNoaZpgJk/w== X-Received: by 10.99.7.87 with SMTP id 84mr278425pgh.431.1503922350241; Mon, 28 Aug 2017 05:12:30 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id e26sm519034pfd.180.2017.08.28.05.12.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Aug 2017 05:12:29 -0700 (PDT) From: Arvind Yadav To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org, krzk@kernel.org, matthias.bgg@gmail.com, gerald.schaefer@de.ibm.com Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/3] iommu: exynos: constify iommu_ops Date: Mon, 28 Aug 2017 17:42:05 +0530 Message-Id: <1503922325-25905-1-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP iommu_ops are not supposed to change at runtime. Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with const iommu_ops provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 2395478..a540016 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -569,7 +569,7 @@ static void sysmmu_tlb_invalidate_entry(struct sysmmu_drvdata *data, spin_unlock_irqrestore(&data->lock, flags); } -static struct iommu_ops exynos_iommu_ops; +static const struct iommu_ops exynos_iommu_ops; static int __init exynos_sysmmu_probe(struct platform_device *pdev) { @@ -1323,7 +1323,7 @@ static int exynos_iommu_of_xlate(struct device *dev, return 0; } -static struct iommu_ops exynos_iommu_ops = { +static const struct iommu_ops exynos_iommu_ops = { .domain_alloc = exynos_iommu_domain_alloc, .domain_free = exynos_iommu_domain_free, .attach_dev = exynos_iommu_attach_device,