lkml.org 
[lkml]   [2012]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 15/19] Staging: xgifb: Rework conditions in XGI_SetLockRegs().
> On Thu, Jul 05, 2012 at 04:45:58PM +0200, Miguel Gómez wrote:
>> Rework some conditions to reduce indentation and fix style warnings.
>>
>> Signed-off-by: Miguel Gómez <magomez@igalia.com>
>> ---
>> drivers/staging/xgifb/vb_setmode.c | 29 ++++++++++++-----------------
>> 1 file changed, 12 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
>> index a7ba99f..b439f59 100644
>> --- a/drivers/staging/xgifb/vb_setmode.c
>> +++ b/drivers/staging/xgifb/vb_setmode.c
>> @@ -4039,23 +4039,18 @@ static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex,
>> }
>>
>> if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
>> - if (pVBInfo->VBType & VB_SIS301LV) {
>> - if (pVBInfo->TVInfo & TVSetHiVision) {
>> - tempbx -= 10;
>
> We drop this -= 10 in the final. It seems accidental.

Nope, it's done on purpose. I've joined 2 conditions that were like this

if (pVBInfo->VBType & VB_SIS301LV) {
if (pVBInfo->TVInfo & TVSetHiVision) {
tempbx -= 10;
} else {
/* internal stuff */
}
} else {
tempbx -= 10;
}

into a single one like this

if ((pVBInfo->VBType & VB_SIS301LV) &&
!(pVBInfo->TVInfo & TVSetHiVision)) {
/* internal stuff */
} else {
tempbx -= 10;
}

That's why one of the else branches has been removed.


--
Miguel Gómez
Igalia - http://www.igalia.com


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-07-06 12:01    [W:0.093 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site