From 465001c775a516ac1c7c24302593b02c0f73f486 Mon Sep 17 00:00:00 2001 From: José Roberto de Souza Date: Tue, 23 Oct 2018 13:57:02 -0700 Subject: lib/psr: Add a macro with the maximum lenght of i915_edp_psr_status and use it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So every function reading i915_edp_psr_status can allocate a buffer long enough. Cc: Dhinakaran Pandiyan Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza --- tests/kms_frontbuffer_tracking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/kms_frontbuffer_tracking.c') diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 5ab28319..c366fecf 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1419,7 +1419,7 @@ static void teardown_fbc(void) static bool psr_sink_has_support(void) { - char buf[256]; + char buf[PSR_STATUS_MAX_LEN]; debugfs_read("i915_edp_psr_status", buf); if (*buf == '\0') /* !HAS_PSR -> -ENODEV*/ -- cgit v1.2.3