Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328833

Re: [PATCH] drm/gma500: remove helper function

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Daniel Vetter <daniel@ffwll.ch>
Newsgroups linux.kernel
Subject Re: [PATCH] drm/gma500: remove helper function
Date Mon, 08 Feb 2016 10:10:02 +0100
Message-ID <qZPZw-3ac-9@gated-at.bofh.it> (permalink)
References <qXCk1-6AZ-3@gated-at.bofh.it> <qZewX-1VZ-15@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=Jm/SMSH2W/dJH10/rvP4co3TKVonwJ7bg3NlAq2zago=; b=gaXOX9syK5KbQjMB40QjpOk6m4zeG+8mvpaDx9qyUCJ6kc6bUL1KjqItaGIuM/m1mm 8CAusjaXNdnQT6kkrESsgMtLnsZFkein/aBKfKM7qbJQq/0Pqzt3jXW9Np78d9Y/kcZQ 3IQjTnStqooYiWZqqpS0ffCqZsBQHHgb9amkA=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=Jm/SMSH2W/dJH10/rvP4co3TKVonwJ7bg3NlAq2zago=; b=RW1LGn5bwEGKjxcp7IUBLcDCdywH9duCpnKDrCwWmxaXEo1A65Pavd6gwBY7+m3HOK IqU6MMG144NhvE5smbzAbvPD8aRPBtaNjZNB59g0O0/sYOa+FeQP9rOGMjea5fudFuz+ 6cU/SOOCE6yE4tQRTYbokpOZPCvI+j9bWEHwPFhEc2RVxsvPABQk9Js+h5U5Je+m8Sw9 AM2qLwip6/5neb+g5mjAasBpL6FKgG9RG9ZS0VQ8rMWUoMBG8QtICpTAgPt9MUNI7B13 d8WLqLJs6nZF64nWzFNMI3wKGuL7QK6m+luHcU70qFn8M8SeYS8ZAhWtB2WpCBPoYqZ6 2lIw==
X-Gm-Message-State AG10YOQ3Ir4q9GgYmlfaFBto0sx6sEnLHHs+s3mGDdJuLQbz8NrTJRKtheCKykZtcBq9Cg==
X-Received by 10.194.171.66 with SMTP id as2mr26214851wjc.73.1454922204795; Mon, 08 Feb 2016 01:03:24 -0800 (PST)
Mail-Followup-To Patrik Jakobsson <patrik.r.jakobsson@gmail.com>, Sudip Mukherjee <sudipm.mukherjee@gmail.com>, David Airlie <airlied@linux.ie>, linux-kernel <linux-kernel@vger.kernel.org>, dri-devel <dri-devel@lists.freedesktop.org>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
X-Operating-System Linux phenom 4.3.0-1-amd64
User-Agent Mutt/1.5.24 (2015-08-30)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 66
Organization linux.* mail to news gateway
X-Original-Cc Sudip Mukherjee <sudipm.mukherjee@gmail.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel.vetter@ffwll.ch>, linux-kernel <linux-kernel@vger.kernel.org>, dri-devel <dri-devel@lists.freedesktop.org>
X-Original-Date Mon, 8 Feb 2016 10:03:48 +0100
X-Original-Message-ID <20160208090348.GV11240@phenom.ffwll.local>
X-Original-References <1454393155-13142-1-git-send-email-sudipm.mukherjee@gmail.com> <CAMeQTsbuKaZgTtq-=r658MtnCbO7BV4eP95+tjbGXbUXA3arag@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1328833

Show key headers only | View raw


On Sat, Feb 06, 2016 at 06:09:13PM +0100, Patrik Jakobsson wrote:
> On Tue, Feb 2, 2016 at 7:05 AM, Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> 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 <sudip@vectorindia.org>
> 
> Looks good, thanks.
> 
> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] drm/gma500: remove helper function Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-02-02 07:10 +0100
  Re: [PATCH] drm/gma500: remove helper function Patrik Jakobsson <patrik.r.jakobsson@gmail.com> - 2016-02-06 18:10 +0100
    Re: [PATCH] drm/gma500: remove helper function Daniel Vetter <daniel@ffwll.ch> - 2016-02-08 10:10 +0100

csiph-web