Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] intel_reg: Stop warning if register spec is not there
@ 2024-04-10 23:17 Lucas De Marchi
  2024-04-11  2:12 ` ✓ CI.xeBAT: success for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Lucas De Marchi @ 2024-04-10 23:17 UTC (permalink / raw)
  To: igt-dev; +Cc: Matt Roper, Lucas De Marchi

Stop suffering when using igt from the git checkout, which is the case
for all/most developers.

	$ sudo ./build/tools/intel_reg write 0x2358 0xdeadbeef
	Warning: stat '/usr/local/share/igt-gpu-tools/registers' failed: No such file or directory. Using builtin register spec.

Pretty annoying when you have a bunch of commands to run and don't want
to simply ignore stderr.  Keep the other warnings as if the file is
there and can't be read for some reason, it's good to give a warning.
However if the file simply isn't there, let it pass.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 tools/intel_reg.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index 6c37e14d1..ec311a05a 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -1114,12 +1114,8 @@ static int read_reg_spec(struct config *config)
 		path = IGT_DATADIR"/registers";
 
 	r = stat(path, &st);
-	if (r) {
-		fprintf(stderr, "Warning: stat '%s' failed: %s. "
-			"Using builtin register spec.\n",
-			path, strerror(errno));
+	if (r)
 		goto builtin;
-	}
 
 	if (S_ISDIR(st.st_mode)) {
 		r = get_reg_spec_file(buf, sizeof(buf), path, config->devid);
-- 
2.43.0


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

end of thread, other threads:[~2024-04-11 15:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 23:17 [PATCH i-g-t] intel_reg: Stop warning if register spec is not there Lucas De Marchi
2024-04-11  2:12 ` ✓ CI.xeBAT: success for " Patchwork
2024-04-11  2:27 ` ✓ Fi.CI.BAT: " Patchwork
2024-04-11  8:53 ` [PATCH i-g-t] " Jani Nikula
2024-04-11 12:48   ` Lucas De Marchi
2024-04-11 13:24     ` Jani Nikula
2024-04-11 14:29       ` Lucas De Marchi
2024-04-11 14:55         ` Jani Nikula
2024-04-11 15:32           ` Lucas De Marchi
2024-04-11 10:07 ` Zbigniew Kempczyński
2024-04-11 10:10   ` Zbigniew Kempczyński
2024-04-11 13:49 ` ✗ CI.xeFULL: failure for " Patchwork
2024-04-11 14:45 ` ✗ Fi.CI.IGT: " Patchwork

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