From patchwork Mon Aug 24 16:34:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 7065571 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 76841C05AC for ; Mon, 24 Aug 2015 16:30:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B17EB20783 for ; Mon, 24 Aug 2015 16:30:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4272A20788 for ; Mon, 24 Aug 2015 16:30:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 822766E9F4; Mon, 24 Aug 2015 09:30:15 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD8366E9EF for ; Mon, 24 Aug 2015 09:30:11 -0700 (PDT) Received: by wijp15 with SMTP id p15so83153611wij.0 for ; Mon, 24 Aug 2015 09:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CNycKGicBtde7G7KP6URoXUwLPe5onTm8gx3ticOAws=; b=Y3n5QpuHAoFXL9wBlAsR4qYmjbCs6bXyL/lMcwCduXbV4c+iDKan44Zr4MEb2N2XnJ A2VQbAigMUlJwC3dJ2CFV9R/D3f9A7pErnyw36qB/SYUrAiO0HsqOHClGC/ptWxdgUZW 95Nud+r8xYUWEABZfeP+1CyRQ+AEcRVBe1V1Stj86BYPT6x+oZWArRNzfOJNzQj8nWe4 MNaPLK+D2ea7mEiSFqWy5eQcP3xdkrXp+VzV9X4ZHxK55HM0rQfdm5JnW+ce15AQX3Dy HvbFavKBfL/8QSVFqDgXiTJwcGt29PYcW3DjqjmdMH8t0u7E9Iuc+3Sr5MhBVfnTnmyl 1uvA== X-Received: by 10.195.11.3 with SMTP id ee3mr42027845wjd.89.1440433810531; Mon, 24 Aug 2015 09:30:10 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by smtp.gmail.com with ESMTPSA id ll1sm16885984wic.14.2015.08.24.09.30.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Aug 2015 09:30:10 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 07/17] modetest: annotate const data as such for good measure Date: Mon, 24 Aug 2015 17:34:10 +0100 Message-Id: <1440434060-31347-7-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1440434060-31347-1-git-send-email-emil.l.velikov@gmail.com> References: <1440434060-31347-1-git-send-email-emil.l.velikov@gmail.com> Cc: emil.l.velikov@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Emil Velikov --- tests/modetest/cursor.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/modetest/cursor.c b/tests/modetest/cursor.c index 62a50ef..d8a19bd 100644 --- a/tests/modetest/cursor.c +++ b/tests/modetest/cursor.c @@ -70,7 +70,7 @@ static int cursor_running; */ struct cursor_step { - void (*run)(struct cursor *cursor, struct cursor_step *step); + void (*run)(struct cursor *cursor, const struct cursor_step *step); uint32_t msec; uint32_t repeat; int arg; @@ -78,7 +78,7 @@ struct cursor_step { static uint32_t indx, count; -static void set_cursor(struct cursor *cursor, struct cursor_step *step) +static void set_cursor(struct cursor *cursor, const struct cursor_step *step) { int enabled = (step->arg ^ count) & 0x1; uint32_t handle = 0; @@ -91,7 +91,7 @@ static void set_cursor(struct cursor *cursor, struct cursor_step *step) drmModeSetCursor(cursor->fd, cursor->crtc_id, handle, cursor->w, cursor->h); } -static void move_cursor(struct cursor *cursor, struct cursor_step *step) +static void move_cursor(struct cursor *cursor, const struct cursor_step *step) { int x = cursor->x; int y = cursor->y; @@ -126,7 +126,7 @@ static void move_cursor(struct cursor *cursor, struct cursor_step *step) drmModeMoveCursor(cursor->fd, cursor->crtc_id, x, y); } -static struct cursor_step steps[] = { +static const struct cursor_step steps[] = { { set_cursor, 10, 0, 1 }, /* enable */ { move_cursor, 1, 100, 1 }, { move_cursor, 1, 10, 10 }, @@ -145,7 +145,7 @@ static struct cursor_step steps[] = { static void *cursor_thread_func(void *data) { while (cursor_running) { - struct cursor_step *step = &steps[indx % ARRAY_SIZE(steps)]; + const struct cursor_step *step = &steps[indx % ARRAY_SIZE(steps)]; int i; for (i = 0; i < ncursors; i++) {