[Nouveau] [PATCH 1/2] drm/nouveau: remove set but not used variable 'pclks', 'width'
Lyude Paul
lyude at redhat.com
Fri Nov 15 17:59:53 UTC 2019
Reviewed-by: Lyude Paul <lyude at redhat.com>
On Fri, 2019-11-15 at 21:42 +0800, zhengbin wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/nouveau/dispnv04/arb.c: In function nv04_calc_arb:
> drivers/gpu/drm/nouveau/dispnv04/arb.c:59:21: warning: variable pclks set
> but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/nouveau/dispnv04/arb.c: In function nv04_calc_arb:
> drivers/gpu/drm/nouveau/dispnv04/arb.c:58:21: warning: variable width set
> but not used [-Wunused-but-set-variable]
>
> It is introduced by commit 6ee738610f41 ("drm/nouveau:
> Add DRM driver for NVIDIA GPUs"), but never used,
> so remove it.
>
> Reported-by: Hulk Robot <hulkci at huawei.com>
> Signed-off-by: zhengbin <zhengbin13 at huawei.com>
> ---
> drivers/gpu/drm/nouveau/dispnv04/arb.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv04/arb.c
> b/drivers/gpu/drm/nouveau/dispnv04/arb.c
> index 3624955..9d4a2d9 100644
> --- a/drivers/gpu/drm/nouveau/dispnv04/arb.c
> +++ b/drivers/gpu/drm/nouveau/dispnv04/arb.c
> @@ -53,8 +53,8 @@ struct nv_sim_state {
> 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 pagemiss, cas, bpp;
> + 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;
> @@ -65,11 +65,9 @@ nv04_calc_arb(struct nv_fifo_info *fifo, struct
> nv_sim_state *arb)
> nvclk_freq = arb->nvclk_khz;
> pagemiss = arb->mem_page_miss;
> cas = arb->mem_latency;
> - width = arb->memory_width >> 6;
> bpp = arb->bpp;
> cbs = 128;
>
> - pclks = 2;
> nvclks = 10;
> mclks = 13 + cas;
> mclk_extra = 3;
> --
> 2.7.4
>
--
Cheers,
Lyude Paul
More information about the Nouveau
mailing list