[Mesa-dev] [PATCH 2/3] i965/drm: Remove dead return in brw_bo_busy()

Pohjolainen, Topi topi.pohjolainen at gmail.com
Thu Apr 13 06:36:56 UTC 2017


On Wed, Apr 12, 2017 at 11:33:13PM -0700, Kenneth Graunke wrote:
> If ret is 0, we return.  If ret is not 0, we return.  This is dead.
> 
> CID: 1405013 (Structurally dead code (UNREACHABLE))

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

> ---
>  src/mesa/drivers/dri/i965/brw_bufmgr.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
> index fa7bf69a84e..2a7e3320797 100644
> --- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
> +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
> @@ -207,10 +207,8 @@ brw_bo_busy(struct brw_bo *bo)
>     if (ret == 0) {
>        bo->idle = !busy.busy;
>        return busy.busy;
> -   } else {
> -      return false;
>     }
> -   return (ret == 0 && busy.busy);
> +   return false;
>  }
>  
>  int
> -- 
> 2.12.2
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list