From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751065AbcBHJDa (ORCPT ); Mon, 8 Feb 2016 04:03:30 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:32982 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbcBHJDZ (ORCPT ); Mon, 8 Feb 2016 04:03:25 -0500 Date: Mon, 8 Feb 2016 10:03:48 +0100 From: Daniel Vetter To: Patrik Jakobsson Cc: Sudip Mukherjee , David Airlie , Daniel Vetter , linux-kernel , dri-devel Subject: Re: [PATCH] drm/gma500: remove helper function Message-ID: <20160208090348.GV11240@phenom.ffwll.local> Mail-Followup-To: Patrik Jakobsson , Sudip Mukherjee , David Airlie , linux-kernel , dri-devel References: <1454393155-13142-1-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.3.0-1-amd64 User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 06, 2016 at 06:09:13PM +0100, Patrik Jakobsson wrote: > On Tue, Feb 2, 2016 at 7:05 AM, Sudip Mukherjee > wrote: > > 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 > > Looks good, thanks. > > Signed-off-by: Patrik Jakobsson Applied to drm-misc, thanks. -Daniel > > > --- > > 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 d758f4c..907cb51 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, > > .detect = mdfld_dsi_connector_detect, > > .fill_modes = drm_helper_probe_single_connector_modes, > > .set_property = mdfld_dsi_connector_set_property, > > -- > > 1.9.1 > > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch