diff mbox

drm/qxl: Remove useless drm_fb_get_bpp_depth() call

Message ID 1465236891-11773-1-git-send-email-laurent.pinchart@ideasonboard.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laurent Pinchart June 6, 2016, 6:14 p.m. UTC
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>
---
 drivers/gpu/drm/qxl/qxl_fb.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Eric Engestrom June 7, 2016, 4:50 p.m. UTC | #1
On Mon, Jun 06, 2016 at 09:14:51PM +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>

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

> ---
>  drivers/gpu/drm/qxl/qxl_fb.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c
> index 5ea57f6320b8..df2657051afd 100644
> --- a/drivers/gpu/drm/qxl/qxl_fb.c
> +++ b/drivers/gpu/drm/qxl/qxl_fb.c
> @@ -131,10 +131,6 @@ static int qxlfb_create_pinned_object(struct qxl_fbdev *qfbdev,
>  	int ret;
>  	int aligned_size, size;
>  	int height = mode_cmd->height;
> -	int bpp;
> -	int depth;
> -
> -	drm_fb_get_bpp_depth(mode_cmd->pixel_format, &bpp, &depth);
>  
>  	size = mode_cmd->pitches[0] * height;
>  	aligned_size = ALIGN(size, PAGE_SIZE);
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter June 8, 2016, 7:37 a.m. UTC | #2
On Tue, Jun 07, 2016 at 05:50:02PM +0100, Eric Engestrom wrote:
> On Mon, Jun 06, 2016 at 09:14:51PM +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>
> 
> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>

Both of Laurent's patches applied, thanks.
-Daniel
> 
> > ---
> >  drivers/gpu/drm/qxl/qxl_fb.c | 4 ----
> >  1 file changed, 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c
> > index 5ea57f6320b8..df2657051afd 100644
> > --- a/drivers/gpu/drm/qxl/qxl_fb.c
> > +++ b/drivers/gpu/drm/qxl/qxl_fb.c
> > @@ -131,10 +131,6 @@ static int qxlfb_create_pinned_object(struct qxl_fbdev *qfbdev,
> >  	int ret;
> >  	int aligned_size, size;
> >  	int height = mode_cmd->height;
> > -	int bpp;
> > -	int depth;
> > -
> > -	drm_fb_get_bpp_depth(mode_cmd->pixel_format, &bpp, &depth);
> >  
> >  	size = mode_cmd->pitches[0] * height;
> >  	aligned_size = ALIGN(size, PAGE_SIZE);
> > -- 
> > 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
diff mbox

Patch

diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c
index 5ea57f6320b8..df2657051afd 100644
--- a/drivers/gpu/drm/qxl/qxl_fb.c
+++ b/drivers/gpu/drm/qxl/qxl_fb.c
@@ -131,10 +131,6 @@  static int qxlfb_create_pinned_object(struct qxl_fbdev *qfbdev,
 	int ret;
 	int aligned_size, size;
 	int height = mode_cmd->height;
-	int bpp;
-	int depth;
-
-	drm_fb_get_bpp_depth(mode_cmd->pixel_format, &bpp, &depth);
 
 	size = mode_cmd->pitches[0] * height;
 	aligned_size = ALIGN(size, PAGE_SIZE);