Skip to content

Commit

Permalink
[NET] SCTP: Fix whitespace errors.
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
yoshfuji authored and David S. Miller committed Feb 11, 2007
1 parent 10297b9 commit d808ad9
Show file tree
Hide file tree
Showing 23 changed files with 367 additions and 367 deletions.
10 changes: 5 additions & 5 deletions net/sctp/associola.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
* If the 'T5-shutdown-guard' timer is used, it SHOULD be set to the
* recommended value of 5 times 'RTO.Max'.
*/
asoc->timeouts[SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD]
asoc->timeouts[SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD]
= 5 * asoc->rto_max;

asoc->timeouts[SCTP_EVENT_TIMEOUT_HEARTBEAT] = 0;
asoc->timeouts[SCTP_EVENT_TIMEOUT_SACK] = asoc->sackdelay;
asoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE] =
sp->autoclose * HZ;

/* Initilizes the timers */
for (i = SCTP_EVENT_TIMEOUT_NONE; i < SCTP_NUM_TIMEOUT_TYPES; ++i) {
init_timer(&asoc->timers[i]);
Expand Down Expand Up @@ -1334,16 +1334,16 @@ int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *asoc,
asoc->ep->base.bind_addr.port, gfp);
}

/* Lookup laddr in the bind address list of an association. */
int sctp_assoc_lookup_laddr(struct sctp_association *asoc,
/* Lookup laddr in the bind address list of an association. */
int sctp_assoc_lookup_laddr(struct sctp_association *asoc,
const union sctp_addr *laddr)
{
int found;

sctp_read_lock(&asoc->base.addr_lock);
if ((asoc->base.bind_addr.port == ntohs(laddr->v4.sin_port)) &&
sctp_bind_addr_match(&asoc->base.bind_addr, laddr,
sctp_sk(asoc->base.sk))) {
sctp_sk(asoc->base.sk))) {
found = 1;
goto out;
}
Expand Down
12 changes: 6 additions & 6 deletions net/sctp/bind_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static void sctp_bind_addr_clean(struct sctp_bind_addr *);
/* Copy 'src' to 'dest' taking 'scope' into account. Omit addresses
* in 'src' which have a broader scope than 'scope'.
*/
int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
const struct sctp_bind_addr *src,
sctp_scope_t scope, gfp_t gfp,
int flags)
Expand Down Expand Up @@ -296,7 +296,7 @@ int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw_addr_list,
********************************************************************/

