Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752082AbdHHMaj (ORCPT ); Tue, 8 Aug 2017 08:30:39 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:59738 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003AbdHHMah (ORCPT ); Tue, 8 Aug 2017 08:30:37 -0400 Subject: Re: [PATCH] drm/omap: dma-buf: Constify dma_buf_ops structures. To: Arvind Yadav CC: , , References: <1fcfd1f541f71bf229919e94197716e55e8fd2ad.1498976230.git.arvind.yadav.cs@gmail.com> From: Tomi Valkeinen Message-ID: <9e676305-76f2-b4da-5c45-c55e6c35d19f@ti.com> Date: Tue, 8 Aug 2017 15:30:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1fcfd1f541f71bf229919e94197716e55e8fd2ad.1498976230.git.arvind.yadav.cs@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5Hfip7tbTQ8lw3XRmDqP0mDNVjGJallAu" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3329 Lines: 86 --5Hfip7tbTQ8lw3XRmDqP0mDNVjGJallAu Content-Type: multipart/mixed; boundary="s1NuxifnEHlorThbDbT0gbfFIBNHmEBsN"; protected-headers="v1" From: Tomi Valkeinen To: Arvind Yadav Cc: airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Message-ID: <9e676305-76f2-b4da-5c45-c55e6c35d19f@ti.com> Subject: Re: [PATCH] drm/omap: dma-buf: Constify dma_buf_ops structures. References: <1fcfd1f541f71bf229919e94197716e55e8fd2ad.1498976230.git.arvind.yadav.cs@gmail.com> In-Reply-To: <1fcfd1f541f71bf229919e94197716e55e8fd2ad.1498976230.git.arvind.yadav.cs@gmail.com> --s1NuxifnEHlorThbDbT0gbfFIBNHmEBsN Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 02/07/17 09:19, Arvind Yadav wrote: > dma_buf_ops are not supposed to change at runtime. All functions > working with dma_buf_ops provided by work with > const dma_buf_ops. So mark the non-const structs as const. >=20 > File size before: > text data bss dec hex filename > 1240 112 0 1352 548 drivers/gpu/drm/omapdrm/omap_ge= m_dmabuf.o >=20 > File size After adding 'const': > text data bss dec hex filename > 1352 0 0 1352 548 drivers/gpu/drm/omapdrm/omap_ge= m_dmabuf.o >=20 > Signed-off-by: Arvind Yadav > --- > drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c b/drivers/gpu/dr= m/omapdrm/omap_gem_dmabuf.c > index 0dbe030..a03bc36 100644 > --- a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c > +++ b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c > @@ -154,7 +154,7 @@ static int omap_gem_dmabuf_mmap(struct dma_buf *buf= fer, > return omap_gem_mmap_obj(obj, vma); > } > =20 > -static struct dma_buf_ops omap_dmabuf_ops =3D { > +static const struct dma_buf_ops omap_dmabuf_ops =3D { > .map_dma_buf =3D omap_gem_map_dma_buf, > .unmap_dma_buf =3D omap_gem_unmap_dma_buf, > .release =3D omap_gem_dmabuf_release, >=20 Thanks! I've picked this and the 3 other constifying patches to omapdrm tree. Tomi --s1NuxifnEHlorThbDbT0gbfFIBNHmEBsN-- --5Hfip7tbTQ8lw3XRmDqP0mDNVjGJallAu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZia7oAAoJEPo9qoy8lh71dcUP/ArA0b3tPY5/LpxWj5Sj1yon c3qXHqMqk9903w7MrtVVhO46K2poQdCGKP224vkykqgpDz7rPN/eLh19BUkDgK6P PE792L4u1AnZos6fqnr63Gnf8MJagvDpPc+JSxRkxQws1haYBeI0FE7uEH6GrEWS 4QrMKvohlvJlbpEUmJioFxbppMvwXbDfsGoKYaJjXi+3C2/5q+5HrjxvkjG+qPmW mclDbph+BRI/4Q+oFX97LTzIw1lrG5K/8XRunO9qsGOk0uf3AoGypr2DSVtm9wvy B7kSjAtHKeoyf34Yp+jV70Qli9Pid50uXx8Nx3ZFEjoyAgz1QSWpKLqa6BvCeczP 9guVZnGZD8Jz3q/zn2uxKEIuRioNlYMrRmPQ7AMdyqrQpYy3MRMp7iFVlQo+mY0G h3FHZMlV7UcHWWUUKatkbwEvSdW1uuG2Fot77jwxb+xqEx/ElNQo7MS9NH9Hgj9K igw2fo8JeCkhokPRmCVV3tHEdAT2sWZjBPY/91thFOwZooxijKkATsTGCw/9vTUq u3W81blDhl4MIH5lg9J8Atj0c9U2ZaNZk+yhROCiMYmyEDZEwhTqoUYL2Quj75l1 oGUosTezbzj3VE4saPm3IS2//hsP4eHw78INaEXnRQJYkAZQCN1gxeBfcjfUXkTu zch/p6tIFJhMJcKYscsq =iZQq -----END PGP SIGNATURE----- --5Hfip7tbTQ8lw3XRmDqP0mDNVjGJallAu--