All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	intel-xe@lists.freedesktop.org
Cc: Matt Roper <matthew.d.roper@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [Intel-xe] [PATCH 2/3] drm/xe: Constify xe_dss_mask_group_ffs()
Date: Mon, 06 Mar 2023 20:08:09 +0200	[thread overview]
Message-ID: <874jqxu512.fsf@intel.com> (raw)
In-Reply-To: <20230306175025.720323-3-lucas.demarchi@intel.com>

On Mon, 06 Mar 2023, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> Due to how xe_dss_mask_t is implemented, the type is a pointer.

Per coding style, the fact that something is a pointer should not be
hidden.

BR,
Jani.


> 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@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_ */

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-03-06 18:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 17:50 [Intel-xe] [PATCH 0/3] Const propagation and helper for WA Lucas De Marchi
2023-03-06 17:50 ` [Intel-xe] [PATCH 1/3] drm/xe: Allow const propagation in gt_to_xe() Lucas De Marchi
2023-03-06 17:50 ` [Intel-xe] [PATCH 2/3] drm/xe: Constify xe_dss_mask_group_ffs() Lucas De Marchi
2023-03-06 18:08   ` Jani Nikula [this message]
2023-03-06 18:17     ` Lucas De Marchi
2023-03-06 17:50 ` [Intel-xe] [PATCH 3/3] drm/xe: Add helper to get dss per group Lucas De Marchi
2023-03-06 17:52 ` [Intel-xe] ✓ CI.Patch_applied: success for Const propagation and helper for WA Patchwork
2023-03-06 17:53 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-03-06 17:57 ` [Intel-xe] ✓ CI.Build: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jqxu512.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.