Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/xe_pm_residency: Fix while loop in toggle_gt_c6
@ 2024-09-19 16:59 Rodrigo Vivi
  2024-09-19 18:35 ` Ville Syrjälä
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Rodrigo Vivi @ 2024-09-19 16:59 UTC (permalink / raw)
  To: igt-dev; +Cc: Bommithi Sakeena, Rodrigo Vivi

From: Bommithi Sakeena <bommithi.sakeena@intel.com>

Function toggle_gt_c6 has while loop iterating for (NUM_REPS +1)
times. Correct it to iterate to NUM_REPS times.

Signed-off-by: Bommithi Sakeena <bommithi.sakeena@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 tests/intel/xe_pm_residency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/intel/xe_pm_residency.c b/tests/intel/xe_pm_residency.c
index 0e687558b..f4d05889c 100644
--- a/tests/intel/xe_pm_residency.c
+++ b/tests/intel/xe_pm_residency.c
@@ -297,7 +297,7 @@ static void toggle_gt_c6(int fd, int n)
 
 		if (n == NUM_REPS)
 			measure_power(&gpu, &gt_c6_power);
-	} while (n--);
+	} while (--n);
 
 	igt_power_close(&gpu);
 	igt_info("GPU consumed %fmW in GT C6 and %fmW in GT C0\n", gt_c6_power, gt_c0_power);
-- 
2.46.0


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

end of thread, other threads:[~2024-09-25  9:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-19 16:59 [PATCH i-g-t] tests/xe_pm_residency: Fix while loop in toggle_gt_c6 Rodrigo Vivi
2024-09-19 18:35 ` Ville Syrjälä
2024-09-19 22:02   ` Rodrigo Vivi
2024-09-25  9:17     ` Riana Tauro
2024-09-20  1:42 ` ✓ CI.xeBAT: success for " Patchwork
2024-09-20  1:54 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-09-20  6:12 ` ✗ CI.xeFULL: " Patchwork

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