[Intel-xe] [PATCH 1/4] drm/xe: Covert xe_vma_op_flags to BIT macros

Rodrigo Vivi rodrigo.vivi at intel.com
Thu Aug 31 18:26:23 UTC 2023


On Thu, Aug 31, 2023 at 08:00:45AM -0700, Matthew Brost wrote:
> Rather than open code the shift for values, use BIT macros.
> 
> Signed-of-by: Matthew Brost <matthew.brost at intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_vm_types.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h
> index 3681a5ff588b..4bcb54ccd93a 100644
> --- a/drivers/gpu/drm/xe/xe_vm_types.h
> +++ b/drivers/gpu/drm/xe/xe_vm_types.h
> @@ -377,11 +377,11 @@ struct xe_vma_op_prefetch {
>  /** enum xe_vma_op_flags - flags for VMA operation */
>  enum xe_vma_op_flags {
>  	/** @XE_VMA_OP_FIRST: first VMA operation for a set of syncs */
> -	XE_VMA_OP_FIRST		= (0x1 << 0),
> +	XE_VMA_OP_FIRST		= BIT(0),
>  	/** @XE_VMA_OP_LAST: last VMA operation for a set of syncs */
> -	XE_VMA_OP_LAST		= (0x1 << 1),
> +	XE_VMA_OP_LAST		= BIT(1),
>  	/** @XE_VMA_OP_COMMITTED: VMA operation committed */
> -	XE_VMA_OP_COMMITTED	= (0x1 << 2),
> +	XE_VMA_OP_COMMITTED	= BIT(2),
>  };
>  
>  /** struct xe_vma_op - VMA operation */
> -- 
> 2.34.1
> 


More information about the Intel-xe mailing list