From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356AbdH1PzE (ORCPT ); Mon, 28 Aug 2017 11:55:04 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52460 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751184AbdH1PzD (ORCPT ); Mon, 28 Aug 2017 11:55:03 -0400 Date: Mon, 28 Aug 2017 17:54:54 +0200 From: Gerald Schaefer To: Arvind Yadav Cc: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org, krzk@kernel.org, matthias.bgg@gmail.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org Subject: Re: [PATCH 3/3] iommu: s390: constify iommu_ops In-Reply-To: <1503922370-25990-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1503922370-25990-1-git-send-email-arvind.yadav.cs@gmail.com> Organization: IBM Deutschland Research & Development GmbH / Vorsitzende des Aufsichtsrats: Martina Koederitz / Geschaeftsfuehrung: Dirk Wittkopp / Sitz der Gesellschaft: Boeblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294 X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.23; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17082815-0020-0000-0000-000003B1D45B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17082815-0021-0000-0000-000042421836 Message-Id: <20170828175454.1401491a@thinkpad> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-08-28_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1708280255 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Aug 2017 17:42:50 +0530 Arvind Yadav wrote: > iommu_ops are not supposed to change at runtime. > Functions 'bus_set_iommu' working with const iommu_ops provided > by . So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav > --- > drivers/iommu/s390-iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Gerald Schaefer > > diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c > index 8788640..400d75f 100644 > --- a/drivers/iommu/s390-iommu.c > +++ b/drivers/iommu/s390-iommu.c > @@ -327,7 +327,7 @@ static size_t s390_iommu_unmap(struct iommu_domain *domain, > return size; > } > > -static struct iommu_ops s390_iommu_ops = { > +static const struct iommu_ops s390_iommu_ops = { > .capable = s390_iommu_capable, > .domain_alloc = s390_domain_alloc, > .domain_free = s390_domain_free, From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerald Schaefer Subject: Re: [PATCH 3/3] iommu: s390: constify iommu_ops Date: Mon, 28 Aug 2017 17:54:54 +0200 Message-ID: <20170828175454.1401491a@thinkpad> References: <1503922370-25990-1-git-send-email-arvind.yadav.cs@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1503922370-25990-1-git-send-email-arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Arvind Yadav Cc: linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, kgene-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Mon, 28 Aug 2017 17:42:50 +0530 Arvind Yadav wrote: > iommu_ops are not supposed to change at runtime. > Functions 'bus_set_iommu' working with const iommu_ops provided > by . So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav > --- > drivers/iommu/s390-iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Gerald Schaefer > > diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c > index 8788640..400d75f 100644 > --- a/drivers/iommu/s390-iommu.c > +++ b/drivers/iommu/s390-iommu.c > @@ -327,7 +327,7 @@ static size_t s390_iommu_unmap(struct iommu_domain *domain, > return size; > } > > -static struct iommu_ops s390_iommu_ops = { > +static const struct iommu_ops s390_iommu_ops = { > .capable = s390_iommu_capable, > .domain_alloc = s390_domain_alloc, > .domain_free = s390_domain_free, From mboxrd@z Thu Jan 1 00:00:00 1970 From: gerald.schaefer@de.ibm.com (Gerald Schaefer) Date: Mon, 28 Aug 2017 17:54:54 +0200 Subject: [PATCH 3/3] iommu: s390: constify iommu_ops In-Reply-To: <1503922370-25990-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1503922370-25990-1-git-send-email-arvind.yadav.cs@gmail.com> Message-ID: <20170828175454.1401491a@thinkpad> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, 28 Aug 2017 17:42:50 +0530 Arvind Yadav wrote: > iommu_ops are not supposed to change at runtime. > Functions 'bus_set_iommu' working with const iommu_ops provided > by . So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav > --- > drivers/iommu/s390-iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Gerald Schaefer > > diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c > index 8788640..400d75f 100644 > --- a/drivers/iommu/s390-iommu.c > +++ b/drivers/iommu/s390-iommu.c > @@ -327,7 +327,7 @@ static size_t s390_iommu_unmap(struct iommu_domain *domain, > return size; > } > > -static struct iommu_ops s390_iommu_ops = { > +static const struct iommu_ops s390_iommu_ops = { > .capable = s390_iommu_capable, > .domain_alloc = s390_domain_alloc, > .domain_free = s390_domain_free,