Re: [PATCH] drm/ast: Remove useless drm_fb_get_bpp_depth() call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>

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@xxxxxxxxxx>

> ---
>  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@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux