From: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: [mesa 4/9] nouveau: return nouveau_screen from hw-specific creation functions
Date: Thu, 26 Nov 2015 17:14:58 +1000 [thread overview]
Message-ID: <1448522103-4925-4-git-send-email-skeggsb@gmail.com> (raw)
In-Reply-To: <1448522103-4925-1-git-send-email-skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Ben Skeggs <bskeggs@redhat.com>
Kills off a void cast.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
---
src/gallium/drivers/nouveau/nouveau_winsys.h | 6 +++---
src/gallium/drivers/nouveau/nv30/nv30_screen.c | 4 ++--
src/gallium/drivers/nouveau/nv50/nv50_screen.c | 4 ++--
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 4 ++--
src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c | 4 ++--
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index 1319c32..3a686bd 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -79,13 +79,13 @@ nouveau_screen_transfer_flags(unsigned pipe)
return flags;
}
-extern struct pipe_screen *
+extern struct nouveau_screen *
nv30_screen_create(struct nouveau_device *);
-extern struct pipe_screen *
+extern struct nouveau_screen *
nv50_screen_create(struct nouveau_device *);
-extern struct pipe_screen *
+extern struct nouveau_screen *
nvc0_screen_create(struct nouveau_device *);
#endif
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index 154c3d3..ea29811 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -417,7 +417,7 @@ nv30_screen_destroy(struct pipe_screen *pscreen)
return NULL; \
} while(0)
-struct pipe_screen *
+struct nouveau_screen *
nv30_screen_create(struct nouveau_device *dev)
{
struct nv30_screen *screen = CALLOC_STRUCT(nv30_screen);
@@ -693,5 +693,5 @@ nv30_screen_create(struct nouveau_device *dev)
nouveau_pushbuf_kick(push, push->channel);
nouveau_fence_new(&screen->base, &screen->base.fence.current, false);
- return pscreen;
+ return &screen->base;
}
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index c1521db..800f7ce 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -747,7 +747,7 @@ int nv50_tls_realloc(struct nv50_screen *screen, unsigned tls_space)
return 1;
}
-struct pipe_screen *
+struct nouveau_screen *
nv50_screen_create(struct nouveau_device *dev)
{
struct nv50_screen *screen;
@@ -961,7 +961,7 @@ nv50_screen_create(struct nouveau_device *dev)
nouveau_fence_new(&screen->base, &screen->base.fence.current, false);
- return pscreen;
+ return &screen->base;
fail:
nv50_screen_destroy(pscreen);
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index b7e44e7..bb7dd32 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -621,7 +621,7 @@ nvc0_screen_resize_tls_area(struct nvc0_screen *screen,
return NULL; \
} while(0)
-struct pipe_screen *
+struct nouveau_screen *
nvc0_screen_create(struct nouveau_device *dev)
{
struct nvc0_screen *screen;
@@ -1062,7 +1062,7 @@ nvc0_screen_create(struct nouveau_device *dev)
nouveau_fence_new(&screen->base, &screen->base.fence.current, false);
- return pscreen;
+ return &screen->base;
fail:
nvc0_screen_destroy(pscreen);
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
index 3ed644e..e117dfc 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
@@ -58,7 +58,7 @@ PUBLIC struct pipe_screen *
nouveau_drm_screen_create(int fd)
{
struct nouveau_device *dev = NULL;
- struct pipe_screen *(*init)(struct nouveau_device *);
+ struct nouveau_screen *(*init)(struct nouveau_device *);
struct nouveau_screen *screen;
int ret, dupfd = -1;
@@ -116,7 +116,7 @@ nouveau_drm_screen_create(int fd)
goto err;
}
- screen = (struct nouveau_screen*)init(dev);
+ screen = init(dev);
if (!screen)
goto err;
--
2.6.3
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-11-26 7:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 7:14 [mesa 1/9] nouveau: bump required libdrm version to 2.4.66 Ben Skeggs
[not found] ` <1448522103-4925-1-git-send-email-skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-11-26 7:14 ` [mesa 2/9] nouveau: remove use of deprecated nouveau_device::fd Ben Skeggs
2015-11-26 7:14 ` [mesa 3/9] nouveau: remove use of deprecated nouveau_device::drm_version Ben Skeggs
2015-11-26 7:14 ` Ben Skeggs [this message]
2015-11-26 7:14 ` [mesa 5/9] nouveau: fix screen creation failure paths Ben Skeggs
2015-11-26 7:15 ` [mesa 6/9] nouveau: remove use of deprecated nouveau_device_wrap() Ben Skeggs
2015-11-26 7:15 ` [mesa 7/9] nv50: fix g98+ vdec class allocation Ben Skeggs
[not found] ` <1448522103-4925-7-git-send-email-skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-11-26 21:50 ` Emil Velikov
[not found] ` <CACvgo53x74cJHXXJ6kZMAdFC2QU3QKeTg=9mRL9VDKq6MvnDMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-27 1:05 ` Ben Skeggs
2015-11-26 7:15 ` [mesa 8/9] nvc0: remove allocation of unused sw class Ben Skeggs
2015-11-26 7:15 ` [mesa 9/9] nouveau: enable use of new kernel interfaces Ben Skeggs
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=1448522103-4925-4-git-send-email-skeggsb@gmail.com \
--to=skeggsb-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.