mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-21 05:13:47 +00:00
lib: drop return value from igt_drop_caches
No one actually cares, everyone expects it to just work. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
+5
-11
@@ -321,26 +321,20 @@ igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
|
||||
* Drop caches
|
||||
*/
|
||||
|
||||
int igt_drop_caches_set(uint64_t val)
|
||||
void igt_drop_caches_set(uint64_t val)
|
||||
{
|
||||
igt_debugfs_t debugfs;
|
||||
int fd;
|
||||
char data[19];
|
||||
size_t nbytes;
|
||||
int ret = -1;
|
||||
|
||||
sprintf(data, "0x%" PRIx64, val);
|
||||
|
||||
igt_debugfs_init(&debugfs);
|
||||
fd = igt_debugfs_open(&debugfs, "i915_gem_drop_caches", O_WRONLY);
|
||||
|
||||
if (fd >= 0)
|
||||
{
|
||||
nbytes = write(fd, data, strlen(data) + 1);
|
||||
if (nbytes == strlen(data) + 1)
|
||||
ret = 0;
|
||||
close(fd);
|
||||
}
|
||||
|
||||
return ret;
|
||||
igt_assert(fd >= 0);
|
||||
nbytes = write(fd, data, strlen(data) + 1);
|
||||
igt_assert(nbytes == strlen(data) + 1);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user