Fixes the following W=1 kernel build warning(s): drivers/video/fbdev/riva/riva_hw.c: In function ‘nv10CalcArbitration’: drivers/video/fbdev/riva/riva_hw.c:849:9: warning: variable ‘pclks_2_top_fifo’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:848:43: warning: variable ‘vus_pipe’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:848:21: warning: variable ‘us_pipe’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:848:9: warning: variable ‘craw’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:846:27: warning: variable ‘vlwm’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:844:37: warning: variable ‘video_drain_rate’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:841:21: warning: variable ‘us_extra’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:840:55: warning: variable ‘vbs’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:839:25: warning: variable ‘cas’ set but not used [-Wunused-but-set-variable] Cc: Antonino Daplas <adaplas@xxxxxxxxx> Cc: Jeff Garzik <jgarzik@xxxxxxxxx> Cc: linux-fbdev@xxxxxxxxxxxxxxx Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx> --- drivers/video/fbdev/riva/riva_hw.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/video/fbdev/riva/riva_hw.c b/drivers/video/fbdev/riva/riva_hw.c index bcf9c4b4de311..4ee63f7d84d3e 100644 --- a/drivers/video/fbdev/riva/riva_hw.c +++ b/drivers/video/fbdev/riva/riva_hw.c @@ -836,17 +836,17 @@ static void nv10CalcArbitration nv10_sim_state *arb ) { - int data, pagemiss, cas,width, video_enable, bpp; - int nvclks, mclks, pclks, vpagemiss, crtpagemiss, vbs; - int nvclk_fill, us_extra; + int data, pagemiss, width, video_enable, bpp; + int nvclks, mclks, pclks, vpagemiss, crtpagemiss; + int nvclk_fill; int found, mclk_extra, mclk_loop, cbs, m1; int mclk_freq, pclk_freq, nvclk_freq, mp_enable; - int us_m, us_m_min, us_n, us_p, video_drain_rate, crtc_drain_rate; + int us_m, us_m_min, us_n, us_p, crtc_drain_rate; int vus_m, vus_n, vus_p; - int vpm_us, us_video, vlwm, cpm_us, us_crt,clwm; + int vpm_us, us_video, cpm_us, us_crt,clwm; int clwm_rnd_down; - int craw, m2us, us_pipe, us_pipe_min, vus_pipe, p1clk, p2; - int pclks_2_top_fifo, min_mclk_extra; + int m2us, us_pipe_min, p1clk, p2; + int min_mclk_extra; int us_min_mclk_extra; fifo->valid = 1; @@ -854,16 +854,13 @@ static void nv10CalcArbitration mclk_freq = arb->mclk_khz; nvclk_freq = arb->nvclk_khz; pagemiss = arb->mem_page_miss; - cas = arb->mem_latency; width = arb->memory_width/64; video_enable = arb->enable_video; bpp = arb->pix_bpp; mp_enable = arb->enable_mp; clwm = 0; - vlwm = 1024; cbs = 512; - vbs = 512; pclks = 4; /* lwm detect. */ @@ -924,17 +921,13 @@ static void nv10CalcArbitration us_min_mclk_extra = min_mclk_extra *1000*1000 / mclk_freq; us_n = nvclks*1000*1000 / nvclk_freq;/* nvclk latency in us */ us_p = pclks*1000*1000 / pclk_freq;/* nvclk latency in us */ - us_pipe = us_m + us_n + us_p; us_pipe_min = us_m_min + us_n + us_p; - us_extra = 0; vus_m = mclk_loop *1000*1000 / mclk_freq; /* Mclk latency in us */ vus_n = (4)*1000*1000 / nvclk_freq;/* nvclk latency in us */ vus_p = 0*1000*1000 / pclk_freq;/* pclk latency in us */ - vus_pipe = vus_m + vus_n + vus_p; if(video_enable) { - video_drain_rate = pclk_freq * 4; /* MB/s */ crtc_drain_rate = pclk_freq * bpp/8; /* MB/s */ vpagemiss = 1; /* self generating page miss */ @@ -993,7 +986,6 @@ static void nv10CalcArbitration else if(crtc_drain_rate * 100 >= nvclk_fill * 98) { clwm = 1024; cbs = 512; - us_extra = (cbs * 1000 * 1000)/ (8*width)/mclk_freq ; } } } @@ -1010,7 +1002,6 @@ static void nv10CalcArbitration m1 = clwm + cbs - 1024; /* Amount of overfill */ m2us = us_pipe_min + us_min_mclk_extra; - pclks_2_top_fifo = (1024-clwm)/(8*width); /* pclk cycles to drain */ p1clk = m2us * pclk_freq/(1000*1000); @@ -1038,14 +1029,13 @@ static void nv10CalcArbitration min_mclk_extra--; } } - craw = clwm; if(clwm < (1024-cbs+8)) clwm = 1024-cbs+8; data = (int)(clwm); /* printf("CRT LWM: %f bytes, prog: 0x%x, bs: 256\n", clwm, data ); */ fifo->graphics_lwm = data; fifo->graphics_burst_size = cbs; - /* printf("VID LWM: %f bytes, prog: 0x%x, bs: %d\n, ", vlwm, data, vbs ); */ + /* printf("VID LWM: 1024 bytes, prog: 0x%x, bs: 512\n, ", data); */ fifo->video_lwm = 1024; fifo->video_burst_size = 512; } } -- 2.25.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel