Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] Fix assert vs error in lib/intel_wa
@ 2026-05-13  4:36 Shekhar Chauhan
  2026-05-13  4:36 ` [PATCH v1 1/1] lib/intel_wa: Assert on error instead of returning -1 Shekhar Chauhan
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Shekhar Chauhan @ 2026-05-13  4:36 UTC (permalink / raw)
  To: igt-dev; +Cc: shekhar.chauhan, ashutosh.dixit

igt_has_intel_wa() currently returns -1 on error, 0 if the workaround
is not present, and 1 if it is. There is no point in distinguishing
between the error and no-workaround cases for callers. If the debugfs
directory cannot be opened, that is an unexpected test environment
failure and should be caught immediately with an assert.

Simplify debugfs_file_has_wa() by removing the igt_debugfs_exists()
check — igt_sysfs_get() returns NULL for missing files, so the helper
naturally returns 0 without it. Guard the device-level workarounds
check in igt_has_intel_wa() with igt_debugfs_exists() since that file
may not exist on kernels without device OOB workaround support.

v1: Initial set of changes.

Shekhar Chauhan (1):
  lib/intel_wa: Assert on error instead of returning -1

 lib/intel_wa.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-05-14  2:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13  4:36 [PATCH v1 0/1] Fix assert vs error in lib/intel_wa Shekhar Chauhan
2026-05-13  4:36 ` [PATCH v1 1/1] lib/intel_wa: Assert on error instead of returning -1 Shekhar Chauhan
2026-05-13  6:41   ` Dixit, Ashutosh
2026-05-13 21:30     ` Dixit, Ashutosh
2026-05-13  5:50 ` ✗ i915.CI.BAT: failure for Fix assert vs error in lib/intel_wa Patchwork
2026-05-13  5:50 ` Patchwork
2026-05-13  6:00 ` ✓ Xe.CI.BAT: success " Patchwork
2026-05-14  2:24 ` ✗ Xe.CI.FULL: failure " Patchwork

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