diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2018-10-23 13:57:02 -0700 |
---|---|---|
committer | José Roberto de Souza <jose.souza@intel.com> | 2019-01-14 14:33:15 -0800 |
commit | 465001c775a516ac1c7c24302593b02c0f73f486 (patch) | |
tree | c5f160d85a706fd5d4cddd41d5685a45dd19e3be /lib/igt_psr.c | |
parent | 7d3fdd0fdddb0993ad25d1416e77ed812f284e32 (diff) |
lib/psr: Add a macro with the maximum lenght of i915_edp_psr_status and use it
So every function reading i915_edp_psr_status can allocate a buffer
long enough.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'lib/igt_psr.c')
-rw-r--r-- | lib/igt_psr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_psr.c b/lib/igt_psr.c index 0ddfb64f..c105bb6e 100644 --- a/lib/igt_psr.c +++ b/lib/igt_psr.c @@ -28,7 +28,7 @@ static bool psr_active(int debugfs_fd, bool check_active) { bool active; - char buf[512]; + char buf[PSR_STATUS_MAX_LEN]; igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf, sizeof(buf)); |