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

sctp: fix checkpatch errors with indent

fix checkpatch errors below:
ERROR: switch and case should be at the same inden
ERROR: code indent should use tabs where possible

Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

wangweidong and committed by
David S. Miller
f7010e61 26ac8e5f

+68 -71
+6 -6
net/sctp/auth.c
··· 647 647 */ 648 648 for (i = 0; !found && i < len; i++) { 649 649 switch (param->chunks[i]) { 650 - case SCTP_CID_INIT: 651 - case SCTP_CID_INIT_ACK: 652 - case SCTP_CID_SHUTDOWN_COMPLETE: 653 - case SCTP_CID_AUTH: 650 + case SCTP_CID_INIT: 651 + case SCTP_CID_INIT_ACK: 652 + case SCTP_CID_SHUTDOWN_COMPLETE: 653 + case SCTP_CID_AUTH: 654 654 break; 655 655 656 - default: 656 + default: 657 657 if (param->chunks[i] == chunk) 658 - found = 1; 658 + found = 1; 659 659 break; 660 660 } 661 661 }
+22 -22
net/sctp/input.c
··· 1056 1056 break; 1057 1057 1058 1058 switch (ch->type) { 1059 - case SCTP_CID_AUTH: 1060 - have_auth = chunk_num; 1061 - break; 1059 + case SCTP_CID_AUTH: 1060 + have_auth = chunk_num; 1061 + break; 1062 1062 1063 - case SCTP_CID_COOKIE_ECHO: 1064 - /* If a packet arrives containing an AUTH chunk as 1065 - * a first chunk, a COOKIE-ECHO chunk as the second 1066 - * chunk, and possibly more chunks after them, and 1067 - * the receiver does not have an STCB for that 1068 - * packet, then authentication is based on 1069 - * the contents of the COOKIE- ECHO chunk. 1070 - */ 1071 - if (have_auth == 1 && chunk_num == 2) 1072 - return NULL; 1073 - break; 1063 + case SCTP_CID_COOKIE_ECHO: 1064 + /* If a packet arrives containing an AUTH chunk as 1065 + * a first chunk, a COOKIE-ECHO chunk as the second 1066 + * chunk, and possibly more chunks after them, and 1067 + * the receiver does not have an STCB for that 1068 + * packet, then authentication is based on 1069 + * the contents of the COOKIE- ECHO chunk. 1070 + */ 1071 + if (have_auth == 1 && chunk_num == 2) 1072 + return NULL; 1073 + break; 1074 1074 1075 - case SCTP_CID_ASCONF: 1076 - if (have_auth || net->sctp.addip_noauth) 1077 - asoc = __sctp_rcv_asconf_lookup( 1078 - net, ch, laddr, 1079 - sctp_hdr(skb)->source, 1080 - transportp); 1081 - default: 1082 - break; 1075 + case SCTP_CID_ASCONF: 1076 + if (have_auth || net->sctp.addip_noauth) 1077 + asoc = __sctp_rcv_asconf_lookup( 1078 + net, ch, laddr, 1079 + sctp_hdr(skb)->source, 1080 + transportp); 1081 + default: 1082 + break; 1083 1083 } 1084 1084 1085 1085 if (asoc)
+5 -6
net/sctp/output.c
··· 280 280 281 281 /* We believe that this chunk is OK to add to the packet */ 282 282 switch (chunk->chunk_hdr->type) { 283 - case SCTP_CID_DATA: 283 + case SCTP_CID_DATA: 284 284 /* Account for the data being in the packet */ 285 285 sctp_packet_append_data(packet, chunk); 286 286 /* Disallow SACK bundling after DATA. */ ··· 292 292 /* timestamp the chunk for rtx purposes */ 293 293 chunk->sent_at = jiffies; 294 294 break; 295 - case SCTP_CID_COOKIE_ECHO: 295 + case SCTP_CID_COOKIE_ECHO: 296 296 packet->has_cookie_echo = 1; 297 297 break; 298 298 299 - case SCTP_CID_SACK: 299 + case SCTP_CID_SACK: 300 300 packet->has_sack = 1; 301 301 if (chunk->asoc) 302 302 chunk->asoc->stats.osacks++; 303 303 break; 304 304 305 - case SCTP_CID_AUTH: 305 + case SCTP_CID_AUTH: 306 306 packet->has_auth = 1; 307 307 packet->auth = chunk; 308 308 break; ··· 540 540 } else { 541 541 /* no need to seed pseudo checksum for SCTP */ 542 542 nskb->ip_summed = CHECKSUM_PARTIAL; 543 - nskb->csum_start = (skb_transport_header(nskb) - 544 - nskb->head); 543 + nskb->csum_start = skb_transport_header(nskb) - nskb->head; 545 544 nskb->csum_offset = offsetof(struct sctphdr, checksum); 546 545 } 547 546 }
+32 -33
net/sctp/sm_make_chunk.c
··· 1967 1967 1968 1968 for (i = 0; i < num_ext; i++) { 1969 1969 switch (param.ext->chunks[i]) { 1970 - case SCTP_CID_AUTH: 1971 - have_auth = 1; 1972 - break; 1973 - case SCTP_CID_ASCONF: 1974 - case SCTP_CID_ASCONF_ACK: 1975 - have_asconf = 1; 1976 - break; 1970 + case SCTP_CID_AUTH: 1971 + have_auth = 1; 1972 + break; 1973 + case SCTP_CID_ASCONF: 1974 + case SCTP_CID_ASCONF_ACK: 1975 + have_asconf = 1; 1976 + break; 1977 1977 } 1978 1978 } 1979 1979 ··· 2000 2000 2001 2001 for (i = 0; i < num_ext; i++) { 2002 2002 switch (param.ext->chunks[i]) { 2003 - case SCTP_CID_FWD_TSN: 2004 - if (net->sctp.prsctp_enable && 2005 - !asoc->peer.prsctp_capable) 2003 + case SCTP_CID_FWD_TSN: 2004 + if (net->sctp.prsctp_enable && !asoc->peer.prsctp_capable) 2006 2005 asoc->peer.prsctp_capable = 1; 2007 - break; 2008 - case SCTP_CID_AUTH: 2009 - /* if the peer reports AUTH, assume that he 2010 - * supports AUTH. 2011 - */ 2012 - if (net->sctp.auth_enable) 2013 - asoc->peer.auth_capable = 1; 2014 - break; 2015 - case SCTP_CID_ASCONF: 2016 - case SCTP_CID_ASCONF_ACK: 2017 - if (net->sctp.addip_enable) 2018 - asoc->peer.asconf_capable = 1; 2019 - break; 2020 - default: 2021 - break; 2006 + break; 2007 + case SCTP_CID_AUTH: 2008 + /* if the peer reports AUTH, assume that he 2009 + * supports AUTH. 2010 + */ 2011 + if (net->sctp.auth_enable) 2012 + asoc->peer.auth_capable = 1; 2013 + break; 2014 + case SCTP_CID_ASCONF: 2015 + case SCTP_CID_ASCONF_ACK: 2016 + if (net->sctp.addip_enable) 2017 + asoc->peer.asconf_capable = 1; 2018 + break; 2019 + default: 2020 + break; 2022 2021 } 2023 2022 } 2024 2023 } ··· 2265 2266 2266 2267 result = sctp_verify_param(net, asoc, param, cid, chunk, errp); 2267 2268 switch (result) { 2268 - case SCTP_IERROR_ABORT: 2269 - case SCTP_IERROR_NOMEM: 2270 - return 0; 2271 - case SCTP_IERROR_ERROR: 2272 - return 1; 2273 - case SCTP_IERROR_NO_ERROR: 2274 - default: 2275 - break; 2269 + case SCTP_IERROR_ABORT: 2270 + case SCTP_IERROR_NOMEM: 2271 + return 0; 2272 + case SCTP_IERROR_ERROR: 2273 + return 1; 2274 + case SCTP_IERROR_NO_ERROR: 2275 + default: 2276 + break; 2276 2277 } 2277 2278 2278 2279 } /* for (loop through all parameters) */
+2 -3
net/sctp/sm_statefuns.c
··· 3681 3681 asconf_ack->dest = chunk->source; 3682 3682 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(asconf_ack)); 3683 3683 if (asoc->new_transport) { 3684 - sctp_sf_heartbeat(ep, asoc, type, asoc->new_transport, 3685 - commands); 3684 + sctp_sf_heartbeat(ep, asoc, type, asoc->new_transport, commands); 3686 3685 ((struct sctp_association *)asoc)->new_transport = NULL; 3687 3686 } 3688 3687 ··· 6206 6207 */ 6207 6208 if (*sk->sk_prot_creator->memory_pressure) { 6208 6209 if (sctp_tsnmap_has_gap(map) && 6209 - (sctp_tsnmap_get_ctsn(map) + 1) == tsn) { 6210 + (sctp_tsnmap_get_ctsn(map) + 1) == tsn) { 6210 6211 pr_debug("%s: under pressure, reneging for tsn:%u\n", 6211 6212 __func__, tsn); 6212 6213 deliver = SCTP_CMD_RENEGE;
+1 -1
net/sctp/sm_statetable.c
··· 69 69 if ((event_subtype._type > (_max))) { \ 70 70 pr_warn("table %p possible attack: event %d exceeds max %d\n", \ 71 71 _table, event_subtype._type, _max); \ 72 - rtn = &bug; \ 72 + rtn = &bug; \ 73 73 } else \ 74 74 rtn = &_table[event_subtype._type][(int)state]; \ 75 75 \