diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2006-11-20 15:39:23 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:24:38 -0500 |
commit | 59348b19efebfd6a8d0791ff81d207b16594c94b (patch) | |
tree | a9212a7bf62bd594cf02d23b9e33eb45a46d414d /net/dccp/proto.c | |
parent | b1308dc015eb09cf094ca169296738a13ae049ad (diff) |
[DCCP]: Simplified conditions due to use of enum:8 states
This reaps the benefit of the earlier patch, which changed the type of
CCID 3 states to use enums, in that many conditions are now simplified
and the number of possible (unexpected) values is greatly reduced.
In a few instances, this also allowed to simplify pre-conditions; where
care has been taken to retain logical equivalence.
[DCCP]: Introduce a consistent BUG/WARN message scheme
This refines the existing set of DCCP messages so that
* BUG(), BUG_ON(), WARN_ON() have meaningful DCCP-specific counterparts
* DCCP_CRIT (for severe warnings) is not rate-limited
* DCCP_WARN() is introduced as rate-limited wrapper
Using these allows a faster and cleaner transition to their original
counterparts once the code has matured into a full DCCP implementation.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index a7f345c8d0db..3c44d502e5c1 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -1033,8 +1033,7 @@ static int __init dccp_init(void) | |||
1033 | } while (!dccp_hashinfo.ehash && --ehash_order > 0); | 1033 | } while (!dccp_hashinfo.ehash && --ehash_order > 0); |
1034 | 1034 | ||
1035 | if (!dccp_hashinfo.ehash) { | 1035 | if (!dccp_hashinfo.ehash) { |
1036 | printk(KERN_CRIT "Failed to allocate DCCP " | 1036 | DCCP_CRIT("Failed to allocate DCCP established hash table"); |
1037 | "established hash table\n"); | ||
1038 | goto out_free_bind_bucket_cachep; | 1037 | goto out_free_bind_bucket_cachep; |
1039 | } | 1038 | } |
1040 | 1039 | ||
@@ -1056,7 +1055,7 @@ static int __init dccp_init(void) | |||
1056 | } while (!dccp_hashinfo.bhash && --bhash_order >= 0); | 1055 | } while (!dccp_hashinfo.bhash && --bhash_order >= 0); |
1057 | 1056 | ||
1058 | if (!dccp_hashinfo.bhash) { | 1057 | if (!dccp_hashinfo.bhash) { |
1059 | printk(KERN_CRIT "Failed to allocate DCCP bind hash table\n"); | 1058 | DCCP_CRIT("Failed to allocate DCCP bind hash table"); |
1060 | goto out_free_dccp_ehash; | 1059 | goto out_free_dccp_ehash; |
1061 | } | 1060 | } |
1062 | 1061 | ||