Commit ea595e76 authored by Dominique van den Broeck's avatar Dominique van den Broeck Committed by Greg Kroah-Hartman

fwserial: (coding style) if/else bracket matching

Style-only modifications to make checkpatch.pl --file --strict a bit happier.
if/else bracket matching (either none or both options should be bracketed).
Signed-off-by: default avatarDominique van den Broeck <domdevlin@free.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 340bb3df
...@@ -638,9 +638,9 @@ static void fwtty_port_handler(struct fw_card *card, ...@@ -638,9 +638,9 @@ static void fwtty_port_handler(struct fw_card *card,
switch (tcode) { switch (tcode) {
case TCODE_WRITE_QUADLET_REQUEST: case TCODE_WRITE_QUADLET_REQUEST:
if (addr != port->rx_handler.offset || len != 4) if (addr != port->rx_handler.offset || len != 4) {
rcode = RCODE_ADDRESS_ERROR; rcode = RCODE_ADDRESS_ERROR;
else { } else {
fwtty_update_port_status(port, *(unsigned *)data); fwtty_update_port_status(port, *(unsigned *)data);
rcode = RCODE_COMPLETE; rcode = RCODE_COMPLETE;
} }
...@@ -756,11 +756,11 @@ static int fwtty_tx(struct fwtty_port *port, bool drain) ...@@ -756,11 +756,11 @@ static int fwtty_tx(struct fwtty_port *port, bool drain)
if (n < 0) { if (n < 0) {
kmem_cache_free(fwtty_txn_cache, txn); kmem_cache_free(fwtty_txn_cache, txn);
if (n == -EAGAIN) if (n == -EAGAIN) {
++port->stats.tx_stall; ++port->stats.tx_stall;
else if (n == -ENODATA) } else if (n == -ENODATA) {
fwtty_profile_data(port->stats.txns, 0); fwtty_profile_data(port->stats.txns, 0);
else { } else {
++port->stats.fifo_errs; ++port->stats.fifo_errs;
fwtty_err_ratelimited(port, "fifo err: %d\n", fwtty_err_ratelimited(port, "fifo err: %d\n",
n); n);
...@@ -1264,8 +1264,9 @@ static int set_serial_info(struct fwtty_port *port, ...@@ -1264,8 +1264,9 @@ static int set_serial_info(struct fwtty_port *port,
if (((tmp.flags & ~ASYNC_USR_MASK) != if (((tmp.flags & ~ASYNC_USR_MASK) !=
(port->port.flags & ~ASYNC_USR_MASK))) (port->port.flags & ~ASYNC_USR_MASK)))
return -EPERM; return -EPERM;
} else } else {
port->port.close_delay = tmp.close_delay * HZ / 100; port->port.close_delay = tmp.close_delay * HZ / 100;
}
return 0; return 0;
} }
...@@ -1308,9 +1309,9 @@ static void fwtty_set_termios(struct tty_struct *tty, struct ktermios *old) ...@@ -1308,9 +1309,9 @@ static void fwtty_set_termios(struct tty_struct *tty, struct ktermios *old)
spin_lock_bh(&port->lock); spin_lock_bh(&port->lock);
baud = set_termios(port, tty); baud = set_termios(port, tty);
if ((baud == 0) && (old->c_cflag & CBAUD)) if ((baud == 0) && (old->c_cflag & CBAUD)) {
port->mctrl &= ~(TIOCM_DTR | TIOCM_RTS); port->mctrl &= ~(TIOCM_DTR | TIOCM_RTS);
else if ((baud != 0) && !(old->c_cflag & CBAUD)) { } else if ((baud != 0) && !(old->c_cflag & CBAUD)) {
if (C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags)) if (C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags))
port->mctrl |= TIOCM_DTR | TIOCM_RTS; port->mctrl |= TIOCM_DTR | TIOCM_RTS;
else else
...@@ -1733,8 +1734,9 @@ static inline int fwserial_send_mgmt_sync(struct fwtty_peer *peer, ...@@ -1733,8 +1734,9 @@ static inline int fwserial_send_mgmt_sync(struct fwtty_peer *peer,
rcode == RCODE_GENERATION) { rcode == RCODE_GENERATION) {
fwtty_dbg(&peer->unit, "mgmt write error: %d\n", rcode); fwtty_dbg(&peer->unit, "mgmt write error: %d\n", rcode);
continue; continue;
} else } else {
break; break;
}
} while (--tries > 0); } while (--tries > 0);
return rcode; return rcode;
} }
...@@ -2744,9 +2746,9 @@ static int fwserial_parse_mgmt_write(struct fwtty_peer *peer, ...@@ -2744,9 +2746,9 @@ static int fwserial_parse_mgmt_write(struct fwtty_peer *peer,
break; break;
case FWSC_VIRT_CABLE_UNPLUG_RSP: case FWSC_VIRT_CABLE_UNPLUG_RSP:
if (peer->state != FWPS_UNPLUG_PENDING) if (peer->state != FWPS_UNPLUG_PENDING) {
rcode = RCODE_CONFLICT_ERROR; rcode = RCODE_CONFLICT_ERROR;
else { } else {
if (be16_to_cpu(pkt->hdr.code) & FWSC_RSP_NACK) if (be16_to_cpu(pkt->hdr.code) & FWSC_RSP_NACK)
fwtty_notice(&peer->unit, "NACK unplug?\n"); fwtty_notice(&peer->unit, "NACK unplug?\n");
port = peer_revert_state(peer); port = peer_revert_state(peer);
......
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