Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: xgifb: vb_setmode.c Space after cast

Make suggested checkpatch modification for
CHECK: No space is necessary after a cast

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Walt Feasel and committed by
Greg Kroah-Hartman
f2b839d4 c193e792

+69 -70
+69 -70
drivers/staging/xgifb/vb_setmode.c
··· 796 796 i |= temp; 797 797 xgifb_reg_set(pVBInfo->P3c4, 0x0E, i); 798 798 799 - temp = (unsigned char) temp2; 799 + temp = (unsigned char)temp2; 800 800 temp &= 0xFF; /* al */ 801 801 xgifb_reg_set(pVBInfo->P3d4, 0x13, temp); 802 802 ··· 1087 1087 else 1088 1088 swap(bl, bh); 1089 1089 } 1090 - outb((unsigned short) dh, pVBInfo->P3c9); 1091 - outb((unsigned short) bh, pVBInfo->P3c9); 1092 - outb((unsigned short) bl, pVBInfo->P3c9); 1090 + outb((unsigned short)dh, pVBInfo->P3c9); 1091 + outb((unsigned short)bh, pVBInfo->P3c9); 1092 + outb((unsigned short)bl, pVBInfo->P3c9); 1093 1093 } 1094 1094 1095 1095 static void XGI_LoadDAC(struct vb_device_info *pVBInfo) ··· 1441 1441 tempbx >>= 3; 1442 1442 1443 1443 xgifb_reg_set(pVBInfo->Part1Port, 0x16, 1444 - (unsigned short) (tempbx & 0xff)); 1444 + (unsigned short)(tempbx & 0xff)); 1445 1445 xgifb_reg_set(pVBInfo->Part1Port, 0x17, 1446 - (unsigned short) (tempcx & 0xff)); 1446 + (unsigned short)(tempcx & 0xff)); 1447 1447 1448 1448 tempax = pVBInfo->HT; 1449 1449 ··· 1469 1469 1470 1470 xgifb_reg_set(pVBInfo->Part1Port, 0x15, tempax); 1471 1471 xgifb_reg_set(pVBInfo->Part1Port, 0x14, 1472 - (unsigned short) (tempbx & 0xff)); 1472 + (unsigned short)(tempbx & 0xff)); 1473 1473 1474 1474 tempax = pVBInfo->VT; 1475 1475 tempbx = LCDPtr1->LCDVDES; ··· 1481 1481 tempcx -= tempax; 1482 1482 1483 1483 xgifb_reg_set(pVBInfo->Part1Port, 0x1b, 1484 - (unsigned short) (tempbx & 0xff)); 1484 + (unsigned short)(tempbx & 0xff)); 1485 1485 xgifb_reg_set(pVBInfo->Part1Port, 0x1c, 1486 - (unsigned short) (tempcx & 0xff)); 1486 + (unsigned short)(tempcx & 0xff)); 1487 1487 1488 1488 tempbx = (tempbx >> 8) & 0x07; 1489 1489 tempcx = (tempcx >> 8) & 0x07; 1490 1490 1491 1491 xgifb_reg_set(pVBInfo->Part1Port, 0x1d, 1492 - (unsigned short) ((tempcx << 3) 1492 + (unsigned short)((tempcx << 3) 1493 1493 | tempbx)); 1494 1494 1495 1495 tempax = pVBInfo->VT; ··· 1505 1505 tempcx -= tempax; 1506 1506 1507 1507 xgifb_reg_set(pVBInfo->Part1Port, 0x18, 1508 - (unsigned short) (tempbx & 0xff)); 1508 + (unsigned short)(tempbx & 0xff)); 1509 1509 xgifb_reg_and_or(pVBInfo->Part1Port, 0x19, ~0x0f, 1510 - (unsigned short) (tempcx & 0x0f)); 1510 + (unsigned short)(tempcx & 0x0f)); 1511 1511 1512 1512 tempax = ((tempbx >> 8) & 0x07) << 3; 1513 1513 ··· 1527 1527 temp = tempax; /* 0430 ylshieh */ 1528 1528 temp1 = (temp << 18) / tempbx; 1529 1529 1530 - tempdx = (unsigned short) ((temp << 18) % tempbx); 1530 + tempdx = (unsigned short)((temp << 18) % tempbx); 1531 1531 1532 1532 if (tempdx != 0) 1533 1533 temp1 += 1; ··· 1536 1536 push3 = temp2; 1537 1537 1538 1538 xgifb_reg_set(pVBInfo->Part1Port, 0x37, 1539 - (unsigned short) (temp2 & 0xff)); 1539 + (unsigned short)(temp2 & 0xff)); 1540 1540 xgifb_reg_set(pVBInfo->Part1Port, 0x36, 1541 - (unsigned short) ((temp2 >> 8) & 0xff)); 1541 + (unsigned short)((temp2 >> 8) & 0xff)); 1542 1542 1543 - tempbx = (unsigned short) (temp2 >> 16); 1543 + tempbx = (unsigned short)(temp2 >> 16); 1544 1544 tempax = tempbx & 0x03; 1545 1545 1546 1546 tempbx = pVBInfo->VGAVDE; ··· 1553 1553 temp2 = push3; 1554 1554 xgifb_reg_set(pVBInfo->Part4Port, 1555 1555 0x3c, 1556 - (unsigned short) (temp2 & 0xff)); 1556 + (unsigned short)(temp2 & 0xff)); 1557 1557 xgifb_reg_set(pVBInfo->Part4Port, 1558 1558 0x3b, 1559 - (unsigned short) ((temp2 >> 8) & 1559 + (unsigned short)((temp2 >> 8) & 1560 1560 0xff)); 1561 - tempbx = (unsigned short) (temp2 >> 16); 1561 + tempbx = (unsigned short)(temp2 >> 16); 1562 1562 xgifb_reg_and_or(pVBInfo->Part4Port, 0x3a, 1563 1563 ~0xc0, 1564 - (unsigned short) ((tempbx & 1564 + (unsigned short)((tempbx & 1565 1565 0xff) << 6)); 1566 1566 1567 1567 tempcx = pVBInfo->VGAVDE; ··· 1578 1578 1579 1579 temp1 = tempcx << 16; 1580 1580 1581 - tempax = (unsigned short) (temp1 / tempbx); 1581 + tempax = (unsigned short)(temp1 / tempbx); 1582 1582 1583 1583 if ((tempbx & 0xffff) == (tempcx & 0xffff)) 1584 1584 tempax = 65535; ··· 1592 1592 1593 1593 temp3 = (temp3 & 0xffff0000) + (temp1 & 0xffff); 1594 1594 1595 - tempax = (unsigned short) (temp3 & 0xff); 1595 + tempax = (unsigned short)(temp3 & 0xff); 1596 1596 xgifb_reg_set(pVBInfo->Part1Port, 0x1f, tempax); 1597 1597 1598 1598 temp1 = pVBInfo->VGAVDE << 18; 1599 1599 temp1 = temp1 / push3; 1600 - tempbx = (unsigned short) (temp1 & 0xffff); 1600 + tempbx = (unsigned short)(temp1 & 0xffff); 1601 1601 1602 1602 if (pVBInfo->LCDResInfo == Panel_1024x768) 1603 1603 tempbx -= 1; 1604 1604 1605 1605 tempax = ((tempbx >> 8) & 0xff) << 3; 1606 - tempax |= (unsigned short) ((temp3 >> 8) & 0x07); 1606 + tempax |= (unsigned short)((temp3 >> 8) & 0x07); 1607 1607 xgifb_reg_set(pVBInfo->Part1Port, 0x20, 1608 - (unsigned short) (tempax & 0xff)); 1608 + (unsigned short)(tempax & 0xff)); 1609 1609 xgifb_reg_set(pVBInfo->Part1Port, 0x21, 1610 - (unsigned short) (tempbx & 0xff)); 1610 + (unsigned short)(tempbx & 0xff)); 1611 1611 1612 1612 temp3 >>= 16; 1613 1613 ··· 1615 1615 temp3 >>= 1; 1616 1616 1617 1617 xgifb_reg_set(pVBInfo->Part1Port, 0x22, 1618 - (unsigned short) ((temp3 >> 8) & 0xff)); 1618 + (unsigned short)((temp3 >> 8) & 0xff)); 1619 1619 xgifb_reg_set(pVBInfo->Part1Port, 0x23, 1620 - (unsigned short) (temp3 & 0xff)); 1620 + (unsigned short)(temp3 & 0xff)); 1621 1621 } 1622 1622 1623 1623 /* ··· 1733 1733 1734 1734 for (i = 0; i < 4; i++) { 1735 1735 xgifb_reg_and_or(pVBInfo->P3d4, 0x31, ~0x30, 1736 - (unsigned short) (0x10 * i)); 1736 + (unsigned short)(0x10 * i)); 1737 1737 if (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && 1738 1738 !(pVBInfo->VBInfo & SetInSlaveMode)) { 1739 1739 xgifb_reg_set(pVBInfo->P3c4, 0x2e, di_0); ··· 2461 2461 modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag; 2462 2462 CRT1Index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC; 2463 2463 CRT1Index &= IndexMask; 2464 - temp1 = (unsigned short) XGI_CRT1Table[CRT1Index].CR[0]; 2465 - temp2 = (unsigned short) XGI_CRT1Table[CRT1Index].CR[5]; 2464 + temp1 = (unsigned short)XGI_CRT1Table[CRT1Index].CR[0]; 2465 + temp2 = (unsigned short)XGI_CRT1Table[CRT1Index].CR[5]; 2466 2466 tempax = (temp1 & 0xFF) | ((temp2 & 0x03) << 8); 2467 - tempbx = (unsigned short) XGI_CRT1Table[CRT1Index].CR[8]; 2468 - tempcx = (unsigned short) 2469 - XGI_CRT1Table[CRT1Index].CR[14] << 8; 2467 + tempbx = (unsigned short)XGI_CRT1Table[CRT1Index].CR[8]; 2468 + tempcx = (unsigned short)XGI_CRT1Table[CRT1Index].CR[14] << 8; 2470 2469 tempcx &= 0x0100; 2471 2470 tempcx <<= 2; 2472 2471 tempbx |= tempcx; 2473 - temp1 = (unsigned short) XGI_CRT1Table[CRT1Index].CR[9]; 2472 + temp1 = (unsigned short)XGI_CRT1Table[CRT1Index].CR[9]; 2474 2473 2475 2474 if (temp1 & 0x01) 2476 2475 tempbx |= 0x0100; ··· 2744 2745 return; 2745 2746 2746 2747 offset = XGI_GetOffset(ModeNo, ModeIdIndex, RefreshRateTableIndex); 2747 - temp = (unsigned char) (offset & 0xFF); 2748 + temp = (unsigned char)(offset & 0xFF); 2748 2749 xgifb_reg_set(pVBInfo->Part1Port, 0x07, temp); 2749 - temp = (unsigned char) ((offset & 0xFF00) >> 8); 2750 + temp = (unsigned char)((offset & 0xFF00) >> 8); 2750 2751 xgifb_reg_set(pVBInfo->Part1Port, 0x09, temp); 2751 - temp = (unsigned char) (((offset >> 3) & 0xFF) + 1); 2752 + temp = (unsigned char)(((offset >> 3) & 0xFF) + 1); 2752 2753 xgifb_reg_set(pVBInfo->Part1Port, 0x03, temp); 2753 2754 } 2754 2755 ··· 2927 2928 tempax = (pVBInfo->VT - pVBInfo->VDE) * pVBInfo->RVBHCFACT; 2928 2929 tempax = (tempax * pVBInfo->HT) / tempbx; 2929 2930 2930 - return (unsigned short) tempax; 2931 + return (unsigned short)tempax; 2931 2932 } 2932 2933 2933 2934 static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex, ··· 3309 3310 tempax = (tempax & 0x00FF) | ((tempax & 0x00FF) << 8); 3310 3311 push1 = tempax; 3311 3312 temp = (tempax & 0xFF00) >> 8; 3312 - temp += (unsigned short) TimingPoint[0]; 3313 + temp += (unsigned short)TimingPoint[0]; 3313 3314 3314 3315 if (pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV 3315 3316 | VB_SIS302LV | VB_XGI301C)) { ··· 3556 3557 if (temp2 != 0) 3557 3558 tempeax += 1; 3558 3559 3559 - tempax = (unsigned short) tempeax; 3560 + tempax = (unsigned short)tempeax; 3560 3561 3561 3562 /* 301b */ 3562 3563 if (pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV ··· 3566 3567 /* end 301b */ 3567 3568 3568 3569 tempbx = push1; 3569 - tempbx = (unsigned short) (((tempeax & 0x0000FF00) & 0x1F00) 3570 + tempbx = (unsigned short)(((tempeax & 0x0000FF00) & 0x1F00) 3570 3571 | (tempbx & 0x00FF)); 3571 - tempax = (unsigned short) (((tempeax & 0x000000FF) << 8) 3572 + tempax = (unsigned short)(((tempeax & 0x000000FF) << 8) 3572 3573 | (tempax & 0x00FF)); 3573 3574 temp = (tempax & 0xFF00) >> 8; 3574 3575 } else { ··· 3616 3617 3617 3618 xgifb_reg_set(pVBInfo->Part2Port, 0x4d, temp); 3618 3619 temp = xgifb_reg_get(pVBInfo->Part2Port, 0x43); /* 301b change */ 3619 - xgifb_reg_set(pVBInfo->Part2Port, 0x43, (unsigned short) (temp - 3)); 3620 + xgifb_reg_set(pVBInfo->Part2Port, 0x43, (unsigned short)(temp - 3)); 3620 3621 3621 3622 if (!(pVBInfo->TVInfo & (TVSetYPbPr525p | TVSetYPbPr750p))) { 3622 3623 if (pVBInfo->TVInfo & NTSC1024x768) { ··· 4074 4075 if (templong != 0) 4075 4076 tempebx++; 4076 4077 4077 - temp = (unsigned short) (tempebx & 0x000000FF); 4078 + temp = (unsigned short)(tempebx & 0x000000FF); 4078 4079 xgifb_reg_set(pVBInfo->Part4Port, 0x1B, temp); 4079 4080 4080 - temp = (unsigned short) ((tempebx & 0x0000FF00) >> 8); 4081 + temp = (unsigned short)((tempebx & 0x0000FF00) >> 8); 4081 4082 xgifb_reg_set(pVBInfo->Part4Port, 0x1A, temp); 4082 - tempbx = (unsigned short) (tempebx >> 16); 4083 + tempbx = (unsigned short)(tempebx >> 16); 4083 4084 temp = tempbx & 0x00FF; 4084 4085 temp <<= 4; 4085 4086 temp |= ((tempcx & 0xFF00) >> 8); ··· 4215 4216 unsigned short LVDSVT, LVDSVBS, LVDSVRS, LVDSVRE, LVDSVBE; 4216 4217 unsigned short value; 4217 4218 4218 - temp = (unsigned char) ((xgifb_info->lvds_data.LVDS_Capability & 4219 + temp = (unsigned char)((xgifb_info->lvds_data.LVDS_Capability & 4219 4220 (LCDPolarity << 8)) >> 8); 4220 4221 temp &= LCDPolarity; 4221 4222 Miscdata = inb(pVBInfo->P3cc); ··· 4632 4633 if (temp & LCDRGB18Bit) { 4633 4634 xgifb_reg_and_or(pVBInfo->Part1Port, 0x19, 0x0F, 4634 4635 /* Enable Dither */ 4635 - (unsigned short) (0x20 | (tempcx & 0x00C0))); 4636 + (unsigned short)(0x20 | (tempcx & 0x00C0))); 4636 4637 xgifb_reg_and_or(pVBInfo->Part1Port, 0x1A, 0x7F, 0x80); 4637 4638 } else { 4638 4639 xgifb_reg_and_or(pVBInfo->Part1Port, 0x19, 0x0F, 4639 - (unsigned short) (0x30 | (tempcx & 0x00C0))); 4640 + (unsigned short)(0x30 | (tempcx & 0x00C0))); 4640 4641 xgifb_reg_and_or(pVBInfo->Part1Port, 0x1A, 0x7F, 0x00); 4641 4642 } 4642 4643 } ··· 4652 4653 { 4653 4654 if (tempcx & EnableLCD24bpp) /* 24bits */ 4654 4655 xgifb_reg_and_or(pVBInfo->Part2Port, 0x1A, 0xE0, 4655 - (unsigned short) (((tempcx & 0x00ff) >> 6) 4656 + (unsigned short)(((tempcx & 0x00ff) >> 6) 4656 4657 | 0x0c)); 4657 4658 else 4658 4659 xgifb_reg_and_or(pVBInfo->Part2Port, 0x1A, 0xE0, 4659 - (unsigned short) (((tempcx & 0x00ff) >> 6) 4660 + (unsigned short)(((tempcx & 0x00ff) >> 6) 4660 4661 | 0x18)); /* Enable Dither */ 4661 4662 } 4662 4663 ··· 4715 4716 (VB_SIS301LV | VB_SIS302LV | VB_XGI301C)) { 4716 4717 /* Set 301LV Capability */ 4717 4718 xgifb_reg_set(pVBInfo->Part4Port, 0x24, 4718 - (unsigned char) (tempcx & 0x1F)); 4719 + (unsigned char)(tempcx & 0x1F)); 4719 4720 } 4720 4721 /* VB Driving */ 4721 4722 xgifb_reg_and_or(pVBInfo->Part4Port, 0x0D, 4722 4723 ~((EnableVBCLKDRVLOW | EnablePLLSPLOW) >> 8), 4723 - (unsigned short) ((tempcx & (EnableVBCLKDRVLOW 4724 + (unsigned short)((tempcx & (EnableVBCLKDRVLOW 4724 4725 | EnablePLLSPLOW)) >> 8)); 4725 4726 4726 4727 if (pVBInfo->VBInfo & SetCRT2ToLCD) ··· 4786 4787 XGI_GetTVPtrIndex2(&tempbx, &tempcl, &tempch, pVBInfo); /* bx, cl, ch */ 4787 4788 tempData = TVPhaseList[tempbx]; 4788 4789 4789 - xgifb_reg_set(pVBInfo->Part2Port, 0x31, (unsigned short) (tempData 4790 + xgifb_reg_set(pVBInfo->Part2Port, 0x31, (unsigned short)(tempData 4790 4791 & 0x000000FF)); 4791 - xgifb_reg_set(pVBInfo->Part2Port, 0x32, (unsigned short) ((tempData 4792 + xgifb_reg_set(pVBInfo->Part2Port, 0x32, (unsigned short)((tempData 4792 4793 & 0x0000FF00) >> 8)); 4793 - xgifb_reg_set(pVBInfo->Part2Port, 0x33, (unsigned short) ((tempData 4794 + xgifb_reg_set(pVBInfo->Part2Port, 0x33, (unsigned short)((tempData 4794 4795 & 0x00FF0000) >> 16)); 4795 - xgifb_reg_set(pVBInfo->Part2Port, 0x34, (unsigned short) ((tempData 4796 + xgifb_reg_set(pVBInfo->Part2Port, 0x34, (unsigned short)((tempData 4796 4797 & 0xFF000000) >> 24)); 4797 4798 } 4798 4799 ··· 5204 5205 CR63 = xgifb_reg_get(pVBInfo->P3d4, 0x63); 5205 5206 SR01 = xgifb_reg_get(pVBInfo->P3c4, 0x01); 5206 5207 5207 - xgifb_reg_set(pVBInfo->P3c4, 0x01, (unsigned char) (SR01 & 0xDF)); 5208 - xgifb_reg_set(pVBInfo->P3d4, 0x63, (unsigned char) (CR63 & 0xBF)); 5208 + xgifb_reg_set(pVBInfo->P3c4, 0x01, (unsigned char)(SR01 & 0xDF)); 5209 + xgifb_reg_set(pVBInfo->P3d4, 0x63, (unsigned char)(CR63 & 0xBF)); 5209 5210 5210 5211 CR17 = xgifb_reg_get(pVBInfo->P3d4, 0x17); 5211 - xgifb_reg_set(pVBInfo->P3d4, 0x17, (unsigned char) (CR17 | 0x80)); 5212 + xgifb_reg_set(pVBInfo->P3d4, 0x17, (unsigned char)(CR17 | 0x80)); 5212 5213 5213 5214 SR1F = xgifb_reg_get(pVBInfo->P3c4, 0x1F); 5214 - xgifb_reg_set(pVBInfo->P3c4, 0x1F, (unsigned char) (SR1F | 0x04)); 5215 + xgifb_reg_set(pVBInfo->P3c4, 0x1F, (unsigned char)(SR1F | 0x04)); 5215 5216 5216 5217 SR07 = xgifb_reg_get(pVBInfo->P3c4, 0x07); 5217 - xgifb_reg_set(pVBInfo->P3c4, 0x07, (unsigned char) (SR07 & 0xFB)); 5218 + xgifb_reg_set(pVBInfo->P3c4, 0x07, (unsigned char)(SR07 & 0xFB)); 5218 5219 SR06 = xgifb_reg_get(pVBInfo->P3c4, 0x06); 5219 - xgifb_reg_set(pVBInfo->P3c4, 0x06, (unsigned char) (SR06 & 0xC3)); 5220 + xgifb_reg_set(pVBInfo->P3c4, 0x06, (unsigned char)(SR06 & 0xC3)); 5220 5221 5221 5222 xgifb_reg_set(pVBInfo->P3d4, 0x11, 0x00); 5222 5223 5223 5224 for (i = 0; i < 8; i++) 5224 - xgifb_reg_set(pVBInfo->P3d4, (unsigned short) i, CRTCData[i]); 5225 + xgifb_reg_set(pVBInfo->P3d4, (unsigned short)i, CRTCData[i]); 5225 5226 5226 5227 for (i = 8; i < 11; i++) 5227 - xgifb_reg_set(pVBInfo->P3d4, (unsigned short) (i + 8), 5228 + xgifb_reg_set(pVBInfo->P3d4, (unsigned short)(i + 8), 5228 5229 CRTCData[i]); 5229 5230 5230 5231 for (i = 11; i < 13; i++) 5231 - xgifb_reg_set(pVBInfo->P3d4, (unsigned short) (i + 4), 5232 + xgifb_reg_set(pVBInfo->P3d4, (unsigned short)(i + 4), 5232 5233 CRTCData[i]); 5233 5234 5234 5235 for (i = 13; i < 16; i++) 5235 - xgifb_reg_set(pVBInfo->P3c4, (unsigned short) (i - 3), 5236 + xgifb_reg_set(pVBInfo->P3c4, (unsigned short)(i - 3), 5236 5237 CRTCData[i]); 5237 5238 5238 - xgifb_reg_set(pVBInfo->P3c4, 0x0E, (unsigned char) (CRTCData[16] 5239 + xgifb_reg_set(pVBInfo->P3c4, 0x0E, (unsigned char)(CRTCData[16] 5239 5240 & 0xE0)); 5240 5241 5241 5242 xgifb_reg_set(pVBInfo->P3c4, 0x31, 0x00); ··· 5269 5270 5270 5271 xgifb_reg_set(pVBInfo->P3d4, 0x53, (xgifb_reg_get( 5271 5272 pVBInfo->P3d4, 0x53) & 0xFD)); 5272 - xgifb_reg_set(pVBInfo->P3c4, 0x1F, (unsigned char) SR1F); 5273 + xgifb_reg_set(pVBInfo->P3c4, 0x1F, (unsigned char)SR1F); 5273 5274 } 5274 5275 5275 5276 static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info,