[Intel-xe] [PATCH 03/19] drm/xe: Constify xe_dss_mask_group_ffs()

Matt Roper matthew.d.roper at intel.com
Wed Mar 8 21:46:41 UTC 2023


On Tue, Mar 07, 2023 at 01:24:30AM -0800, Lucas De Marchi wrote:
> Due to how xe_dss_mask_t is implemented, the type is a pointer. Since
> this is only used for looking up the bits, make it const so it can be
> used together with a const gt passed around.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Reviewed-by: Matt Roper <matthew.d.roper at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_gt_topology.c | 2 +-
>  drivers/gpu/drm/xe/xe_gt_topology.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt_topology.c b/drivers/gpu/drm/xe/xe_gt_topology.c
> index 2123f84be336..967f2349c67a 100644
> --- a/drivers/gpu/drm/xe/xe_gt_topology.c
> +++ b/drivers/gpu/drm/xe/xe_gt_topology.c
> @@ -109,7 +109,7 @@ xe_gt_topology_dump(struct xe_gt *gt, struct drm_printer *p)
>   * groupsize and groupnum are non-zero.
>   */
>  unsigned int
> -xe_dss_mask_group_ffs(xe_dss_mask_t mask, int groupsize, int groupnum)
> +xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum)
>  {
>  	return find_next_bit(mask, XE_MAX_DSS_FUSE_BITS, groupnum * groupsize);
>  }
> diff --git a/drivers/gpu/drm/xe/xe_gt_topology.h b/drivers/gpu/drm/xe/xe_gt_topology.h
> index b2540dc266f2..2375f005e0c8 100644
> --- a/drivers/gpu/drm/xe/xe_gt_topology.h
> +++ b/drivers/gpu/drm/xe/xe_gt_topology.h
> @@ -15,6 +15,6 @@ void xe_gt_topology_init(struct xe_gt *gt);
>  void xe_gt_topology_dump(struct xe_gt *gt, struct drm_printer *p);
>  
>  unsigned int
> -xe_dss_mask_group_ffs(xe_dss_mask_t mask, int groupsize, int groupnum);
> +xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum);
>  
>  #endif /* _XE_GT_TOPOLOGY_H_ */
> -- 
> 2.39.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-xe mailing list