From patchwork Mon Jan 9 17:54:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9505665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 748B660757 for ; Mon, 9 Jan 2017 17:55:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3515284C0 for ; Mon, 9 Jan 2017 17:55:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9611D284C9; Mon, 9 Jan 2017 17:55:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 403B4284C0 for ; Mon, 9 Jan 2017 17:55:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1164026AbdAIRzm (ORCPT ); Mon, 9 Jan 2017 12:55:42 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35198 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164024AbdAIRzk (ORCPT ); Mon, 9 Jan 2017 12:55:40 -0500 Received: by mail-pf0-f193.google.com with SMTP id f144so6046573pfa.2; Mon, 09 Jan 2017 09:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=uZ9Fbii11BetM/e74MleVq5CRh1TzvpZJAOAxvv3mIc=; b=IUmVfHQ5Vih2WSSPUwzVjlPx9yh9Ai4RM7cHH0KNb2aydNC0FhfaffigTd0Qp8nRtl hS4WRKzmAy7VMVfuG3plHTZVk2PyONGAT7ACqcnEjC3rLxbPh9G+5XmFSAjFhoeJ2kQh Wdej5+qn/vwvVkUUnc+46BAfTSeVR8mojDrwF8ircshC0iaMyrf7WOJ2fn9jJtC8zQJB sUhfTxc6023BG/aAznav/dY3b7A2He7W7OZhNWIMw2xwZFDWBtCJ6G9eO2OyBca3V9QC MwWulaBeV7QT4u3Gd8FwISgl7TklFXqsro4gV0e5UDtZ3CJmxOmx1MAocxfGxd1cL/pm ly9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uZ9Fbii11BetM/e74MleVq5CRh1TzvpZJAOAxvv3mIc=; b=kbLRB/jHYyp+5No5nL+or2Gr/7edDZDvRJLiUqdio+Zf6Zet6MorffdzIXq00c93Hd eYaVdISMNqcj8sbS3voIBzsLzI9JAo5rZ+dQjTCrmcS18l7GUmsC3HmeNxqCDTGV5DBD CRF/agcV+SrJZlRUjH/6DsrIv0NniX74f4YiMxzzs+gK/d8lND6a+YHMCcQ+jqxiZ5DG qxSVH7mnl5RXzL/x5mV6ctl3ligOHEPd7O872f9w3/SP8ZsLsGNsLfYxEfpx7Rzvdomo jFiA7TEt2zrijhnavLNryqJpmiPNzDkzu+wt6XtwSL19pGG5knU9olEWprI/ovhTRPZL QkBA== X-Gm-Message-State: AIkVDXLqR1vxYNAtA4nSJuMjaH6/iybAo6VB8QNEWnuULEO6QGEN1f5RvPZpx71HVJchpA== X-Received: by 10.84.138.3 with SMTP id 3mr196289684plo.108.1483984540120; Mon, 09 Jan 2017 09:55:40 -0800 (PST) Received: from gmail.com ([2405:204:500d:3b80:155b:1522:7b86:586b]) by smtp.gmail.com with ESMTPSA id o24sm130694969pfj.78.2017.01.09.09.55.32 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 09 Jan 2017 09:55:38 -0800 (PST) Received: by gmail.com (sSMTP sendmail emulation); Mon, 09 Jan 2017 23:25:28 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, airlied@linux.ie, kgene@kernel.org, krzk@kernel.org, javier@osg.samsung.com, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] drm/exynos: constify exynos_drm_crtc_ops structures Date: Mon, 9 Jan 2017 23:24:53 +0530 Message-Id: <1483984493-25284-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Declare exynos_drm_crtc_ops structures as const as they are only passed as an argument to the function exynos_drm_crtc_create. This argument is of type const struct exynos_drm_crtc_ops *, so exynos_drm_crtc_ops structures having this property can be declared const. Done using Coccinelle: @r disable optional_qualifier@ identifier i; position p; @@ static struct exynos_drm_crtc_ops i@p={...}; @ok@ position p; identifier r.i; @@ exynos_drm_crtc_create(...,&i@p,...) @bad@ position p!={r.p,ok.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ +const struct exynos_drm_crtc_ops i; File size before: text data bss dec hex filename 5008 280 0 5288 14a8 exynos/exynos5433_drm_decon.o File size after: text data bss dec hex filename 5120 176 0 5296 14b0 exynos/exynos5433_drm_decon.o Signed-off-by: Bhumika Goyal --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 6ca1f31..12b9bf0 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -470,7 +470,7 @@ static void decon_clear_channels(struct exynos_drm_crtc *crtc) clk_disable_unprepare(ctx->clks[i]); } -static struct exynos_drm_crtc_ops decon_crtc_ops = { +static const struct exynos_drm_crtc_ops decon_crtc_ops = { .enable = decon_enable, .disable = decon_disable, .enable_vblank = decon_enable_vblank,