From: Roel Kluin <roel.kluin@gmail.com>
To: geoffrey.levand@am.sony.com
Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org
Subject: [PATCH] PS3 ps3av_set_video_mode() make id signed
Date: Sat, 17 Jan 2009 21:54:04 +0100 [thread overview]
Message-ID: <4972456C.1050301@gmail.com> (raw)
vi drivers/video/ps3fb.c +618
static int ps3fb_set_par(struct fb_info *info)
{
struct ps3fb_par *par = info->par;
... [ and at line 660 ] ...
if (ps3av_set_video_mode(par->new_mode_id))
now new_mode_id is an int
vi drivers/video/ps3fb.c +132
struct ps3fb_par {
...
int new_mode_id;
...
};
vi drivers/ps3/ps3av.c +844
int ps3av_set_video_mode(u32 id)
-------------------------^^^
{
...
if (... || id < 0) {
--------------------^^^
dev_dbg(&ps3av->dev->core, "%s: error id :%d\n", __func__, id);
return -EINVAL;
}
...
id = ps3av_auto_videomode(&ps3av->av_hw_conf);
if (id < 1) {
---------------------^^^
printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
return -EINVAL;
}
...
ps3av->ps3av_mode = id;
vi drivers/ps3/ps3av.c +763
static int ps3av_auto_videomode()
-------^^^
+42
static struct ps3av {
...
int ps3av_mode;
...
};
--------------------->8---------------8<-------------------
make id signed so a negative id will get noticed
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index 5324978..7aa6d41 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -838,7 +838,7 @@ static int ps3av_get_hw_conf(struct ps3av *ps3av)
}
/* set mode using id */
-int ps3av_set_video_mode(u32 id)
+int ps3av_set_video_mode(int id)
{
int size;
u32 option;
next reply other threads:[~2009-01-17 20:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-17 20:54 Roel Kluin [this message]
2009-01-20 9:21 ` [PATCH] PS3 ps3av_set_video_mode() make id signed Geert Uytterhoeven
2009-01-20 15:57 ` Roel Kluin
2009-01-22 2:32 ` Geert Uytterhoeven
2009-02-12 17:24 ` Geoff Levand
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=4972456C.1050301@gmail.com \
--to=roel.kluin@gmail.com \
--cc=cbe-oss-dev@ozlabs.org \
--cc=geoffrey.levand@am.sony.com \
--cc=linuxppc-dev@ozlabs.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 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.