Commit fb795c68 authored by Ioana Ciornei's avatar Ioana Ciornei Committed by Greg Kroah-Hartman

staging: dgap: remove unnecessary blank lines

This patch removes the unnecessary blank lines before a closed
bracket and after an open bracket.
Signed-off-by: default avatarIoana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cd857a15
...@@ -514,7 +514,6 @@ static uint dgap_config_get_num_prts(struct board_t *bd) ...@@ -514,7 +514,6 @@ static uint dgap_config_get_num_prts(struct board_t *bd)
return 0; return 0;
for (p = bd->bd_config; p; p = p->next) { for (p = bd->bd_config; p; p = p->next) {
switch (p->type) { switch (p->type) {
case BNODE: case BNODE:
/* /*
...@@ -547,7 +546,6 @@ static char *dgap_create_config_string(struct board_t *bd, char *string) ...@@ -547,7 +546,6 @@ static char *dgap_create_config_string(struct board_t *bd, char *string)
} }
for (p = bd->bd_config; p; p = p->next) { for (p = bd->bd_config; p; p = p->next) {
switch (p->type) { switch (p->type) {
case LNODE: case LNODE:
*ptr = '\0'; *ptr = '\0';
...@@ -1446,7 +1444,6 @@ static void dgap_parity_scan(struct channel_t *ch, unsigned char *cbuf, ...@@ -1446,7 +1444,6 @@ static void dgap_parity_scan(struct channel_t *ch, unsigned char *cbuf,
*cout++ = c; *cout++ = c;
if (ch->pscan_savechar == 0x0) { if (ch->pscan_savechar == 0x0) {
if (c == 0x0) { if (c == 0x0) {
ch->ch_err_break++; ch->ch_err_break++;
*fout++ = TTY_BREAK; *fout++ = TTY_BREAK;
...@@ -1536,7 +1533,6 @@ static void dgap_input(struct channel_t *ch) ...@@ -1536,7 +1533,6 @@ static void dgap_input(struct channel_t *ch)
!(ch->ch_tun.un_flags & UN_ISOPEN) || !(ch->ch_tun.un_flags & UN_ISOPEN) ||
!(tp->termios.c_cflag & CREAD) || !(tp->termios.c_cflag & CREAD) ||
(ch->ch_tun.un_flags & UN_CLOSING)) { (ch->ch_tun.un_flags & UN_CLOSING)) {
writew(head, &(bs->rx_tail)); writew(head, &(bs->rx_tail));
writeb(1, &(bs->idata)); writeb(1, &(bs->idata));
spin_unlock_irqrestore(&ch->ch_lock, lock_flags2); spin_unlock_irqrestore(&ch->ch_lock, lock_flags2);
...@@ -1618,7 +1614,6 @@ static void dgap_input(struct channel_t *ch) ...@@ -1618,7 +1614,6 @@ static void dgap_input(struct channel_t *ch)
* of data the card actually has pending... * of data the card actually has pending...
*/ */
while (n) { while (n) {
s = ((head >= tail) ? head : ch->ch_rsize) - tail; s = ((head >= tail) ? head : ch->ch_rsize) - tail;
s = min(s, n); s = min(s, n);
...@@ -1668,7 +1663,6 @@ static void dgap_input(struct channel_t *ch) ...@@ -1668,7 +1663,6 @@ static void dgap_input(struct channel_t *ch)
if (ld) if (ld)
tty_ldisc_deref(ld); tty_ldisc_deref(ld);
} }
static void dgap_write_wakeup(struct board_t *bd, struct channel_t *ch, static void dgap_write_wakeup(struct board_t *bd, struct channel_t *ch,
...@@ -1739,7 +1733,6 @@ static void dgap_carrier(struct channel_t *ch) ...@@ -1739,7 +1733,6 @@ static void dgap_carrier(struct channel_t *ch)
* Test for a VIRTUAL carrier transition to HIGH. * Test for a VIRTUAL carrier transition to HIGH.
*/ */
if (((ch->ch_flags & CH_FCAR) == 0) && (virt_carrier == 1)) { if (((ch->ch_flags & CH_FCAR) == 0) && (virt_carrier == 1)) {
/* /*
* When carrier rises, wake any threads waiting * When carrier rises, wake any threads waiting
* for carrier in the open routine. * for carrier in the open routine.
...@@ -1753,7 +1746,6 @@ static void dgap_carrier(struct channel_t *ch) ...@@ -1753,7 +1746,6 @@ static void dgap_carrier(struct channel_t *ch)
* Test for a PHYSICAL carrier transition to HIGH. * Test for a PHYSICAL carrier transition to HIGH.
*/ */
if (((ch->ch_flags & CH_CD) == 0) && (phys_carrier == 1)) { if (((ch->ch_flags & CH_CD) == 0) && (phys_carrier == 1)) {
/* /*
* When carrier rises, wake any threads waiting * When carrier rises, wake any threads waiting
* for carrier in the open routine. * for carrier in the open routine.
...@@ -1775,7 +1767,6 @@ static void dgap_carrier(struct channel_t *ch) ...@@ -1775,7 +1767,6 @@ static void dgap_carrier(struct channel_t *ch)
if ((virt_carrier == 0) && if ((virt_carrier == 0) &&
((ch->ch_flags & CH_CD) != 0) && ((ch->ch_flags & CH_CD) != 0) &&
(phys_carrier == 0)) { (phys_carrier == 0)) {
/* /*
* When carrier drops: * When carrier drops:
* *
...@@ -1867,7 +1858,6 @@ static int dgap_event(struct board_t *bd) ...@@ -1867,7 +1858,6 @@ static int dgap_event(struct board_t *bd)
* Loop to process all the events in the buffer. * Loop to process all the events in the buffer.
*/ */
while (tail != head) { while (tail != head) {
/* /*
* Get interrupt information. * Get interrupt information.
*/ */
...@@ -1910,7 +1900,6 @@ static int dgap_event(struct board_t *bd) ...@@ -1910,7 +1900,6 @@ static int dgap_event(struct board_t *bd)
* Process received data. * Process received data.
*/ */
if (reason & IFDATA) { if (reason & IFDATA) {
/* /*
* ALL LOCKS *MUST* BE DROPPED BEFORE CALLING INPUT! * ALL LOCKS *MUST* BE DROPPED BEFORE CALLING INPUT!
* input could send some data to ld, which in turn * input could send some data to ld, which in turn
...@@ -1949,7 +1938,6 @@ static int dgap_event(struct board_t *bd) ...@@ -1949,7 +1938,6 @@ static int dgap_event(struct board_t *bd)
* Process break. * Process break.
*/ */
if (reason & IFBREAK) { if (reason & IFBREAK) {
if (ch->ch_tun.un_tty) { if (ch->ch_tun.un_tty) {
/* A break has been indicated */ /* A break has been indicated */
ch->ch_err_break++; ch->ch_err_break++;
...@@ -2025,7 +2013,6 @@ static void dgap_poll_tasklet(unsigned long data) ...@@ -2025,7 +2013,6 @@ static void dgap_poll_tasklet(unsigned long data)
* If board is ready, parse deeper to see if there is anything to do. * If board is ready, parse deeper to see if there is anything to do.
*/ */
if (bd->state == BOARD_READY) { if (bd->state == BOARD_READY) {
struct ev_t __iomem *eaddr; struct ev_t __iomem *eaddr;
if (!bd->re_map_membase) { if (!bd->re_map_membase) {
...@@ -2269,7 +2256,6 @@ static void dgap_poll_handler(ulong dummy) ...@@ -2269,7 +2256,6 @@ static void dgap_poll_handler(ulong dummy)
*/ */
if ((dgap_numboards == 1) || (num_online_cpus() <= 1)) { if ((dgap_numboards == 1) || (num_online_cpus() <= 1)) {
for (i = 0; i < dgap_numboards; i++) { for (i = 0; i < dgap_numboards; i++) {
brd = dgap_board[i]; brd = dgap_board[i];
if (brd->state == BOARD_FAILED) if (brd->state == BOARD_FAILED)
...@@ -2413,7 +2399,6 @@ static void dgap_cmdb(struct channel_t *ch, u8 cmd, u8 byte1, ...@@ -2413,7 +2399,6 @@ static void dgap_cmdb(struct channel_t *ch, u8 cmd, u8 byte1,
* is outlandish, declare the FEP dead. * is outlandish, declare the FEP dead.
*/ */
for (count = dgap_count ;;) { for (count = dgap_count ;;) {
head = readw(&(cm_addr->cm_head)); head = readw(&(cm_addr->cm_head));
tail = readw(&(cm_addr->cm_tail)); tail = readw(&(cm_addr->cm_tail));
...@@ -2496,7 +2481,6 @@ static void dgap_cmdw(struct channel_t *ch, u8 cmd, u16 word, uint ncmds) ...@@ -2496,7 +2481,6 @@ static void dgap_cmdw(struct channel_t *ch, u8 cmd, u16 word, uint ncmds)
* is outlandish, declare the FEP dead. * is outlandish, declare the FEP dead.
*/ */
for (count = dgap_count ;;) { for (count = dgap_count ;;) {
head = readw(&(cm_addr->cm_head)); head = readw(&(cm_addr->cm_head));
tail = readw(&(cm_addr->cm_tail)); tail = readw(&(cm_addr->cm_tail));
...@@ -2591,7 +2575,6 @@ static void dgap_cmdw_ext(struct channel_t *ch, u16 cmd, u16 word, uint ncmds) ...@@ -2591,7 +2575,6 @@ static void dgap_cmdw_ext(struct channel_t *ch, u16 cmd, u16 word, uint ncmds)
* is outlandish, declare the FEP dead. * is outlandish, declare the FEP dead.
*/ */
for (count = dgap_count ;;) { for (count = dgap_count ;;) {
head = readw(&(cm_addr->cm_head)); head = readw(&(cm_addr->cm_head));
tail = readw(&(cm_addr->cm_tail)); tail = readw(&(cm_addr->cm_tail));
...@@ -2711,7 +2694,6 @@ static int dgap_param(struct channel_t *ch, struct board_t *bd, u32 un_type) ...@@ -2711,7 +2694,6 @@ static int dgap_param(struct channel_t *ch, struct board_t *bd, u32 un_type)
* If baud rate is zero, flush queues, and set mval to drop DTR. * If baud rate is zero, flush queues, and set mval to drop DTR.
*/ */
if ((ch->ch_c_cflag & (CBAUD)) == 0) { if ((ch->ch_c_cflag & (CBAUD)) == 0) {
/* flush rx */ /* flush rx */
head = readw(&(ch->ch_bs->rx_head)); head = readw(&(ch->ch_bs->rx_head));
writew(head, &(ch->ch_bs->rx_tail)); writew(head, &(ch->ch_bs->rx_tail));
...@@ -3042,7 +3024,6 @@ static int dgap_block_til_ready(struct tty_struct *tty, struct file *file, ...@@ -3042,7 +3024,6 @@ static int dgap_block_til_ready(struct tty_struct *tty, struct file *file,
/* Loop forever */ /* Loop forever */
while (1) { while (1) {
sleep_on_un_flags = 0; sleep_on_un_flags = 0;
/* /*
...@@ -3069,7 +3050,6 @@ static int dgap_block_til_ready(struct tty_struct *tty, struct file *file, ...@@ -3069,7 +3050,6 @@ static int dgap_block_til_ready(struct tty_struct *tty, struct file *file,
*/ */
if (!((ch->ch_tun.un_flags | ch->ch_pun.un_flags) & if (!((ch->ch_tun.un_flags | ch->ch_pun.un_flags) &
UN_CLOSING)) { UN_CLOSING)) {
/* /*
* Our conditions to leave cleanly and happily: * Our conditions to leave cleanly and happily:
* 1) NONBLOCKING on the tty is set. * 1) NONBLOCKING on the tty is set.
...@@ -3353,7 +3333,6 @@ static int dgap_wait_for_drain(struct tty_struct *tty) ...@@ -3353,7 +3333,6 @@ static int dgap_wait_for_drain(struct tty_struct *tty)
/* Loop until data is drained */ /* Loop until data is drained */
while (count != 0) { while (count != 0) {
count = dgap_tty_chars_in_buffer(tty); count = dgap_tty_chars_in_buffer(tty);
if (count == 0) if (count == 0)
...@@ -3632,7 +3611,6 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf, ...@@ -3632,7 +3611,6 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf,
} }
if (n > 0) { if (n > 0) {
/* /*
* Move rest of data. * Move rest of data.
*/ */
...@@ -3641,7 +3619,6 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf, ...@@ -3641,7 +3619,6 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf,
memcpy_toio(vaddr, (u8 *) buf, remain); memcpy_toio(vaddr, (u8 *) buf, remain);
head += remain; head += remain;
} }
if (count) { if (count) {
...@@ -4227,7 +4204,6 @@ static int dgap_tty_digisetcustombaud(struct channel_t *ch, struct board_t *bd, ...@@ -4227,7 +4204,6 @@ static int dgap_tty_digisetcustombaud(struct channel_t *ch, struct board_t *bd,
return -EFAULT; return -EFAULT;
if (bd->bd_flags & BD_FEP5PLUS) { if (bd->bd_flags & BD_FEP5PLUS) {
spin_lock_irqsave(&bd->bd_lock, lock_flags); spin_lock_irqsave(&bd->bd_lock, lock_flags);
spin_lock_irqsave(&ch->ch_lock, lock_flags2); spin_lock_irqsave(&ch->ch_lock, lock_flags2);
...@@ -4319,7 +4295,6 @@ static void dgap_tty_throttle(struct tty_struct *tty) ...@@ -4319,7 +4295,6 @@ static void dgap_tty_throttle(struct tty_struct *tty)
spin_unlock_irqrestore(&ch->ch_lock, lock_flags2); spin_unlock_irqrestore(&ch->ch_lock, lock_flags2);
spin_unlock_irqrestore(&bd->bd_lock, lock_flags); spin_unlock_irqrestore(&bd->bd_lock, lock_flags);
} }
static void dgap_tty_unthrottle(struct tty_struct *tty) static void dgap_tty_unthrottle(struct tty_struct *tty)
...@@ -4478,7 +4453,6 @@ static int dgap_tty_open(struct tty_struct *tty, struct file *file) ...@@ -4478,7 +4453,6 @@ static int dgap_tty_open(struct tty_struct *tty, struct file *file)
* Initialize if neither terminal or printer is open. * Initialize if neither terminal or printer is open.
*/ */
if (!((ch->ch_tun.un_flags | ch->ch_pun.un_flags) & UN_ISOPEN)) { if (!((ch->ch_tun.un_flags | ch->ch_pun.un_flags) & UN_ISOPEN)) {
ch->ch_mforce = 0; ch->ch_mforce = 0;
ch->ch_mval = 0; ch->ch_mval = 0;
...@@ -4595,7 +4569,6 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file) ...@@ -4595,7 +4569,6 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file)
*/ */
if ((ch->ch_open_count == 0) && if ((ch->ch_open_count == 0) &&
!(ch->ch_digi.digi_flags & DIGI_PRINTER)) { !(ch->ch_digi.digi_flags & DIGI_PRINTER)) {
ch->ch_flags &= ~(CH_RXBLOCK); ch->ch_flags &= ~(CH_RXBLOCK);
spin_unlock_irqrestore(&ch->ch_lock, lock_flags); spin_unlock_irqrestore(&ch->ch_lock, lock_flags);
...@@ -4635,7 +4608,6 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file) ...@@ -4635,7 +4608,6 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file)
ch->pscan_state = 0; ch->pscan_state = 0;
ch->pscan_savechar = 0; ch->pscan_savechar = 0;
ch->ch_baud_info = 0; ch->ch_baud_info = 0;
} }
/* /*
...@@ -4814,9 +4786,7 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -4814,9 +4786,7 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
} }
switch (cmd) { switch (cmd) {
/* Here are all the standard ioctl's that we MUST implement */ /* Here are all the standard ioctl's that we MUST implement */
case TCSBRK: case TCSBRK:
/* /*
* TCSBRK is SVID version: non-zero arg --> no break * TCSBRK is SVID version: non-zero arg --> no break
...@@ -5066,7 +5036,6 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -5066,7 +5036,6 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
} }
switch (arg) { switch (arg) {
case TCOON: case TCOON:
spin_unlock_irqrestore(&ch->ch_lock, lock_flags2); spin_unlock_irqrestore(&ch->ch_lock, lock_flags2);
spin_unlock_irqrestore(&bd->bd_lock, lock_flags); spin_unlock_irqrestore(&bd->bd_lock, lock_flags);
...@@ -5104,7 +5073,6 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ...@@ -5104,7 +5073,6 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
/* set information for ditty */ /* set information for ditty */
if (cmd == (DIGI_SETAW)) { if (cmd == (DIGI_SETAW)) {
spin_unlock_irqrestore(&ch->ch_lock, lock_flags2); spin_unlock_irqrestore(&ch->ch_lock, lock_flags2);
spin_unlock_irqrestore(&bd->bd_lock, lock_flags); spin_unlock_irqrestore(&bd->bd_lock, lock_flags);
rc = dgap_wait_for_drain(tty); rc = dgap_wait_for_drain(tty);
...@@ -5839,14 +5807,12 @@ static ssize_t dgap_tty_name_show(struct device *d, ...@@ -5839,14 +5807,12 @@ static ssize_t dgap_tty_name_show(struct device *d,
cn = ch->ch_portnum; cn = ch->ch_portnum;
for (cptr = bd->bd_config; cptr; cptr = cptr->next) { for (cptr = bd->bd_config; cptr; cptr = cptr->next) {
if ((cptr->type == BNODE) && if ((cptr->type == BNODE) &&
((cptr->u.board.type == APORT2_920P) || ((cptr->u.board.type == APORT2_920P) ||
(cptr->u.board.type == APORT4_920P) || (cptr->u.board.type == APORT4_920P) ||
(cptr->u.board.type == APORT8_920P) || (cptr->u.board.type == APORT8_920P) ||
(cptr->u.board.type == PAPORT4) || (cptr->u.board.type == PAPORT4) ||
(cptr->u.board.type == PAPORT8))) { (cptr->u.board.type == PAPORT8))) {
found = TRUE; found = TRUE;
if (cptr->u.board.v_start) if (cptr->u.board.v_start)
starto = cptr->u.board.start; starto = cptr->u.board.start;
...@@ -5875,7 +5841,6 @@ static ssize_t dgap_tty_name_show(struct device *d, ...@@ -5875,7 +5841,6 @@ static ssize_t dgap_tty_name_show(struct device *d,
} }
if (cptr->type == CNODE) { if (cptr->type == CNODE) {
for (i = 0; i < cptr->u.conc.nport; i++) { for (i = 0; i < cptr->u.conc.nport; i++) {
if (cn != (i + ncount)) if (cn != (i + ncount))
continue; continue;
...@@ -5892,7 +5857,6 @@ static ssize_t dgap_tty_name_show(struct device *d, ...@@ -5892,7 +5857,6 @@ static ssize_t dgap_tty_name_show(struct device *d,
} }
if (cptr->type == MNODE) { if (cptr->type == MNODE) {
for (i = 0; i < cptr->u.module.nport; i++) { for (i = 0; i < cptr->u.module.nport; i++) {
if (cn != (i + ncount)) if (cn != (i + ncount))
continue; continue;
...@@ -6082,7 +6046,6 @@ static void dgap_do_fep_load(struct board_t *brd, const u8 *ufep, int len) ...@@ -6082,7 +6046,6 @@ static void dgap_do_fep_load(struct board_t *brd, const u8 *ufep, int len)
writel(0xbfc01004, (addr + 0xc34)); writel(0xbfc01004, (addr + 0xc34));
writel(0x3, (addr + 0xc30)); writel(0x3, (addr + 0xc30));
} }
/* /*
...@@ -6157,7 +6120,6 @@ static void dgap_do_reset_board(struct board_t *brd) ...@@ -6157,7 +6120,6 @@ static void dgap_do_reset_board(struct board_t *brd)
if (check == FEPRST) if (check == FEPRST)
break; break;
udelay(10); udelay(10);
} }
if (i > 1000) { if (i > 1000) {
dev_warn(&brd->pdev->dev, dev_warn(&brd->pdev->dev,
...@@ -6254,7 +6216,6 @@ static void dgap_get_vpd(struct board_t *brd) ...@@ -6254,7 +6216,6 @@ static void dgap_get_vpd(struct board_t *brd)
* the first 2 bytes (header) should be 0x55, 0xAA * the first 2 bytes (header) should be 0x55, 0xAA
*/ */
if (byte1 == 0x55 && byte2 == 0xAA) { if (byte1 == 0x55 && byte2 == 0xAA) {
base_offset = 0; base_offset = 0;
/* /*
...@@ -6262,7 +6223,6 @@ static void dgap_get_vpd(struct board_t *brd) ...@@ -6262,7 +6223,6 @@ static void dgap_get_vpd(struct board_t *brd)
* for the VPD offset. * for the VPD offset.
*/ */
while (base_offset <= EXPANSION_ROM_SIZE) { while (base_offset <= EXPANSION_ROM_SIZE) {
/* /*
* Lots of magic numbers here. * Lots of magic numbers here.
* *
...@@ -6406,7 +6366,6 @@ static void dgap_create_tty_sysfs(struct un_t *un, struct device *c) ...@@ -6406,7 +6366,6 @@ static void dgap_create_tty_sysfs(struct un_t *un, struct device *c)
return; return;
dev_set_drvdata(c, un); dev_set_drvdata(c, un);
} }
static void dgap_remove_tty_sysfs(struct device *c) static void dgap_remove_tty_sysfs(struct device *c)
...@@ -6442,7 +6401,6 @@ static int dgap_tty_register_ports(struct board_t *brd) ...@@ -6442,7 +6401,6 @@ static int dgap_tty_register_ports(struct board_t *brd)
ch = brd->channels[0]; ch = brd->channels[0];
for (i = 0; i < brd->nasync; i++, ch = brd->channels[i]) { for (i = 0; i < brd->nasync; i++, ch = brd->channels[i]) {
struct device *classp; struct device *classp;
classp = tty_port_register_device(&brd->serial_ports[i], classp = tty_port_register_device(&brd->serial_ports[i],
...@@ -6546,7 +6504,6 @@ static int dgap_request_irq(struct board_t *brd) ...@@ -6546,7 +6504,6 @@ static int dgap_request_irq(struct board_t *brd)
* Set up our interrupt handler if we are set to do interrupts. * Set up our interrupt handler if we are set to do interrupts.
*/ */
if (dgap_config_get_useintr(brd) && brd->irq) { if (dgap_config_get_useintr(brd) && brd->irq) {
rc = request_irq(brd->irq, dgap_intr, IRQF_SHARED, "DGAP", brd); rc = request_irq(brd->irq, dgap_intr, IRQF_SHARED, "DGAP", brd);
if (!rc) if (!rc)
...@@ -6770,7 +6727,6 @@ static int dgap_tty_init(struct board_t *brd) ...@@ -6770,7 +6727,6 @@ static int dgap_tty_init(struct board_t *brd)
/* Set up channel variables */ /* Set up channel variables */
for (i = 0; i < brd->nasync; i++, ch = brd->channels[i], bs++) { for (i = 0; i < brd->nasync; i++, ch = brd->channels[i], bs++) {
spin_lock_init(&ch->ch_lock); spin_lock_init(&ch->ch_lock);
/* Store all our magic numbers */ /* Store all our magic numbers */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment