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

staging: dgap: fix checkpatch warnings

Remove a few spaces at beginning and end of line. Remove single statement
braces {}. Remove two FSF boilerplate paragraphs.

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Scott H Kilau <Scott_Kilau@digi.com>
Cc: Eng.Linux@digi.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Vincent Stehlé and committed by
Greg Kroah-Hartman
baeae584 c0ffefa4

+47 -58
+47 -58
drivers/staging/dgap/dgap_fep5.c
··· 6 6 * it under the terms of the GNU General Public License as published by 7 7 * the Free Software Foundation; either version 2, or (at your option) 8 8 * any later version. 9 - * 10 - * This program is distributed in the hope that it will be useful, 11 - * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the 12 - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 - * PURPOSE. See the GNU General Public License for more details. 14 - * 15 - * You should have received a copy of the GNU General Public License 16 - * along with this program; if not, write to the Free Software 17 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 - * 19 9 * 20 10 * NOTE TO LINUX KERNEL HACKERS: DO NOT REFORMAT THIS CODE! 21 11 * ··· 90 100 to_addr += n; 91 101 from_addr += n; 92 102 n = U2BSIZE; 93 - } 103 + } 94 104 95 105 dgap_config_buf[orig_len] = '\0'; 96 106 ··· 157 167 /* increment counts */ 158 168 len -= n; 159 169 to_addr += n; 160 - from_addr += n; 170 + from_addr += n; 161 171 n = U2BSIZE; 162 - } 172 + } 163 173 return 0; 164 174 } 165 175 ··· 186 196 */ 187 197 for (i = 0; i < 16; i++) 188 198 writeb(0, addr + POSTAREA + i); 189 - 199 + 190 200 /* 191 201 * Download bios 192 202 */ ··· 355 365 int i = 0; 356 366 357 367 if (!brd || (brd->magic != DGAP_BOARD_MAGIC) || !brd->re_map_membase || !brd->re_map_port) { 358 - DPR_INIT(("dgap_do_reset_board() start. bad values. brd: %p mem: %p io: %p\n", 368 + DPR_INIT(("dgap_do_reset_board() start. bad values. brd: %p mem: %p io: %p\n", 359 369 brd, brd ? brd->re_map_membase : 0, brd ? brd->re_map_port : 0)); 360 370 return; 361 371 } ··· 461 471 462 472 /* 463 473 * To get to the OTPROM memory, we have to send the boards base 464 - * address or'ed with 1 into the PCI Rom Address location. 474 + * address or'ed with 1 into the PCI Rom Address location. 465 475 */ 466 476 magic = brd->membase | 0x01; 467 477 pci_write_config_dword(brd->pdev, PCI_ROM_ADDRESS, magic); ··· 483 493 * for the VPD offset. 484 494 */ 485 495 while (base_offset <= EXPANSION_ROM_SIZE) { 486 - 496 + 487 497 /* 488 498 * Lots of magic numbers here. 489 499 * ··· 542 552 */ 543 553 void dgap_poll_tasklet(unsigned long data) 544 554 { 545 - struct board_t *bd = (struct board_t *) data; 555 + struct board_t *bd = (struct board_t *) data; 546 556 ulong lock_flags; 547 557 ulong lock_flags2; 548 558 char *vaddr; ··· 807 817 * 808 818 *=======================================================================*/ 809 819 void dgap_cmdb(struct channel_t *ch, uchar cmd, uchar byte1, uchar byte2, uint ncmds) 810 - { 820 + { 811 821 char *vaddr = NULL; 812 822 struct cm_t *cm_addr = NULL; 813 823 uint count; 814 824 uint n; 815 825 u16 head; 816 - u16 tail; 826 + u16 tail; 817 827 818 828 if (!ch || ch->magic != DGAP_CHANNEL_MAGIC) 819 829 return; ··· 824 834 if (ch->ch_bd->state == BOARD_FAILED) { 825 835 DPR_CORE(("%s:%d board is in failed state.\n", __FILE__, __LINE__)); 826 836 return; 827 - } 837 + } 828 838 829 839 /* 830 840 * Make sure the pointers are in range before ··· 838 848 cm_addr = (struct cm_t *) (vaddr + CMDBUF); 839 849 head = readw(&(cm_addr->cm_head)); 840 850 841 - /* 851 + /* 842 852 * Forget it if pointers out of range. 843 853 */ 844 854 if (head >= (CMDMAX - CMDSTART) || (head & 03)) { 845 855 DPR_CORE(("%s:%d pointers out of range, failing board!\n", __FILE__, __LINE__)); 846 856 ch->ch_bd->state = BOARD_FAILED; 847 - return; 857 + return; 848 858 } 849 859 850 860 /* ··· 860 870 writew(head, &(cm_addr->cm_head)); 861 871 862 872 /* 863 - * Wait if necessary before updating the head 873 + * Wait if necessary before updating the head 864 874 * pointer to limit the number of outstanding 865 875 * commands to the FEP. If the time spent waiting 866 876 * is outlandish, declare the FEP dead. ··· 881 891 return; 882 892 } 883 893 udelay(10); 884 - } 894 + } 885 895 } 886 896 887 897 888 898 /*======================================================================= 889 899 * 890 900 * dgap_cmdw - Sends a 1 word command to the FEP. 891 - * 901 + * 892 902 * ch - Pointer to channel structure. 893 903 * cmd - Command to be sent. 894 904 * word - Integer containing word to be sent. ··· 927 937 cm_addr = (struct cm_t *) (vaddr + CMDBUF); 928 938 head = readw(&(cm_addr->cm_head)); 929 939 930 - /* 940 + /* 931 941 * Forget it if pointers out of range. 932 942 */ 933 943 if (head >= (CMDMAX - CMDSTART) || (head & 03)) { ··· 949 959 950 960 /* 951 961 * Wait if necessary before updating the head 952 - * pointer to limit the number of outstanding 962 + * pointer to limit the number of outstanding 953 963 * commands to the FEP. If the time spent waiting 954 964 * is outlandish, declare the FEP dead. 955 965 */ ··· 969 979 return; 970 980 } 971 981 udelay(10); 972 - } 982 + } 973 983 } 974 984 975 985 ··· 977 987 /*======================================================================= 978 988 * 979 989 * dgap_cmdw_ext - Sends a extended word command to the FEP. 980 - * 990 + * 981 991 * ch - Pointer to channel structure. 982 992 * cmd - Command to be sent. 983 993 * word - Integer containing word to be sent. ··· 1016 1026 cm_addr = (struct cm_t *) (vaddr + CMDBUF); 1017 1027 head = readw(&(cm_addr->cm_head)); 1018 1028 1019 - /* 1029 + /* 1020 1030 * Forget it if pointers out of range. 1021 1031 */ 1022 1032 if (head >= (CMDMAX - CMDSTART) || (head & 03)) { ··· 1051 1061 1052 1062 /* 1053 1063 * Wait if necessary before updating the head 1054 - * pointer to limit the number of outstanding 1064 + * pointer to limit the number of outstanding 1055 1065 * commands to the FEP. If the time spent waiting 1056 1066 * is outlandish, declare the FEP dead. 1057 1067 */ ··· 1071 1081 return; 1072 1082 } 1073 1083 udelay(10); 1074 - } 1084 + } 1075 1085 } 1076 1086 1077 1087 ··· 1093 1103 1094 1104 if (!ch || ch->magic != DGAP_CHANNEL_MAGIC) 1095 1105 return; 1096 - 1106 + 1097 1107 /* 1098 1108 * Check parameters. 1099 1109 */ ··· 1163 1173 1164 1174 /* 1165 1175 * Go get from fep mem, what the fep 1166 - * believes the custom baud rate is. 1176 + * believes the custom baud rate is. 1167 1177 */ 1168 - offset = ((((*(unsigned short *)(vaddr + ECS_SEG)) << 4) + 1178 + offset = ((((*(unsigned short *)(vaddr + ECS_SEG)) << 4) + 1169 1179 (ch->ch_portnum * 0x28) + LINE_SPEED)); 1170 1180 1171 1181 value = readw(vaddr + offset); ··· 1201 1211 1202 1212 1203 1213 /*======================================================================= 1204 - * 1214 + * 1205 1215 * dgap_param - Set Digi parameters. 1206 1216 * 1207 1217 * struct tty_struct * - TTY for port. ··· 1235 1245 if (!bd || bd->magic != DGAP_BOARD_MAGIC) 1236 1246 return -ENXIO; 1237 1247 1238 - bs = ch->ch_bs; 1248 + bs = ch->ch_bs; 1239 1249 if (!bs) 1240 1250 return -ENXIO; 1241 1251 ··· 1275 1285 1276 1286 /* 1277 1287 * Now go get from fep mem, what the fep 1278 - * believes the custom baud rate is. 1288 + * believes the custom baud rate is. 1279 1289 */ 1280 1290 ch->ch_baud_info = ch->ch_custom_speed = dgap_get_custom_baud(ch); 1281 1291 1282 1292 DPR_PARAM(("param: Got %d speed\n", ch->ch_custom_speed)); 1283 1293 1284 - /* Handle transition from B0 */ 1294 + /* Handle transition from B0 */ 1285 1295 if (ch->ch_flags & CH_BAUD0) { 1286 1296 ch->ch_flags &= ~(CH_BAUD0); 1287 1297 ch->ch_mval |= (D_RTS(ch)|D_DTR(ch)); ··· 1343 1353 baud = 0; 1344 1354 } 1345 1355 1346 - if (baud == 0) 1356 + if (baud == 0) 1347 1357 baud = 9600; 1348 1358 1349 1359 ch->ch_baud_info = baud; ··· 1416 1426 dgap_cmdw(ch, SCFLAG, (u16) cflag, 0); 1417 1427 } 1418 1428 1419 - /* Handle transition from B0 */ 1429 + /* Handle transition from B0 */ 1420 1430 if (ch->ch_flags & CH_BAUD0) { 1421 1431 ch->ch_flags &= ~(CH_BAUD0); 1422 1432 ch->ch_mval |= (D_RTS(ch)|D_DTR(ch)); ··· 1466 1476 if (ch->ch_digi.digi_flags & RTSPACE) 1467 1477 hflow |= D_RTS(ch); 1468 1478 if (ch->ch_digi.digi_flags & DTRPACE) 1469 - hflow |= D_DTR(ch); 1479 + hflow |= D_DTR(ch); 1470 1480 if (ch->ch_digi.digi_flags & CTSPACE) 1471 1481 hflow |= D_CTS(ch); 1472 1482 if (ch->ch_digi.digi_flags & DSRPACE) ··· 1479 1489 1480 1490 /* Okay to have channel and board locks held calling this */ 1481 1491 dgap_cmdb(ch, SHFLOW, (uchar) hflow, 0xff, 0); 1482 - } 1492 + } 1483 1493 1484 1494 1485 1495 /* ··· 1498 1508 } 1499 1509 1500 1510 /* 1501 - * Set modem control lines. 1511 + * Set modem control lines. 1502 1512 */ 1503 1513 1504 1514 mval ^= ch->ch_mforce & (mval ^ ch->ch_mval); ··· 1515 1525 } 1516 1526 1517 1527 /* 1518 - * Read modem signals, and then call carrier function. 1528 + * Read modem signals, and then call carrier function. 1519 1529 */ 1520 1530 ch->ch_mistat = readb(&(bs->m_stat)); 1521 1531 dgap_carrier(ch); 1522 1532 1523 - /* 1533 + /* 1524 1534 * Set the start and stop characters. 1525 1535 */ 1526 1536 if (ch->ch_startc != ch->ch_fepstartc || ch->ch_stopc != ch->ch_fepstopc) { ··· 1533 1543 1534 1544 /* 1535 1545 * Set the Auxiliary start and stop characters. 1536 - */ 1546 + */ 1537 1547 if (ch->ch_astartc != ch->ch_fepastartc || ch->ch_astopc != ch->ch_fepastopc) { 1538 1548 ch->ch_fepastartc = ch->ch_astartc; 1539 1549 ch->ch_fepastopc = ch->ch_astopc; ··· 1600 1610 } else { 1601 1611 /* save value examination in next state */ 1602 1612 ch->pscan_savechar = c; 1603 - ch->pscan_state = 2; 1613 + ch->pscan_state = 2; 1604 1614 } 1605 1615 break; 1606 1616 ··· 1628 1638 1629 1639 count += 1; 1630 1640 ch->pscan_state = 0; 1631 - } 1641 + } 1632 1642 } 1633 1643 *len = count; 1634 1644 DPR_PSCAN(("dgap_parity_scan finish\n")); ··· 1712 1722 /* 1713 1723 * Make sure the interrupt is valid. 1714 1724 */ 1715 - if ( port >= bd->nasync) { 1725 + if (port >= bd->nasync) 1716 1726 goto next; 1717 - } 1718 1727 1719 1728 if (!(reason & (IFMODEM | IFBREAK | IFTLW | IFTEM | IFDATA))) { 1720 1729 goto next; ··· 1769 1780 } 1770 1781 1771 1782 /* 1772 - * Process Modem change signals. 1783 + * Process Modem change signals. 1773 1784 */ 1774 1785 if (reason & IFMODEM) { 1775 1786 ch->ch_mistat = modem; ··· 1803 1814 ch->ch_tun.un_flags &= ~UN_LOW; 1804 1815 1805 1816 if (ch->ch_tun.un_flags & UN_ISOPEN) { 1806 - if ((ch->ch_tun.un_tty->flags & 1817 + if ((ch->ch_tun.un_tty->flags & 1807 1818 (1 << TTY_DO_WRITE_WAKEUP)) && 1808 1819 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) 1809 1820 ch->ch_tun.un_tty->ldisc->ops->write_wakeup) ··· 1831 1842 if (ch->ch_pun.un_flags & UN_LOW) { 1832 1843 ch->ch_pun.un_flags &= ~UN_LOW; 1833 1844 if (ch->ch_pun.un_flags & UN_ISOPEN) { 1834 - if ((ch->ch_pun.un_tty->flags & 1845 + if ((ch->ch_pun.un_tty->flags & 1835 1846 (1 << TTY_DO_WRITE_WAKEUP)) && 1836 1847 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) 1837 1848 ch->ch_pun.un_tty->ldisc->ops->write_wakeup) ··· 1869 1880 if (ch->ch_tun.un_flags & UN_EMPTY) { 1870 1881 ch->ch_tun.un_flags &= ~UN_EMPTY; 1871 1882 if (ch->ch_tun.un_flags & UN_ISOPEN) { 1872 - if ((ch->ch_tun.un_tty->flags & 1883 + if ((ch->ch_tun.un_tty->flags & 1873 1884 (1 << TTY_DO_WRITE_WAKEUP)) && 1874 1885 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) 1875 1886 ch->ch_tun.un_tty->ldisc->ops->write_wakeup) ··· 1895 1906 if (ch->ch_pun.un_flags & UN_EMPTY) { 1896 1907 ch->ch_pun.un_flags &= ~UN_EMPTY; 1897 1908 if (ch->ch_pun.un_flags & UN_ISOPEN) { 1898 - if ((ch->ch_pun.un_tty->flags & 1909 + if ((ch->ch_pun.un_tty->flags & 1899 1910 (1 << TTY_DO_WRITE_WAKEUP)) && 1900 1911 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) 1901 1912 ch->ch_pun.un_tty->ldisc->ops->write_wakeup) ··· 1935 1946 DGAP_UNLOCK(bd->bd_lock, lock_flags); 1936 1947 1937 1948 return 0; 1938 - } 1949 + }