Staging: xgifb: vb_setmode.c: Fix checkpath warnings
authorManoj Sawai <mas@iitkgp.ac.in>
Tue, 28 Feb 2017 12:14:53 +0000 (17:44 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:08 +0000 (09:17 +0100)
Fix the following checkpatch.pl warnings:

1: Avoid multiple line dereference - prefer
   'XGI330_RefIndex[RefreshRateTableIndex+i].ModeID'

2: Avoid multiple line dereference - prefer
   'XGI330_RefIndex[RefreshRateTableIndex+(*i)].Ext_InfoFlag'

Signed-off-by: Manoj Sawai <mas@iitkgp.ac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/vb_setmode.c

index c359734c0009fc40db2c57ba1587f47c1cb82277..cea128bede52307a8903d4b61181ffd97161ba05 100644 (file)
@@ -5090,8 +5090,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
 
        i = 0;
        do {
-               if (XGI330_RefIndex[RefreshRateTableIndex + i].
-                       ModeID != ModeNo)
+               if (XGI330_RefIndex[RefreshRateTableIndex + i].ModeID != ModeNo)
                        break;
                temp = XGI330_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag;
                temp &= ModeTypeMask;
@@ -5103,8 +5102,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
        } while (index != 0xFFFF);
        if (!(pVBInfo->VBInfo & SetCRT2ToRAMDAC)) {
                if (pVBInfo->VBInfo & SetInSlaveMode) {
-                       temp = XGI330_RefIndex[RefreshRateTableIndex + i - 1].
-                               Ext_InfoFlag;
+                       temp = XGI330_RefIndex[RefreshRateTableIndex + i - 1].Ext_InfoFlag;
                        if (temp & InterlaceMode)
                                i++;
                }