/* Does this contain a specified address? Allow wildcarding. */
int sctp_bind_addr_match(struct sctp_bind_addr *bp,
int sctp_bind_addr_match(struct sctp_bind_addr *bp,
const union sctp_addr *addr,
struct sctp_sock *opt)
{
Expand All @@ -306,7 +306,7 @@ int sctp_bind_addr_match(struct sctp_bind_addr *bp,
list_for_each(pos, &bp->address_list) {
laddr = list_entry(pos, struct sctp_sockaddr_entry, list);
if (opt->pf->cmp_addr(&laddr->a, addr, opt))
return 1;
return 1;
}

return 0;
Expand All @@ -329,12 +329,12 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp,

list_for_each(pos, &bp->address_list) {
laddr = list_entry(pos, struct sctp_sockaddr_entry, list);

addr_buf = (union sctp_addr *)addrs;
for (i = 0; i < addrcnt; i++) {
addr = (union sctp_addr *)addr_buf;
af = sctp_get_af_specific(addr->v4.sin_family);
if (!af)
if (!af)
return NULL;

if (opt->pf->cmp_addr(&laddr->a, addr, opt))
Expand All @@ -350,7 +350,7 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp,
}

/* Copy out addresses from the global local address list. */
static int sctp_copy_one_addr(struct sctp_bind_addr *dest,
static int sctp_copy_one_addr(struct sctp_bind_addr *dest,
union sctp_addr *addr,
sctp_scope_t scope, gfp_t gfp,
int flags)
Expand Down
38 changes: 19 additions & 19 deletions net/sctp/crc32c.c
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
/* SCTP kernel reference Implementation
* Copyright (c) 1999-2001 Motorola, Inc.
* Copyright (c) 2001-2003 International Business Machines, Corp.
*
*
* This file is part of the SCTP kernel reference Implementation
*
*
* SCTP Checksum functions
*
* The SCTP reference implementation is free software;
* you can redistribute it and/or modify it under the terms of
*
* The SCTP reference implementation is free software;
* you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* The SCTP reference implementation is distributed in the hope that it
*
* The SCTP reference implementation is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* ************************
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with GNU CC; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Boston, MA 02111-1307, USA.
*
* Please send any bug reports or fixes you make to the
* email address(es):
* lksctp developers <[email protected]>
*
*
* Or submit a bug report through the following website:
* http://www.sf.net/projects/lksctp
*
* Written or modified by:
* Dinakaran Joseph
* Written or modified by:
* Dinakaran Joseph
* Jon Grimm <[email protected]>
* Sridhar Samudrala <[email protected]>
*
*
* Any bugs reported given to us we will try to fix... any fixes shared will
* be incorporated into the next SCTP release.
*/
Expand Down Expand Up @@ -135,10 +135,10 @@ static const __u32 crc_c[256] = {
0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E,
0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351,
};

__u32 sctp_start_cksum(__u8 *buffer, __u16 length)
{
__u32 crc32 = ~(__u32) 0;
__u32 crc32 = ~(__u32) 0;
__u32 i;

/* Optimize this routine to be SCTP specific, knowing how
Expand All @@ -147,7 +147,7 @@ __u32 sctp_start_cksum(__u8 *buffer, __u16 length)

/* Calculate CRC up to the checksum. */
for (i = 0; i < (sizeof(struct sctphdr) - sizeof(__u32)); i++)
CRC32C(crc32, buffer[i]);
CRC32C(crc32, buffer[i]);

/* Skip checksum field of the header. */
for (i = 0; i < sizeof(__u32); i++)
Expand Down Expand Up @@ -175,13 +175,13 @@ __u32 sctp_update_copy_cksum(__u8 *to, __u8 *from, __u16 length, __u32 crc32)
__u32 i;
__u32 *_to = (__u32 *)to;
__u32 *_from = (__u32 *)from;

for (i = 0; i < (length/4); i++) {
_to[i] = _from[i];
CRC32C(crc32, from[i*4]);
CRC32C(crc32, from[i*4+1]);
CRC32C(crc32, from[i*4+2]);
CRC32C(crc32, from[i*4+3]);
CRC32C(crc32, from[i*4+3]);
}

return crc32;
Expand Down
32 changes: 16 additions & 16 deletions net/sctp/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@
* Copyright (c) 1999-2000 Cisco, Inc.
* Copyright (c) 1999-2001 Motorola, Inc.
* Copyright (c) 2001 Intel Corp.
*
*
* This file is part of the SCTP kernel reference Implementation
*
*
* This file is part of the implementation of the add-IP extension,
* based on <draft-ietf-tsvwg-addip-sctp-02.txt> June 29, 2001,
* for the SCTP kernel reference Implementation.
*
*
* This file converts numerical ID value to alphabetical names for SCTP
* terms such as chunk type, parameter time, event type, etc.
*
* The SCTP reference implementation is free software;
* you can redistribute it and/or modify it under the terms of
*
* The SCTP reference implementation is free software;
* you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* The SCTP reference implementation is distributed in the hope that it
*
* The SCTP reference implementation is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* ************************
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with GNU CC; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Boston, MA 02111-1307, USA.
*
* Please send any bug reports or fixes you make to the
* email address(es):
* lksctp developers <[email protected]>
*
*
* Or submit a bug report through the following website:
* http://www.sf.net/projects/lksctp
*
* Written or modified by:
* Written or modified by:
* La Monte H.P. Yarroll <[email protected]>
* Karl Knutson <[email protected]>
* Xingang Guo <[email protected]>
* Jon Grimm <[email protected]>
* Daisy Chang <[email protected]>
* Sridhar Samudrala <[email protected]>
*
*
* Any bugs reported given to us we will try to fix... any fixes shared will
* be incorporated into the next SCTP release.
*/
Expand Down Expand Up @@ -81,7 +81,7 @@ const char *sctp_cname(const sctp_subtype_t cid)
return "illegal chunk id";
if (cid.chunk <= SCTP_CID_BASE_MAX)
return sctp_cid_tbl[cid.chunk];

switch (cid.chunk) {
case SCTP_CID_ASCONF:
return "ASCONF";
Expand Down Expand Up @@ -154,7 +154,7 @@ const char *sctp_pname(const sctp_subtype_t id)

static const char *sctp_other_tbl[] = {
"NO_PENDING_TSN",
"ICMP_PROTO_UNREACH",
"ICMP_PROTO_UNREACH",
};

/* Lookup "other" debug name. */
Expand Down
2 changes: 1 addition & 1 deletion net/sctp/endpointola.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ static void sctp_endpoint_bh_rcv(struct work_struct *work)
chunk->transport->last_time_heard = jiffies;

error = sctp_do_sm(SCTP_EVENT_T_CHUNK, subtype, state,
ep, asoc, chunk, GFP_ATOMIC);
ep, asoc, chunk, GFP_ATOMIC);

if (error && chunk)
chunk->pdiscard = 1;
Expand Down
16 changes: 8 additions & 8 deletions net/sctp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ int sctp_rcv(struct sk_buff *skb)
nf_reset(skb);

if (sk_filter(sk, skb))
goto discard_release;
goto discard_release;

/* Create an SCTP packet structure. */
chunk = sctp_chunkify(skb, asoc, sk);
Expand Down Expand Up @@ -293,11 +293,11 @@ int sctp_rcv(struct sk_buff *skb)
int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb)
{
struct sctp_chunk *chunk = SCTP_INPUT_CB(skb)->chunk;
struct sctp_inq *inqueue = &chunk->rcvr->inqueue;
struct sctp_ep_common *rcvr = NULL;
struct sctp_inq *inqueue = &chunk->rcvr->inqueue;
struct sctp_ep_common *rcvr = NULL;
int backloged = 0;

rcvr = chunk->rcvr;
rcvr = chunk->rcvr;

/* If the rcvr is dead then the association or endpoint
* has been deleted and we can safely drop the chunk
Expand Down Expand Up @@ -347,7 +347,7 @@ int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb)
else
BUG();

return 0;
return 0;
}

static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb)
Expand Down Expand Up @@ -399,7 +399,7 @@ void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
* Normally, if PMTU discovery is disabled, an ICMP Fragmentation
* Needed will never be sent, but if a message was sent before
* PMTU discovery was disabled that was larger than the PMTU, it
* would not be fragmented, so it must be re-transmitted fragmented.
* would not be fragmented, so it must be re-transmitted fragmented.
*/
sctp_retransmit(&asoc->outqueue, t, SCTP_RTXR_PMTUD);
}
Expand All @@ -416,8 +416,8 @@ void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
*
*/
void sctp_icmp_proto_unreachable(struct sock *sk,
struct sctp_association *asoc,
struct sctp_transport *t)
struct sctp_association *asoc,
struct sctp_transport *t)
{
SCTP_DEBUG_PRINTK("%s\n", __FUNCTION__);

Expand Down
Loading

0 comments on commit d808ad9

Please sign in to comment.