From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01B68C433F5 for ; Fri, 10 Dec 2021 09:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wQsyiIUErOcXXmqpRw1pyq+nphjkh4wzYjYSypgoDXU=; b=r/YlkPi/azN5Aw vgVChnS5pk2WmOd3YVncYonJeptEW9t47sAz220vXXE3OWxGMAYa6qKnolYrX9zuxXDf4YQFc0Z8O XxxjtzVbeFK3S4uYjiDMAoaeCvIJKuy9CasnYOgb8gl6AN3+mxP0+rgFTcTHI6SNdazVpXVeTvVVu pKMsdeq5zzPbkUb80LAbaSJAJkzuOP8H1+mLazAAR7Z258Pbs0IEFNty3qlg0dEH66VzPzfxd6MM3 j3bN7muKHZuPDvIrtXbXCy7XKm4mavWJ6mCRGIZd8drJj3Z6CDhwJ5QOhYQm3V75AyMv4l/yRZJyI mSXug1YJD0gTSHzrmiQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvcci-001Qcg-1z; Fri, 10 Dec 2021 09:55:28 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvcce-001QaO-73 for linux-arm-kernel@lists.infradead.org; Fri, 10 Dec 2021 09:55:25 +0000 Received: by mail-wr1-x42f.google.com with SMTP id v11so13938088wrw.10 for ; Fri, 10 Dec 2021 01:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=W8FUODtsxIgRcCAdpogX9Uv8kSzYBLqxbGwgE8yOqHc=; b=vsDgL5lWIC1QJt5et+dAzzDtq2+Zo5yEeM+zRcvXvRo3M7HX0JPy5k3sDjLCH92VrB p/fZTUILZRFLXswagFeY4vjXWhahK9x02mvXkSOMdTqJPBK9DoDSqcfnPaFvy3c0J2NK +RXwTJX3YP4FoJye68ShO1/1ok3enMkj5ECAZpr6u8rvv0Gav+Yh5KuktY6M573YSwkE 8zzUmtvssm64cieIW8UQnrCc8U0hTXI81IvrqEg3DOrRQvSBx0kS8iIeJZ2RBSzQuaMP W8uG0dgs0tsMYeLsA5+EENTv2nUEw9JCPjnt2dO5FURbpHcTfH2vVUK34XgpayGnvpWQ ixHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=W8FUODtsxIgRcCAdpogX9Uv8kSzYBLqxbGwgE8yOqHc=; b=PywhQYolfSwob8gE/S+Gy0P/tx6qnB0jqrZUM85YqtoHlne8TsYIsNz2ic6lmvcD/u PB8oZrbdPGddAdLkpAv8iGU/g8uro5GyTL/IH6fH/LMBWgK2cAeyqyLCbIgfCqtlPlJB we5GVGm3P9iANZ6l+x0E/bjU8t6Dvc+OSrzxX9evEcV0fFL21cTBMq+vmV035cq5W8UP aLCYunKUhsT2PKTnbimUXz/ns5JZxz/jTm4beNR6cGfq7gRzwv7GA0g20WtB84xdtH4+ qvMWAKToGYSF/+dRPPGx/nQM/kIZo6Rg2AiuAGjbEBVeT88fffrNQYt/KWkV4hPHgwKP WuTQ== X-Gm-Message-State: AOAM533cNMJaqN0jVvudv9xPGb07TWZ9zlamo4CbxCdbqsIk45XJy/Id oFR9R4kIoQ+vhQe+C/krxNAhgQ== X-Google-Smtp-Source: ABdhPJzWhxWBlJvAwdV5dPSr/L6/G4eeC8jA44FTGzewKfVfxc1toGCSu36ebCmedWG97D7MdQX/sA== X-Received: by 2002:a5d:64eb:: with SMTP id g11mr12991313wri.438.1639130121899; Fri, 10 Dec 2021 01:55:21 -0800 (PST) Received: from myrica (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id v2sm2248183wmc.36.2021.12.10.01.55.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 01:55:21 -0800 (PST) Date: Fri, 10 Dec 2021 09:54:59 +0000 From: Jean-Philippe Brucker To: Rikard Falkeborn Cc: Will Deacon , Robin Murphy , Joerg Roedel , Jonathan Cameron , Eric Auger , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/arm-smmu-v3: Constify arm_smmu_mmu_notifier_ops Message-ID: References: <20211204223301.100649-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211204223301.100649-1-rikard.falkeborn@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211210_015524_280403_5C3899AF X-CRM114-Status: GOOD ( 18.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Dec 04, 2021 at 11:33:01PM +0100, Rikard Falkeborn wrote: > The only usage of arm_smmu_mmu_notifier_ops is to assign its address to > the ops field in the mmu_notifier struct, which is a pointer to const > struct mmu_notifier_ops. Make it const to allow the compiler to put it > in read-only memory. > > Signed-off-by: Rikard Falkeborn Reviewed-by: Jean-Philippe Brucker > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c > index ee66d1f4cb81..a737ba5f727e 100644 > --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c > +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c > @@ -220,7 +220,7 @@ static void arm_smmu_mmu_notifier_free(struct mmu_notifier *mn) > kfree(mn_to_smmu(mn)); > } > > -static struct mmu_notifier_ops arm_smmu_mmu_notifier_ops = { > +static const struct mmu_notifier_ops arm_smmu_mmu_notifier_ops = { > .invalidate_range = arm_smmu_mm_invalidate_range, > .release = arm_smmu_mm_release, > .free_notifier = arm_smmu_mmu_notifier_free, > -- > 2.34.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel