diff options
author | Aldo Iljazi <neonsync1@gmail.com> | 2013-07-08 15:28:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-24 18:21:13 -0400 |
commit | f3c909b42902034dd1e54abdc770c6284fe3fb7e (patch) | |
tree | 1fbe84fd8f70e0effc0a5b9deaedd4ccecd7f79c /drivers/tty/n_gsm.c | |
parent | dee4a0be69c0e2996188e0c46478eadc280a8954 (diff) |
Drivers: tty: n_gsm.c: fixed 7 errors & 6 warnings that checkpatch complained
Specifically:
n_gsm.c:810: ERROR: space required before the open parenthesis '('
n_gsm.c:830: WARNING: line over 80 characters
n_gsm.c:971: ERROR: trailing whitespace
n_gsm.c:984: ERROR: code indent should use tabs where possible
n_gsm.c:984: WARNING: please, no space before tabs
n_gsm.c:984: WARNING: please, no spaces at the start of a line
n_gsm.c:1141: WARNING: space prohibited before semicolon
n_gsm.c:1743: ERROR: space required before the open brace '{'
n_gsm.c:1744: WARNING: line over 80 characters
n_gsm.c:1745: ERROR: code indent should use tabs where possible
n_gsm.c:1746: ERROR: code indent should use tabs where possible
n_gsm.c:2908: WARNING: line over 80 characters
n_gsm.c:2912: ERROR: trailing whitespace
Signed-off-by: Aldo Iljazi <neonsync1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_gsm.c')
-rw-r--r-- | drivers/tty/n_gsm.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 642239015b46..c0f76da55304 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -807,7 +807,7 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci) | |||
807 | int h = dlci->adaption - 1; | 807 | int h = dlci->adaption - 1; |
808 | 808 | ||
809 | total_size = 0; | 809 | total_size = 0; |
810 | while(1) { | 810 | while (1) { |
811 | len = kfifo_len(dlci->fifo); | 811 | len = kfifo_len(dlci->fifo); |
812 | if (len == 0) | 812 | if (len == 0) |
813 | return total_size; | 813 | return total_size; |
@@ -827,8 +827,8 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci) | |||
827 | switch (dlci->adaption) { | 827 | switch (dlci->adaption) { |
828 | case 1: /* Unstructured */ | 828 | case 1: /* Unstructured */ |
829 | break; | 829 | break; |
830 | case 2: /* Unstructed with modem bits. Always one byte as we never | 830 | case 2: /* Unstructed with modem bits. |
831 | send inline break data */ | 831 | Always one byte as we never send inline break data */ |
832 | *dp++ = gsm_encode_modem(dlci); | 832 | *dp++ = gsm_encode_modem(dlci); |
833 | break; | 833 | break; |
834 | } | 834 | } |
@@ -968,7 +968,7 @@ static void gsm_dlci_data_kick(struct gsm_dlci *dlci) | |||
968 | unsigned long flags; | 968 | unsigned long flags; |
969 | int sweep; | 969 | int sweep; |
970 | 970 | ||
971 | if (dlci->constipated) | 971 | if (dlci->constipated) |
972 | return; | 972 | return; |
973 | 973 | ||
974 | spin_lock_irqsave(&dlci->gsm->tx_lock, flags); | 974 | spin_lock_irqsave(&dlci->gsm->tx_lock, flags); |
@@ -981,7 +981,7 @@ static void gsm_dlci_data_kick(struct gsm_dlci *dlci) | |||
981 | gsm_dlci_data_output(dlci->gsm, dlci); | 981 | gsm_dlci_data_output(dlci->gsm, dlci); |
982 | } | 982 | } |
983 | if (sweep) | 983 | if (sweep) |
984 | gsm_dlci_data_sweep(dlci->gsm); | 984 | gsm_dlci_data_sweep(dlci->gsm); |
985 | spin_unlock_irqrestore(&dlci->gsm->tx_lock, flags); | 985 | spin_unlock_irqrestore(&dlci->gsm->tx_lock, flags); |
986 | } | 986 | } |
987 | 987 | ||
@@ -1138,7 +1138,7 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen) | |||
1138 | static void gsm_control_rls(struct gsm_mux *gsm, u8 *data, int clen) | 1138 | static void gsm_control_rls(struct gsm_mux *gsm, u8 *data, int clen) |
1139 | { | 1139 | { |
1140 | struct tty_port *port; | 1140 | struct tty_port *port; |
1141 | unsigned int addr = 0 ; | 1141 | unsigned int addr = 0; |
1142 | u8 bits; | 1142 | u8 bits; |
1143 | int len = clen; | 1143 | int len = clen; |
1144 | u8 *dp = data; | 1144 | u8 *dp = data; |
@@ -1740,10 +1740,11 @@ static void gsm_queue(struct gsm_mux *gsm) | |||
1740 | 1740 | ||
1741 | if ((gsm->control & ~PF) == UI) | 1741 | if ((gsm->control & ~PF) == UI) |
1742 | gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len); | 1742 | gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len); |
1743 | if (gsm->encoding == 0){ | 1743 | if (gsm->encoding == 0) { |
1744 | /* WARNING: gsm->received_fcs is used for gsm->encoding = 0 only. | 1744 | /* WARNING: gsm->received_fcs is used for |
1745 | In this case it contain the last piece of data | 1745 | gsm->encoding = 0 only. |
1746 | required to generate final CRC */ | 1746 | In this case it contain the last piece of data |
1747 | required to generate final CRC */ | ||
1747 | gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); | 1748 | gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); |
1748 | } | 1749 | } |
1749 | if (gsm->fcs != GOOD_FCS) { | 1750 | if (gsm->fcs != GOOD_FCS) { |
@@ -2904,9 +2905,11 @@ static int gsmtty_install(struct tty_driver *driver, struct tty_struct *tty) | |||
2904 | gsm = gsm_mux[mux]; | 2905 | gsm = gsm_mux[mux]; |
2905 | if (gsm->dead) | 2906 | if (gsm->dead) |
2906 | return -EL2HLT; | 2907 | return -EL2HLT; |
2907 | /* If DLCI 0 is not yet fully open return an error. This is ok from a locking | 2908 | /* If DLCI 0 is not yet fully open return an error. |
2908 | perspective as we don't have to worry about this if DLCI0 is lost */ | 2909 | This is ok from a locking |
2909 | if (gsm->dlci[0] && gsm->dlci[0]->state != DLCI_OPEN) | 2910 | perspective as we don't have to worry about this |
2911 | if DLCI0 is lost */ | ||
2912 | if (gsm->dlci[0] && gsm->dlci[0]->state != DLCI_OPEN) | ||
2910 | return -EL2NSYNC; | 2913 | return -EL2NSYNC; |
2911 | dlci = gsm->dlci[line]; | 2914 | dlci = gsm->dlci[line]; |
2912 | if (dlci == NULL) { | 2915 | if (dlci == NULL) { |