summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-04 18:11:29 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-04 18:11:29 +0100
commitaf9d1b5cdb4cc506a7f171a49d1103998b5a2f9e (patch)
tree0231cc7cb93687fa10c6e28588dda15c8ab25d44 /lib
parent5f0ab94c3fca1437f10812e88136f82c3396a99e (diff)
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_debugfs.c16
-rw-r--r--lib/igt_debugfs.h2
2 files changed, 6 insertions, 12 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index fc274fd8e..7d7f651b1 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -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);
}
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index 02f4afa23..40d9d28fd 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -92,6 +92,6 @@ void igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
DROP_RETIRE | \
DROP_ACTIVE)
-int igt_drop_caches_set(uint64_t val);
+void igt_drop_caches_set(uint64_t val);
#endif /* __IGT_DEBUGFS_H__ */