From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Airlie <airlied@linux.ie>
Cc: kernel-janitors@vger.kernel.org,
Emil Velikov <emil.l.velikov@gmail.com>,
Ben Skeggs <bskeggs@redhat.com>,
dri-devel@lists.freedesktop.org,
Martin Peres <martin.peres@ensi-bourges.fr>
Subject: [patch] drm/nv50/pm: signedness bug in nv50_pm_clocks_pre()
Date: Wed, 04 Jan 2012 07:20:47 +0000 [thread overview]
Message-ID: <20120104072047.GE30978@elgon.mountain> (raw)
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;
}
next reply other threads:[~2012-01-04 7:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 7:20 Dan Carpenter [this message]
2012-01-09 23:28 ` [patch] drm/nv50/pm: signedness bug in nv50_pm_clocks_pre() Martin Peres
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=20120104072047.GE30978@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox