[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>
This commit is contained in:
committed by
David S. Miller
parent
b1308dc015
commit
59348b19ef
@@ -461,9 +461,6 @@ int dccp_ackvec_parse(struct sock *sk, const struct sk_buff *skb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char dccp_ackvec_slab_msg[] __initdata =
|
||||
KERN_CRIT "DCCP: Unable to create ack vectors slab caches\n";
|
||||
|
||||
int __init dccp_ackvec_init(void)
|
||||
{
|
||||
dccp_ackvec_slab = kmem_cache_create("dccp_ackvec",
|
||||
@@ -485,7 +482,7 @@ out_destroy_slab:
|
||||
kmem_cache_destroy(dccp_ackvec_slab);
|
||||
dccp_ackvec_slab = NULL;
|
||||
out_err:
|
||||
printk(dccp_ackvec_slab_msg);
|
||||
DCCP_CRIT("Unable to create Ack Vector slab cache");
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user