From: Damien Lespiau Subject: [PATCH igt 08/28] tests/kms_cursor_crc: Move the array of cursor fb_ids to the stack Date: Fri, 7 Feb 2014 14:48:52 +0000 Message-ID: <1391784552-21308-9-git-send-email-damien.lespiau@intel.com> References: <1391784552-21308-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 4DAD0FBAE6 for ; Fri, 7 Feb 2014 06:49:44 -0800 (PST) In-Reply-To: <1391784552-21308-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org This array is not used outside ouf create_cursor_fb(). A stack allocated array is enough. Signed-off-by: Damien Lespiau --- tests/kms_cursor_crc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index 38aa1ab..9ddee06 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -52,7 +52,6 @@ typedef struct { int drm_fd; igt_debugfs_t debugfs; drmModeRes *resources; - uint32_t fb_id[NUM_CURSOR_TYPES]; struct kmstest_fb fb[NUM_CURSOR_TYPES]; igt_pipe_crc_t **pipe_crc; } data_t; @@ -313,11 +312,12 @@ static void create_cursor_fb(data_t *data, double r, double g, double b, double a) { cairo_t *cr; + uint32_t fb_id[NUM_CURSOR_TYPES]; - data->fb_id[cursor_type] = kmstest_create_fb2(data->drm_fd, 64, 64, - DRM_FORMAT_ARGB8888, false, - &data->fb[cursor_type]); - igt_assert(data->fb_id[cursor_type]); + fb_id[cursor_type] = kmstest_create_fb2(data->drm_fd, 64, 64, + DRM_FORMAT_ARGB8888, false, + &data->fb[cursor_type]); + igt_assert(fb_id[cursor_type]); cr = kmstest_get_cairo_ctx(data->drm_fd, &data->fb[cursor_type]); -- 1.8.3.1