* [PATCH] drm/nouveau: Fix a complier warning in the card init error path
@ 2011-04-17 20:14 Jimmy Rentz
[not found] ` <20110417161453.0310de4d-bEIzoA7YQWm4miubQJdzGGS2/mPcPMSI/gJWpUujD0o@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Jimmy Rentz @ 2011-04-17 20:14 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Fix an unitialized variable complier warning in nouveau_card_init.
Signed-off-by: Jimmy Rentz <jb17bsome-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index 3404950..66e8037 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -679,7 +679,7 @@ out_fifo:
engine->fifo.takedown(dev);
out_engine:
if (!nouveau_noaccel) {
- for (e = e - 1; e >= 0; e--) {
+ for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) {
if (!dev_priv->eng[e])
continue;
dev_priv->eng[e]->fini(dev, e);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/nouveau: Fix a complier warning in the card init error path
[not found] ` <20110417161453.0310de4d-bEIzoA7YQWm4miubQJdzGGS2/mPcPMSI/gJWpUujD0o@public.gmane.org>
@ 2011-04-17 21:18 ` Marcin Slusarz
[not found] ` <20110417211525.GA3440-OI9uyE9O0yo@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Marcin Slusarz @ 2011-04-17 21:18 UTC (permalink / raw)
To: Jimmy Rentz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Sun, Apr 17, 2011 at 04:14:53PM -0400, Jimmy Rentz wrote:
> Fix an unitialized variable complier warning in nouveau_card_init.
>
> Signed-off-by: Jimmy Rentz <jb17bsome-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
> index 3404950..66e8037 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> @@ -679,7 +679,7 @@ out_fifo:
> engine->fifo.takedown(dev);
> out_engine:
> if (!nouveau_noaccel) {
> - for (e = e - 1; e >= 0; e--) {
> + for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) {
> if (!dev_priv->eng[e])
> continue;
> dev_priv->eng[e]->fini(dev, e);
This code is supposed to handle the situation when one of engine initialization
routines failed and this change will break it...
Marcin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/nouveau: Fix a complier warning in the card init error path
[not found] ` <20110417211525.GA3440-OI9uyE9O0yo@public.gmane.org>
@ 2011-04-17 22:27 ` Jimmy Rentz
[not found] ` <20110417182745.212a6516-bEIzoA7YQWm4miubQJdzGGS2/mPcPMSI/gJWpUujD0o@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Jimmy Rentz @ 2011-04-17 22:27 UTC (permalink / raw)
To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Sun, 17 Apr 2011 23:18:36 +0200
Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Sun, Apr 17, 2011 at 04:14:53PM -0400, Jimmy Rentz wrote:
> > Fix an unitialized variable complier warning in nouveau_card_init.
> >
> > Signed-off-by: Jimmy Rentz <jb17bsome-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >
> > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
> > b/drivers/gpu/drm/nouveau/nouveau_state.c index 3404950..66e8037
> > 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> > @@ -679,7 +679,7 @@ out_fifo:
> > engine->fifo.takedown(dev);
> > out_engine:
> > if (!nouveau_noaccel) {
> > - for (e = e - 1; e >= 0; e--) {
> > + for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) {
> > if (!dev_priv->eng[e])
> > continue;
> > dev_priv->eng[e]->fini(dev, e);
>
> This code is supposed to handle the situation when one of engine
> initialization routines failed and this change will break it...
>
> Marcin
Really? It wasn't intentional. I didn't see the e referenced above.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/nouveau: Fix a complier warning in the card init error path
[not found] ` <20110417182745.212a6516-bEIzoA7YQWm4miubQJdzGGS2/mPcPMSI/gJWpUujD0o@public.gmane.org>
@ 2011-04-17 23:01 ` Ben Skeggs
0 siblings, 0 replies; 4+ messages in thread
From: Ben Skeggs @ 2011-04-17 23:01 UTC (permalink / raw)
To: Jimmy Rentz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Sun, 2011-04-17 at 18:27 -0400, Jimmy Rentz wrote:
> On Sun, 17 Apr 2011 23:18:36 +0200
> Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > On Sun, Apr 17, 2011 at 04:14:53PM -0400, Jimmy Rentz wrote:
> > > Fix an unitialized variable complier warning in nouveau_card_init.
> > >
> > > Signed-off-by: Jimmy Rentz <jb17bsome-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > >
> > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > b/drivers/gpu/drm/nouveau/nouveau_state.c index 3404950..66e8037
> > > 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c
> > > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
> > > @@ -679,7 +679,7 @@ out_fifo:
> > > engine->fifo.takedown(dev);
> > > out_engine:
> > > if (!nouveau_noaccel) {
> > > - for (e = e - 1; e >= 0; e--) {
> > > + for (e = NVOBJ_ENGINE_NR - 1; e >= 0; e--) {
> > > if (!dev_priv->eng[e])
> > > continue;
> > > dev_priv->eng[e]->fini(dev, e);
> >
> > This code is supposed to handle the situation when one of engine
> > initialization routines failed and this change will break it...
> >
> > Marcin
>
> Really? It wasn't intentional. I didn't see the e referenced above.
It's used above, but I don't think it's actually an error. The
situation where it's uninitialised can't actually happen
I pushed a patch that'll silence any compiler that may be complaining.
Ben.
> _______________________________________________
> Nouveau mailing list
> Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-17 23:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-17 20:14 [PATCH] drm/nouveau: Fix a complier warning in the card init error path Jimmy Rentz
[not found] ` <20110417161453.0310de4d-bEIzoA7YQWm4miubQJdzGGS2/mPcPMSI/gJWpUujD0o@public.gmane.org>
2011-04-17 21:18 ` Marcin Slusarz
[not found] ` <20110417211525.GA3440-OI9uyE9O0yo@public.gmane.org>
2011-04-17 22:27 ` Jimmy Rentz
[not found] ` <20110417182745.212a6516-bEIzoA7YQWm4miubQJdzGGS2/mPcPMSI/gJWpUujD0o@public.gmane.org>
2011-04-17 23:01 ` Ben Skeggs
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.