From: Ben Skeggs <bskeggs@redhat.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: David Airlie <airlied@linux.ie>,
Alexandre Courbot <acourbot@nvidia.com>,
Ilia Mirkin <imirkin@alum.mit.edu>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpu: drm: nouveau: core: subdev: clock: base.c: Remove unused function
Date: Sat, 20 Dec 2014 21:46:35 -0500 (EST) [thread overview]
Message-ID: <652559297.245180.1419129995022.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1419094456-9446-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
----- Original Message -----
> From: "Rickard Strandqvist" <rickard_strandqvist@spectrumdigital.se>
> To: "David Airlie" <airlied@linux.ie>, "Ben Skeggs" <bskeggs@redhat.com>
> Cc: "Rickard Strandqvist" <rickard_strandqvist@spectrumdigital.se>, "Alexandre Courbot" <acourbot@nvidia.com>, "Ilia
> Mirkin" <imirkin@alum.mit.edu>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
> Sent: Sunday, 21 December, 2014 2:54:16 AM
> Subject: [PATCH] gpu: drm: nouveau: core: subdev: clock: base.c: Remove unused function
>
> Remove the function nouveau_clock_astate() that is not used anywhere.
No, don't remove this. It's only not used because noone got around to finishing load-based reclocking yet.
NVIDIA has an implementation for the GK20A in the works that uses it.
Ben.
>
> This was partially found by using a static code analysis program called
> cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> drivers/gpu/drm/nouveau/core/include/subdev/clock.h | 1 -
> drivers/gpu/drm/nouveau/core/subdev/clock/base.c | 10 ----------
> 2 files changed, 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/clock.h
> b/drivers/gpu/drm/nouveau/core/include/subdev/clock.h
> index 36ed035..8577945 100644
> --- a/drivers/gpu/drm/nouveau/core/include/subdev/clock.h
> +++ b/drivers/gpu/drm/nouveau/core/include/subdev/clock.h
> @@ -159,7 +159,6 @@ int nva3_clock_pll_calc(struct nouveau_clock *, struct
> nvbios_pll *,
> int clk, struct nouveau_pll_vals *);
>
> int nouveau_clock_ustate(struct nouveau_clock *, int req, int pwr);
> -int nouveau_clock_astate(struct nouveau_clock *, int req, int rel);
> int nouveau_clock_dstate(struct nouveau_clock *, int req, int rel);
> int nouveau_clock_tstate(struct nouveau_clock *, int req, int rel);
>
> diff --git a/drivers/gpu/drm/nouveau/core/subdev/clock/base.c
> b/drivers/gpu/drm/nouveau/core/subdev/clock/base.c
> index e51b72d..b2c852a 100644
> --- a/drivers/gpu/drm/nouveau/core/subdev/clock/base.c
> +++ b/drivers/gpu/drm/nouveau/core/subdev/clock/base.c
> @@ -430,16 +430,6 @@ nouveau_clock_ustate(struct nouveau_clock *clk, int req,
> int pwr)
> }
>
> int
> -nouveau_clock_astate(struct nouveau_clock *clk, int req, int rel)
> -{
> - if (!rel) clk->astate = req;
> - if ( rel) clk->astate += rel;
> - clk->astate = min(clk->astate, clk->state_nr - 1);
> - clk->astate = max(clk->astate, 0);
> - return nouveau_pstate_calc(clk, true);
> -}
> -
> -int
> nouveau_clock_tstate(struct nouveau_clock *clk, int req, int rel)
> {
> if (!rel) clk->tstate = req;
> --
> 1.7.10.4
>
>
next prev parent reply other threads:[~2014-12-21 2:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-20 16:54 [PATCH] gpu: drm: nouveau: core: subdev: clock: base.c: Remove unused function Rickard Strandqvist
2014-12-21 2:46 ` Ben Skeggs [this message]
2014-12-21 11:23 ` Rickard Strandqvist
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=652559297.245180.1419129995022.JavaMail.zimbra@redhat.com \
--to=bskeggs@redhat.com \
--cc=acourbot@nvidia.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=imirkin@alum.mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
/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