From: Dan Carpenter <dan.carpenter@oracle.com>
To: Martin Peres <martin.peres@ensi-bourges.fr>
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: Tue, 10 Jan 2012 05:39:19 +0000 [thread overview]
Message-ID: <20120110053918.GB16258@mwanda> (raw)
In-Reply-To: <4F0B780D.1080804@ensi-bourges.fr>
[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]
On Tue, Jan 10, 2012 at 12:28:13AM +0100, Martin Peres wrote:
> 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
That link redirects to
https://gitorious.org/linux-nouveau-pm/linux-nouveau-pm/commits/master
and it doesn't show the patch.
But I wasn't a huge fan of adding the cast very much either so I'm
sure your patch is good.
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Martin Peres <martin.peres@ensi-bourges.fr>
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: Tue, 10 Jan 2012 08:39:19 +0300 [thread overview]
Message-ID: <20120110053918.GB16258@mwanda> (raw)
In-Reply-To: <4F0B780D.1080804@ensi-bourges.fr>
[-- Attachment #1.1: Type: text/plain, Size: 1349 bytes --]
On Tue, Jan 10, 2012 at 12:28:13AM +0100, Martin Peres wrote:
> 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
That link redirects to
https://gitorious.org/linux-nouveau-pm/linux-nouveau-pm/commits/master
and it doesn't show the patch.
But I wasn't a huge fan of adding the cast very much either so I'm
sure your patch is good.
regards,
dan carpenter
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2012-01-10 5:39 UTC|newest]
Thread overview: 8+ 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-04 7:20 ` Dan Carpenter
2012-01-09 23:28 ` Martin Peres
2012-01-09 23:28 ` Martin Peres
2012-01-10 5:39 ` Dan Carpenter [this message]
2012-01-10 5:39 ` Dan Carpenter
2012-01-10 8:05 ` Martin Peres
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=20120110053918.GB16258@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=martin.peres@ensi-bourges.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.