Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753168AbdGCPcS (ORCPT ); Mon, 3 Jul 2017 11:32:18 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36315 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752233AbdGCPcR (ORCPT ); Mon, 3 Jul 2017 11:32:17 -0400 From: Arvind Yadav To: daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: constify drm_framebuffer_funcs. Date: Mon, 3 Jul 2017 21:02:02 +0530 Message-Id: <7635eaffa6d504d984b91cb707a22492861fd68e.1499095784.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 31 drm_framebuffer_funcs are not supposed to change at runtime. So mark the non-const structs as const. File size before: text data bss dec hex filename 3978 216 0 4194 1062 drivers/gpu/drm/drm_fb_cma_helper.o File size After adding 'const': text data bss dec hex filename 4002 184 0 4186 105a drivers/gpu/drm/drm_fb_cma_helper.o Signed-off-by: Arvind Yadav --- drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c index 50abd1f..134659e 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -120,7 +120,7 @@ int drm_fb_cma_create_handle(struct drm_framebuffer *fb, } EXPORT_SYMBOL(drm_fb_cma_create_handle); -static struct drm_framebuffer_funcs drm_fb_cma_funcs = { +static const struct drm_framebuffer_funcs drm_fb_cma_funcs = { .destroy = drm_fb_cma_destroy, .create_handle = drm_fb_cma_create_handle, }; -- 2.7.4