All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: emil.l.velikov@gmail.com
Subject: [PATCH libdrm 07/17] modetest: annotate const data as such for good measure
Date: Mon, 24 Aug 2015 17:34:10 +0100	[thread overview]
Message-ID: <1440434060-31347-7-git-send-email-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <1440434060-31347-1-git-send-email-emil.l.velikov@gmail.com>

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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++) {
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-08-24 16:30 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 16:34 [PATCH libdrm 01/17] vbltest: fix variable shadowing warning Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 02/17] modetest: fix shadowing warnings Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 03/17] intel: resolve " Emil Velikov
2015-08-31 18:13   ` [PATCH libdrm v2] " Emil Velikov
2015-08-31 18:20     ` Chris Wilson
2015-08-24 16:34 ` [PATCH libdrm 04/17] intel: error out on has_error in exec2 Emil Velikov
2015-08-31 18:14   ` [PATCH libdrm v2] " Emil Velikov
2015-08-31 18:26     ` Chris Wilson
2015-08-31 19:01       ` Emil Velikov
2015-08-31 19:09         ` Chris Wilson
2015-08-31 19:47           ` [PATCH libdrm 4.1/17] intel: introduce to_bo_gem() helper Emil Velikov
2015-08-31 19:48             ` Chris Wilson
2015-08-24 16:34 ` [PATCH libdrm 05/17] configure: enable -Wshadow when available Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 06/17] amdgpu: remove unneeded -Wno-switch-enum flag Emil Velikov
2015-08-24 17:08   ` Alex Deucher
2015-08-24 16:34 ` Emil Velikov [this message]
2015-08-24 16:34 ` [PATCH libdrm 08/17] libkms: use static const for good measure Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 09/17] radeon: cleanup bo/cs func tables Emil Velikov
2015-08-24 17:06   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 10/17] freedreno: annotate the device/bo/pipe/ringbuffer funcs as const data Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 11/17] tests/amdgpu: reference the correct variable for memcpy Emil Velikov
2015-08-24 17:05   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 12/17] tests/amdgpu: annotate the uvd message templates as const data Emil Velikov
2015-08-24 17:06   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 13/17] tests/amdgpu: annotate (most of) the vce " Emil Velikov
2015-08-24 17:07   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 14/17] tests/amdgpu: ensure tests work by using c99 initializers Emil Velikov
2015-08-24 17:08   ` Alex Deucher
2015-09-04 16:33     ` Alex Deucher
2015-09-04 20:45       ` Emil Velikov
     [not found] ` <1440434060-31347-1-git-send-email-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-08-24 16:34   ` [PATCH libdrm 15/17] nouveau: use designated initializers Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 16/17] intel: ignore missing-field-initializers warnings Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 17/17] configure: remove -Wno-missing-field-initializers Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440434060-31347-7-git-send-email-emil.l.velikov@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.