diff options
author | Eric Engestrom <[email protected]> | 2019-10-24 13:04:51 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-10-24 13:57:40 +0000 |
commit | 47571a01ecdce093dacde52a22f156759df3ebf8 (patch) | |
tree | c72b110b39a6060ca63aa2006f5d47f8b441dab2 /src/intel | |
parent | 8d43e2b2ded0fe3c82d49561cdab9f208f9e64b6 (diff) |
anv: fix error message
`strerror()` takes an `errno`, not the negative value returned by the
`ioctl()`.
Instead of fixing this as `"%s", strerror(errno)`, let's just use the
`"%m"` shortcut for it.
Fixes: 2b5f30b1d91b98ab27ba ("anv: implement VK_INTEL_performance_query")
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_perf.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_perf.c b/src/intel/vulkan/anv_perf.c index 6a9fb4f6f11..a6b94203422 100644 --- a/src/intel/vulkan/anv_perf.c +++ b/src/intel/vulkan/anv_perf.c @@ -202,11 +202,8 @@ VkResult anv_QueueSetPerformanceConfigurationINTEL( } else { int ret = gen_ioctl(device->perf_fd, I915_PERF_IOCTL_CONFIG, (void *)(uintptr_t) _configuration); - if (ret < 0) { - return anv_device_set_lost(device, - "i915-perf config failed: %s", - strerror(ret)); - } + if (ret < 0) + return anv_device_set_lost(device, "i915-perf config failed: %m"); } return VK_SUCCESS; |