Skip to content

Commit

Permalink
staging: xgifb: XGI_GetLcdPtr: delete redundant code
Browse files Browse the repository at this point in the history
tempal is a write-only stack variable, and code touching it can be
deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Nov 13, 2012
1 parent 4736783 commit 6c27b37
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions drivers/staging/xgifb/vb_setmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1310,30 +1310,13 @@ static void *XGI_GetLcdPtr(unsigned short BX, unsigned short ModeNo,
unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo)
{
unsigned short i, tempdx, tempbx, tempal, modeflag;
unsigned short i, tempdx, tempbx, modeflag;

struct XGI330_LCDDataTablStruct *tempdi = NULL;

tempbx = BX;

modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;

tempal = tempal & 0x0f;

if (tempbx <= 1) { /* ExpLink */
tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;

if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
tempal = pVBInfo->RefIndex[RefreshRateTableIndex].
Ext_CRT2CRTC2;
}

if (tempbx & 0x01)
tempal = (tempal >> 4);

tempal = (tempal & 0x0f);
}

switch (tempbx) {
case 0:
Expand Down

0 comments on commit 6c27b37

Please sign in to comment.