From patchwork Sat Jan 17 20:54:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 19135 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 75FA6DE065 for ; Sun, 18 Jan 2009 07:55:16 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by ozlabs.org (Postfix) with ESMTP id DFC1CDE099; Sun, 18 Jan 2009 07:54:06 +1100 (EST) Received: by ug-out-1314.google.com with SMTP id 17so120757ugm.14 for ; Sat, 17 Jan 2009 12:54:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=H2s6+5+VZS9Rb2u0ZF9adu94B09bAup8pO5dBBm17o0=; b=MBGEoW68dr5LeGsC7swUT3Avr0AvNVtCwvESALql/HdB6GfwRjP+D1ZXj/z65FKqmL 57G2nNJ9WxJ1bDt4RCrvEsis/jB7CmmDXTbs5WWAdZuDeIJpfjG5YS0z0Jdi3kF11RUi LN3CumRKNzdShDvBGfY/pxn8ek2teB+yaqlTQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=g5gLyuNfjcp9lK49jU21jusax3znlMkobetNjtteuZzGzxHWO35JtZOAw9wWrH8dMo SIzu+oHCTL88o1L5nsDognEpe1qU7XUVVPNySLCQejxfbb3I6cXrqCvZYQlM/w3QSHhA BafG5Fiu++7gDWvfDDGdS0ia+/cuo0xDAumg0= Received: by 10.67.28.14 with SMTP id f14mr882227ugj.79.1232225643626; Sat, 17 Jan 2009 12:54:03 -0800 (PST) Received: from ?192.168.1.115? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id e1sm5385213ugf.7.2009.01.17.12.54.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 17 Jan 2009 12:54:03 -0800 (PST) Message-ID: <4972456C.1050301@gmail.com> Date: Sat, 17 Jan 2009 21:54:04 +0100 From: Roel Kluin User-Agent: Thunderbird 2.0.0.18 (X11/20081105) MIME-Version: 1.0 To: geoffrey.levand@am.sony.com Subject: [PATCH] PS3 ps3av_set_video_mode() make id signed Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org 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 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;