diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-13 19:34:54 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:59:26 -0400 |
commit | 7690af3fff7633e40b1b9950eb8489129251d074 (patch) | |
tree | 92fa07234a7547c4a7dd74877972b5a291673fcf /net/dccp/proto.c | |
parent | c173437669967301facff151bfeb7bae67354e4c (diff) |
[DCCP]: Just reflow the source code to fit in 80 columns
Andrew Morton should be happy now 8)
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 51 |
1 files changed, 30 insertions, 21 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 877c1e0e3c48..46dd489f66cf 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -255,12 +255,16 @@ int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
255 | 255 | ||
256 | /* FIXME */ | 256 | /* FIXME */ |
257 | #if 0 | 257 | #if 0 |
258 | /* Are we at urgent data? Stop if we have read anything or have SIGURG pending. */ | 258 | /* |
259 | * Are we at urgent data? Stop if we have read anything or | ||
260 | * have SIGURG pending. | ||
261 | */ | ||
259 | if (tp->urg_data && tp->urg_seq == *seq) { | 262 | if (tp->urg_data && tp->urg_seq == *seq) { |
260 | if (copied) | 263 | if (copied) |
261 | break; | 264 | break; |
262 | if (signal_pending(current)) { | 265 | if (signal_pending(current)) { |
263 | copied = timeo ? sock_intr_errno(timeo) : -EAGAIN; | 266 | copied = timeo ? sock_intr_errno(timeo) : |
267 | -EAGAIN; | ||
264 | break; | 268 | break; |
265 | } | 269 | } |
266 | } | 270 | } |
@@ -285,7 +289,8 @@ int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
285 | dccp_pr_debug("found fin ok!\n"); | 289 | dccp_pr_debug("found fin ok!\n"); |
286 | goto found_fin_ok; | 290 | goto found_fin_ok; |
287 | } | 291 | } |
288 | dccp_pr_debug("packet_type=%s\n", dccp_packet_name(dh->dccph_type)); | 292 | dccp_pr_debug("packet_type=%s\n", |
293 | dccp_packet_name(dh->dccph_type)); | ||
289 | BUG_TRAP(flags & MSG_PEEK); | 294 | BUG_TRAP(flags & MSG_PEEK); |
290 | skb = skb->next; | 295 | skb = skb->next; |
291 | } while (skb != (struct sk_buff *)&sk->sk_receive_queue); | 296 | } while (skb != (struct sk_buff *)&sk->sk_receive_queue); |
@@ -439,16 +444,16 @@ out: | |||
439 | } | 444 | } |
440 | 445 | ||
441 | static const unsigned char dccp_new_state[] = { | 446 | static const unsigned char dccp_new_state[] = { |
442 | /* current state: new state: action: */ | 447 | /* current state: new state: action: */ |
443 | [0] = DCCP_CLOSED, | 448 | [0] = DCCP_CLOSED, |
444 | [DCCP_OPEN] = DCCP_CLOSING | DCCP_ACTION_FIN, | 449 | [DCCP_OPEN] = DCCP_CLOSING | DCCP_ACTION_FIN, |
445 | [DCCP_REQUESTING] = DCCP_CLOSED, | 450 | [DCCP_REQUESTING] = DCCP_CLOSED, |
446 | [DCCP_PARTOPEN] = DCCP_CLOSING | DCCP_ACTION_FIN, | 451 | [DCCP_PARTOPEN] = DCCP_CLOSING | DCCP_ACTION_FIN, |
447 | [DCCP_LISTEN] = DCCP_CLOSED, | 452 | [DCCP_LISTEN] = DCCP_CLOSED, |
448 | [DCCP_RESPOND] = DCCP_CLOSED, | 453 | [DCCP_RESPOND] = DCCP_CLOSED, |
449 | [DCCP_CLOSING] = DCCP_CLOSED, | 454 | [DCCP_CLOSING] = DCCP_CLOSED, |
450 | [DCCP_TIME_WAIT] = DCCP_CLOSED, | 455 | [DCCP_TIME_WAIT] = DCCP_CLOSED, |
451 | [DCCP_CLOSED] = DCCP_CLOSED, | 456 | [DCCP_CLOSED] = DCCP_CLOSED, |
452 | }; | 457 | }; |
453 | 458 | ||
454 | static int dccp_close_state(struct sock *sk) | 459 | static int dccp_close_state(struct sock *sk) |
@@ -541,7 +546,8 @@ struct proto_ops inet_dccp_ops = { | |||
541 | .getname = inet_getname, | 546 | .getname = inet_getname, |
542 | .poll = sock_no_poll, | 547 | .poll = sock_no_poll, |
543 | .ioctl = inet_ioctl, | 548 | .ioctl = inet_ioctl, |
544 | .listen = inet_dccp_listen, /* FIXME: work on inet_listen to rename it to sock_common_listen */ | 549 | /* FIXME: work on inet_listen to rename it to sock_common_listen */ |
550 | .listen = inet_dccp_listen, | ||
545 | .shutdown = inet_shutdown, | 551 | .shutdown = inet_shutdown, |
546 | .setsockopt = sock_common_setsockopt, | 552 | .setsockopt = sock_common_setsockopt, |
547 | .getsockopt = sock_common_getsockopt, | 553 | .getsockopt = sock_common_getsockopt, |
@@ -638,10 +644,10 @@ static int __init dccp_init(void) | |||
638 | if (rc) | 644 | if (rc) |
639 | goto out; | 645 | goto out; |
640 | 646 | ||
641 | dccp_hashinfo.bind_bucket_cachep = kmem_cache_create("dccp_bind_bucket", | 647 | dccp_hashinfo.bind_bucket_cachep = |
642 | sizeof(struct inet_bind_bucket), | 648 | kmem_cache_create("dccp_bind_bucket", |
643 | 0, SLAB_HWCACHE_ALIGN, | 649 | sizeof(struct inet_bind_bucket), 0, |
644 | NULL, NULL); | 650 | SLAB_HWCACHE_ALIGN, NULL, NULL); |
645 | if (!dccp_hashinfo.bind_bucket_cachep) | 651 | if (!dccp_hashinfo.bind_bucket_cachep) |
646 | goto out_proto_unregister; | 652 | goto out_proto_unregister; |
647 | 653 | ||
@@ -657,14 +663,16 @@ static int __init dccp_init(void) | |||
657 | goal = num_physpages >> (23 - PAGE_SHIFT); | 663 | goal = num_physpages >> (23 - PAGE_SHIFT); |
658 | 664 | ||
659 | if (thash_entries) | 665 | if (thash_entries) |
660 | goal = (thash_entries * sizeof(struct inet_ehash_bucket)) >> PAGE_SHIFT; | 666 | goal = (thash_entries * |
667 | sizeof(struct inet_ehash_bucket)) >> PAGE_SHIFT; | ||
661 | for (ehash_order = 0; (1UL << ehash_order) < goal; ehash_order++) | 668 | for (ehash_order = 0; (1UL << ehash_order) < goal; ehash_order++) |
662 | ; | 669 | ; |
663 | do { | 670 | do { |
664 | dccp_hashinfo.ehash_size = (1UL << ehash_order) * PAGE_SIZE / | 671 | dccp_hashinfo.ehash_size = (1UL << ehash_order) * PAGE_SIZE / |
665 | sizeof(struct inet_ehash_bucket); | 672 | sizeof(struct inet_ehash_bucket); |
666 | dccp_hashinfo.ehash_size >>= 1; | 673 | dccp_hashinfo.ehash_size >>= 1; |
667 | while (dccp_hashinfo.ehash_size & (dccp_hashinfo.ehash_size - 1)) | 674 | while (dccp_hashinfo.ehash_size & |
675 | (dccp_hashinfo.ehash_size - 1)) | ||
668 | dccp_hashinfo.ehash_size--; | 676 | dccp_hashinfo.ehash_size--; |
669 | dccp_hashinfo.ehash = (struct inet_ehash_bucket *) | 677 | dccp_hashinfo.ehash = (struct inet_ehash_bucket *) |
670 | __get_free_pages(GFP_ATOMIC, ehash_order); | 678 | __get_free_pages(GFP_ATOMIC, ehash_order); |
@@ -686,7 +694,8 @@ static int __init dccp_init(void) | |||
686 | do { | 694 | do { |
687 | dccp_hashinfo.bhash_size = (1UL << bhash_order) * PAGE_SIZE / | 695 | dccp_hashinfo.bhash_size = (1UL << bhash_order) * PAGE_SIZE / |
688 | sizeof(struct inet_bind_hashbucket); | 696 | sizeof(struct inet_bind_hashbucket); |
689 | if ((dccp_hashinfo.bhash_size > (64 * 1024)) && bhash_order > 0) | 697 | if ((dccp_hashinfo.bhash_size > (64 * 1024)) && |
698 | bhash_order > 0) | ||
690 | continue; | 699 | continue; |
691 | dccp_hashinfo.bhash = (struct inet_bind_hashbucket *) | 700 | dccp_hashinfo.bhash = (struct inet_bind_hashbucket *) |
692 | __get_free_pages(GFP_ATOMIC, bhash_order); | 701 | __get_free_pages(GFP_ATOMIC, bhash_order); |