From patchwork Tue Feb 20 11:55:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10229871 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 05429602B1 for ; Tue, 20 Feb 2018 12:00:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAAB228541 for ; Tue, 20 Feb 2018 12:00:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF43528649; Tue, 20 Feb 2018 12:00:13 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AC65F28541 for ; Tue, 20 Feb 2018 12:00:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB86389857; Tue, 20 Feb 2018 12:00:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by gabe.freedesktop.org (Postfix) with ESMTPS id B92F66E3F8 for ; Tue, 20 Feb 2018 12:00:10 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MgNde-1f9daM415y-00NkTT; Tue, 20 Feb 2018 13:00:05 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Subject: [4.4-stable 21/22] drm/gma500: remove helper function Date: Tue, 20 Feb 2018 12:55:08 +0100 Message-Id: <20180220115527.1806578-22-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:q/p4+NBZRq4lpLvRnDACsxnQoUi1HDUYwMf3+uPNidiWY/9maG4 uih5VdyfaJ18xkiu93PBoJKcEnwVISlciF2xVkCNZYgdEYM7Hxz/uELE263n0euUVtwY/Wg gnE00x6TTV4iKwKAfuWWBjIRfSm2FPFGkKCEV+Ep5n/t0p4xHLHdmvxUWMIbAgZTVIzBwoL jjmiKCB6HTHuRaFcZihlw== X-UI-Out-Filterresults: notjunk:1; V01:K0:/0l0t03mXDo=:LVZOwjOXLKCRGb9Xf/WROU rIFkelDNZ5W1iGXH/tclW9wPaAqKftTEvUHO/UKZNbXBRGhgE4ZfN2+KGr3FSkARFwZsUYVE0 hKYnMR2pm/Csp3XKvsd74ZOEKEl4s3FAaIxGZ/ze7PuKEM1QOxHLkz/lfDJUbJl2K8r73m167 bnQBHcAMF0C+kSbeD1jj+q4w5EOZiSZvYDviFHobTUhmBizWRq8XDzW3IgDwLyIHmyDfblnjR TLOaNL/kxQNrdk7ily65hsG32dK/JI7V/XCO3WeRUj+yTkfPKzOfWK97YJNWgHzi9dnh79u8Z cTe2fcbJIOx4K6YyqeXRak7OEC4zLHrf5X6twSSd51o6ju/qBg84s6cdL4PeFaJm8IT4Zt1sq swB+7xsArldShz3KslCMiHDDBp1mMr6mLY0h5ZTjUEV8PT9YZn29b04nLfo5f3vGA7FxyWBZ+ oNH+hwsn98HpnUNtBuM5nexDAaqbdfoWImazZikEo7IX1hRlWbTzxSAllmVOMhKVdG1fw1if/ JQKbvPeO2iC5BitLx7DQnoKlCxgIi459XoX5HzGS96XnL2Ye11iBzCq9p0wpG96opWMF0Ty1x P2H+f3WuR3EknSsE5P1ph1vfv50pMjfOW1laTVO00qGrygBUEmGtaCKQYEMEUUFwm6l1tyS0F jPykB4Hh+2mkr8D1pKjPhYzVgH0f7AyvdicuOYeyBxnhetPYDGKG94Alwktnsl0apmDW/2gh+ khl+9mDglF68tpl/HdIRKVLiVOcepesrQlNQFA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sudip Mukherjee , Arnd Bergmann , David Airlie , Greg KH , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Sudip Mukherjee MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sudip Mukherjee commit db9b60400f9253c25ae639797df2d0ff7a35d9d8 upstream. We were getting build warning about: drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization from incompatible pointer type The callback to dpms was pointing to a helper function which had a return type of void, whereas the callback should point to a function which has a return type of int. On closer look it turned out that we do not need the helper function since if we call drm_helper_connector_dpms() directly, the first check that drm_helper_connector_dpms() does is: if (mode == connector->dpms) Signed-off-by: Sudip Mukherjee Link: http://patchwork.freedesktop.org/patch/msgid/1454393155-13142-1-git-send-email-sudipm.mukherjee@gmail.com Acked-by: Patrik Jakobsson Signed-off-by: Daniel Vetter [arnd: rebased to 4.4] Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c index 89f705c3a5eb..910a2f253990 100644 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c @@ -382,16 +382,6 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector, return MODE_OK; } -static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode) -{ - if (mode == connector->dpms) - return; - - /*first, execute dpms*/ - - drm_helper_connector_dpms(connector, mode); -} - static struct drm_encoder *mdfld_dsi_connector_best_encoder( struct drm_connector *connector) { @@ -404,7 +394,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder( /*DSI connector funcs*/ static const struct drm_connector_funcs mdfld_dsi_connector_funcs = { - .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms, + .dpms = drm_helper_connector_dpms, .save = mdfld_dsi_connector_save, .restore = mdfld_dsi_connector_restore, .detect = mdfld_dsi_connector_detect,