Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752471AbdGCIIU (ORCPT ); Mon, 3 Jul 2017 04:08:20 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:32893 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750861AbdGCIIR (ORCPT ); Mon, 3 Jul 2017 04:08:17 -0400 Date: Mon, 3 Jul 2017 10:08:13 +0200 From: Daniel Vetter To: Arvind Yadav Cc: airlied@redhat.com, airlied@linux.ie, daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/udl: dma-buf: Constify dma_buf_ops structures. Message-ID: <20170703080813.kzpxhcxtqe45a3ri@phenom.ffwll.local> Mail-Followup-To: Arvind Yadav , airlied@redhat.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.9.0-2-amd64 User-Agent: NeoMutt/20170306 (1.8.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1460 Lines: 45 On Sat, Jul 01, 2017 at 06:06:46PM +0530, 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. > > File size before: > text data bss dec hex filename > 2002 112 0 2114 842 drivers/gpu/drm/udl/udl_dmabuf.o > > File size After adding 'const': > text data bss dec hex filename > 2114 0 0 2114 842 drivers/gpu/drm/udl/udl_dmabuf.o > > Signed-off-by: Arvind Yadav I merged the two armada and the one udl fix to drm-misc-next for 4.14. I'll leave the radeon one to Alex. Thanks, Daniel > --- > drivers/gpu/drm/udl/udl_dmabuf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/udl/udl_dmabuf.c b/drivers/gpu/drm/udl/udl_dmabuf.c > index ed0e636..61a5a5f 100644 > --- a/drivers/gpu/drm/udl/udl_dmabuf.c > +++ b/drivers/gpu/drm/udl/udl_dmabuf.c > @@ -186,7 +186,7 @@ static int udl_dmabuf_mmap(struct dma_buf *dma_buf, > return -EINVAL; > } > > -static struct dma_buf_ops udl_dmabuf_ops = { > +static const struct dma_buf_ops udl_dmabuf_ops = { > .attach = udl_attach_dma_buf, > .detach = udl_detach_dma_buf, > .map_dma_buf = udl_map_dma_buf, > -- > 2.7.4 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch