From 94e886203a99ef19b8319489a45cd348e76e8ccd Mon Sep 17 00:00:00 2001 From: Antonio Argenziano Date: Mon, 19 Mar 2018 15:30:38 -0700 Subject: igt: Replace 'all-engines' magic numbers with macro In interfaces where a parameter allow to select an engine, we usually use '-1' or '~0u' to select all engines. This patch replaces magic numbers with a named constant. Suggested-by: Chris Wilson Signed-off-by: Antonio Argenziano Cc: Chris Wilson Reviewed-by: Chris Wilson --- lib/igt_gt.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/igt_gt.h') diff --git a/lib/igt_gt.h b/lib/igt_gt.h index 4d9d1aa0..a517ed7b 100644 --- a/lib/igt_gt.h +++ b/lib/igt_gt.h @@ -66,6 +66,8 @@ void igt_clflush_range(void *addr, int size); unsigned intel_detect_and_clear_missed_interrupts(int fd); +#define ALL_ENGINES ~0u /* Use in interfaces to iterate all engines */ + extern const struct intel_execution_engine { const char *name; const char *full_name; -- cgit v1.2.3