public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Peres <martin.peres@ensi-bourges.fr>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kernel-janitors@vger.kernel.org,
	Emil Velikov <emil.l.velikov@gmail.com>,
	Ben Skeggs <bskeggs@redhat.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [patch] drm/nv50/pm: signedness bug in nv50_pm_clocks_pre()
Date: Mon, 09 Jan 2012 23:28:13 +0000	[thread overview]
Message-ID: <4F0B780D.1080804@ensi-bourges.fr> (raw)
In-Reply-To: <20120104072047.GE30978@elgon.mountain>

Le 04/01/2012 08:20, Dan Carpenter a écrit :
> calc_mclk() returns zero on success and negative on failure but clk is
> a u32.
>
> Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>
>
> diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c b/drivers/gpu/drm/nouveau/nv50_pm.c
> index 0393721..3508de9 100644
> --- a/drivers/gpu/drm/nouveau/nv50_pm.c
> +++ b/drivers/gpu/drm/nouveau/nv50_pm.c
> @@ -540,7 +540,7 @@ nv50_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl)
>   	info->mclk_hwsq.len = 0;
>   	if (perflvl->memory) {
>   		clk = calc_mclk(dev, perflvl->memory,&info->mclk_hwsq);
> -		if (clk<  0) {
> +		if ((int)clk<  0) {
>   			ret = clk;
>   			goto error;
>   		}
Well spotted Dan!

Sorry for the late answer, was busy reworking this file for safe reclocking.

I have a slightly different fix for that. Please tell me if It suits 
you: 
https://gitorious.org/linux-nouveau-pm/linux-nouveau-pm/commit/c1b80360ezd1aa7dd780ac383aae9437c66ef3b89
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-01-09 23:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04  7:20 [patch] drm/nv50/pm: signedness bug in nv50_pm_clocks_pre() Dan Carpenter
2012-01-09 23:28 ` Martin Peres [this message]
2012-01-10  5:39   ` Dan Carpenter
2012-01-10  8:05     ` Martin Peres

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=4F0B780D.1080804@ensi-bourges.fr \
    --to=martin.peres@ensi-bourges.fr \
    --cc=bskeggs@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=kernel-janitors@vger.kernel.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