Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/xe_gt_idle: Drop redundant newline in name
@ 2024-02-02 22:35 Ashutosh Dixit
  2024-02-02 22:38 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Ashutosh Dixit @ 2024-02-02 22:35 UTC (permalink / raw)
  To: intel-xe; +Cc: Riana Tauro, carlos.santa

Newline in name is redunant and produces an unnecessary empty line during
'cat name'.

Fixes: 27a1a1e2e47d ("drm/xe: stringify the argument to avoid potential vulnerability")
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 drivers/gpu/drm/xe/xe_gt_idle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c
index 9358f73368896..42fdc7f688d0e 100644
--- a/drivers/gpu/drm/xe/xe_gt_idle.c
+++ b/drivers/gpu/drm/xe/xe_gt_idle.c
@@ -87,7 +87,7 @@ static ssize_t name_show(struct device *dev,
 {
 	struct xe_gt_idle *gtidle = dev_to_gtidle(dev);
 
-	return sysfs_emit(buff, "%s\n", gtidle->name);
+	return sysfs_emit(buff, "%s", gtidle->name);
 }
 static DEVICE_ATTR_RO(name);
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH] drm/xe/xe_gt_idle: Drop redundant newline in name
@ 2024-02-02 22:56 Ashutosh Dixit
  2024-02-03  5:36 ` Lucas De Marchi
  2024-02-05  5:07 ` Riana Tauro
  0 siblings, 2 replies; 14+ messages in thread
From: Ashutosh Dixit @ 2024-02-02 22:56 UTC (permalink / raw)
  To: intel-xe; +Cc: Riana Tauro, Badal Nilawar

Newline in name is redunant and produces an unnecessary empty line during
'cat name'. Newline is added during sysfs_emit. See '27a1a1e2e47d ("drm/xe:
stringify the argument to avoid potential vulnerability")'.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@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;
 	}
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH] drm/xe/xe_gt_idle: Drop redundant newline in name
@ 2024-02-06 19:27 Ashutosh Dixit
  0 siblings, 0 replies; 14+ messages in thread
From: Ashutosh Dixit @ 2024-02-06 19:27 UTC (permalink / raw)
  To: intel-xe; +Cc: Riana Tauro, Badal Nilawar

Newline in name is redunant and produces an unnecessary empty line during
'cat name'. Newline is added during sysfs_emit. See '27a1a1e2e47d ("drm/xe:
stringify the argument to avoid potential vulnerability")'.

v2: Add Fixes tag (Riana)

Fixes: 7b076d14f21a ("drm/xe/mtl: Add support to get C6 residency/status of MTL")
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@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;
 	}
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-02-06 19:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02 22:35 [PATCH] drm/xe/xe_gt_idle: Drop redundant newline in name Ashutosh Dixit
2024-02-02 22:38 ` ✓ CI.Patch_applied: success for " Patchwork
2024-02-02 22:39 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-02 22:40 ` ✓ CI.KUnit: success " Patchwork
2024-02-02 22:47 ` ✓ CI.Build: " Patchwork
2024-02-02 22:47 ` ✓ CI.Hooks: " Patchwork
2024-02-02 22:49 ` ✓ CI.checksparse: " Patchwork
2024-02-02 22:49 ` [PATCH] " Dixit, Ashutosh
2024-02-02 23:12 ` ✓ CI.BAT: success for " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-02-02 22:56 [PATCH] " Ashutosh Dixit
2024-02-03  5:36 ` Lucas De Marchi
2024-02-03  6:37   ` Dixit, Ashutosh
2024-02-05  5:07 ` Riana Tauro
2024-02-06 19:27 Ashutosh Dixit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox