dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Engestrom <eric.engestrom@imgtec.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Dave Airlie <airlied@redhat.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/ast: Remove useless drm_fb_get_bpp_depth() call
Date: Tue, 7 Jun 2016 17:49:20 +0100	[thread overview]
Message-ID: <20160607164920.GA9217@imgtec.com> (raw)
In-Reply-To: <1465236852-11710-1-git-send-email-laurent.pinchart@ideasonboard.com>

On Mon, Jun 06, 2016 at 09:14:12PM +0300, Laurent Pinchart wrote:
> The function has no side effect and its returned values are ignored,
> don't call it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Good catch!  Do you have a tool that detects this, or do you just have
a really good eye?

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>

> ---
>  drivers/gpu/drm/ast/ast_fb.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
> index 5320f8c57884..c017a9330a18 100644
> --- a/drivers/gpu/drm/ast/ast_fb.c
> +++ b/drivers/gpu/drm/ast/ast_fb.c
> @@ -167,12 +167,9 @@ static int astfb_create_object(struct ast_fbdev *afbdev,
>  			       struct drm_gem_object **gobj_p)
>  {
>  	struct drm_device *dev = afbdev->helper.dev;
> -	u32 bpp, depth;
>  	u32 size;
>  	struct drm_gem_object *gobj;
> -
>  	int ret = 0;
> -	drm_fb_get_bpp_depth(mode_cmd->pixel_format, &depth, &bpp);
>  
>  	size = mode_cmd->pitches[0] * mode_cmd->height;
>  	ret = ast_gem_create(dev, size, true, &gobj);
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-06-07 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 18:14 [PATCH] drm/ast: Remove useless drm_fb_get_bpp_depth() call Laurent Pinchart
2016-06-07 16:49 ` Eric Engestrom [this message]
2016-06-07 20:17   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160607164920.GA9217@imgtec.com \
    --to=eric.engestrom@imgtec.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox