From: Lyude Paul <lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: zhengbin <zhengbin13-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
airlied-cv59FeDIM0c@public.gmane.org,
daniel-/w4YWyX8dFk@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 1/2] drm/nouveau: remove set but not used variable 'pclks', 'width'
Date: Fri, 15 Nov 2019 12:59:53 -0500 [thread overview]
Message-ID: <d3da084d1576a2fdd3818b048ff5afd67df052e0.camel@redhat.com> (raw)
In-Reply-To: <1573825353-86268-2-git-send-email-zhengbin13-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Reviewed-by: Lyude Paul <lyude@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@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@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
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
WARNING: multiple messages have this Message-ID (diff)
From: Lyude Paul <lyude@redhat.com>
To: zhengbin <zhengbin13@huawei.com>,
bskeggs@redhat.com, airlied@linux.ie, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/nouveau: remove set but not used variable 'pclks','width'
Date: Fri, 15 Nov 2019 12:59:53 -0500 [thread overview]
Message-ID: <d3da084d1576a2fdd3818b048ff5afd67df052e0.camel@redhat.com> (raw)
Message-ID: <20191115175953.OCtW5qsVbzY1IRSqpA143ylWmi_WFsg-XPPyNzlGGL0@z> (raw)
In-Reply-To: <1573825353-86268-2-git-send-email-zhengbin13@huawei.com>
Reviewed-by: Lyude Paul <lyude@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@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-11-15 17:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 13:42 [PATCH 0/2] drm/nouveau: remove some set but not used variables zhengbin
2019-11-15 13:42 ` zhengbin
2019-11-15 13:42 ` [PATCH 1/2] drm/nouveau: remove set but not used variable 'pclks', 'width' zhengbin
2019-11-15 13:42 ` zhengbin
[not found] ` <1573825353-86268-2-git-send-email-zhengbin13-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2019-11-15 17:59 ` Lyude Paul [this message]
2019-11-15 17:59 ` [PATCH 1/2] drm/nouveau: remove set but not used variable 'pclks','width' Lyude Paul
2019-11-15 13:42 ` [PATCH 2/2] drm/nouveau: remove set but not used variable 'mem' zhengbin
2019-11-15 13:42 ` zhengbin
2019-11-15 18:00 ` Lyude Paul
2019-11-15 18:00 ` Lyude Paul
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=d3da084d1576a2fdd3818b048ff5afd67df052e0.camel@redhat.com \
--to=lyude-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=daniel-/w4YWyX8dFk@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=zhengbin13-hv44wF8Li93QT0dZR+AlfA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).