drm/nouveau: remove set but unused variable.
Subsystems (3)
PATCH 1/1 drm/nouveau: remove set but unused variable.
The local variable pclks is defined and set but not used and can therefore be removed.
Issue found by coccinelle.
--- drivers/gpu/drm/nouveau/dispnv04/arb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/nouveau/dispnv04/arb.c +1 -2
@@ -54,7 +54,7 @@ static void nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) { int pagemiss, cas, width, bpp; -int nvclks, mclks, pclks, crtpagemiss; +int nvclks, mclks, crtpagemiss;int found, mclk_extra, mclk_loop, cbs, m1, p1;int mclk_freq, pclk_freq, nvclk_freq;int us_m, us_n, us_p, crtc_drain_rate;
@@ -69,7 +69,6 @@ nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) bpp = arb->bpp; cbs =128 ; - pclks =2 ; nvclks =10 ; mclks =13 + cas; mclk_extra =3 ;
Signature · 1 line
2.17.1
Quoted 14 lines · Wambui Karuga
The local variable
pclksis defined and set but not used and can therefore be removed.
Issue found by coccinelle.Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/nouveau/dispnv04/arb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/nouveau/dispnv04/arb.c +0
-0
drivers/gpu/drm/nouveau/dispnv04/arb.c static void · line 57
Quoted 5 lines
drivers/gpu/drm/nouveau/dispnv04/arb.c +1
-1@@ -54,7 +54,7 @@ static void nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) { int pagemiss, cas, width, bpp; -int nvclks, mclks, pclks, crtpagemiss; +int nvclks, mclks, crtpagemiss;
Hm, reading the code (just from how stuff is named) I wonder whether the original idea was that the calculation for us_p should us pclks, not nvclks, but given that this code is as old as the initial nouveau merge probably not a good idea to touch it. Plus I guess not many with a vintage nv04 in working condition around to even test stuff ...
Ben, what should we do here?
-Daniel
Quoted 14 lines
drivers/gpu/drm/nouveau/dispnv04/arb.c +0
-1int found, mclk_extra, mclk_loop, cbs, m1, p1;int mclk_freq, pclk_freq, nvclk_freq;int us_m, us_n, us_p, crtc_drain_rate;@@ -69,7 +69,6 @@ nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) bpp = arb->bpp; cbs =128 ; - pclks =2 ; nvclks =10 ; mclks =13 + cas; mclk_extra =3 ;Signature · 1 line
2.17.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 28 lines · Daniel Vetter
Quoted 14 lines · Wambui Karuga
The local variable
pclksis defined and set but not used and can therefore be removed.
Issue found by coccinelle.Signed-off-by Wambui Karuga <[email protected]>--- drivers/gpu/drm/nouveau/dispnv04/arb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/nouveau/dispnv04/arb.c +0
-0drivers/gpu/drm/nouveau/dispnv04/arb.c static void · line 57
Quoted 5 lines
drivers/gpu/drm/nouveau/dispnv04/arb.c +1
-1@@ -54,7 +54,7 @@ static void nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) { int pagemiss, cas, width, bpp; -int nvclks, mclks, pclks, crtpagemiss; +int nvclks, mclks, crtpagemiss;Hm, reading the code (just from how stuff is named) I wonder whether the original idea was that the calculation for
us_pshould us pclks, not nvclks, but given that this code is as old as the initial nouveau merge probably not a good idea to touch it. Plus I guess not many with a vintage nv04 in working condition around to even test stuff ...
Quoted 1 line
Ben, what should we do here?
I looked at the original code from xf86-video-nv, and pclks is similarly unused there also, so, I'd vote for just picking up this patch. I don't believe anyone has the knowledge+hw anymore to mess with it in any other way.
Ben.
Quoted 25 lines
-Daniel
Quoted 12 lines
drivers/gpu/drm/nouveau/dispnv04/arb.c +0
-2int found, mclk_extra, mclk_loop, cbs, m1, p1;int mclk_freq, pclk_freq, nvclk_freq;int us_m, us_n, us_p, crtc_drain_rate;@@ -69,7 +69,6 @@ nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb) bpp = arb->bpp; cbs =128 ; - pclks =2 ; nvclks =10 ; mclks =13 + cas; mclk_extra =3 ; --Quoted 2 lines
2.17.1
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau