[PATCH] drm/xe/xe_gt_idle: Drop redundant newline in name

Riana Tauro riana.tauro at intel.com
Mon Feb 5 05:07:21 UTC 2024



On 2/3/2024 4:26 AM, Ashutosh Dixit wrote:
> Newline in name is redunant and produces an unnecessary empty line during
                     ^typo
> 'cat name'. Newline is added during sysfs_emit. See '27a1a1e2e47d ("drm/xe:
> stringify the argument to avoid potential vulnerability")'.
Should this be fixes?
> 
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
With the above comments
Reviewed-by: Riana Tauro <riana.tauro at intel.com>
> ---
>   drivers/gpu/drm/xe/xe_gt_idle.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c
> index 9358f73368896..9fcae65b64699 100644
> --- a/drivers/gpu/drm/xe/xe_gt_idle.c
> +++ b/drivers/gpu/drm/xe/xe_gt_idle.c
> @@ -145,10 +145,10 @@ void xe_gt_idle_sysfs_init(struct xe_gt_idle *gtidle)
>   	}
>   
>   	if (xe_gt_is_media_type(gt)) {
> -		sprintf(gtidle->name, "gt%d-mc\n", gt->info.id);
> +		sprintf(gtidle->name, "gt%d-mc", gt->info.id);
>   		gtidle->idle_residency = xe_guc_pc_mc6_residency;
>   	} else {
> -		sprintf(gtidle->name, "gt%d-rc\n", gt->info.id);
> +		sprintf(gtidle->name, "gt%d-rc", gt->info.id);
>   		gtidle->idle_residency = xe_guc_pc_rc6_residency;
>   	}
>   


More information about the Intel-xe mailing list