]> err.no Git - linux-2.6/blobdiff - net/dccp/feat.c
Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerp...
[linux-2.6] / net / dccp / feat.c
index e808c418c992fce931aca81938d5ee6faa7d2a5b..95b6927ec6530eef17fab12cc5784d101fa7ded9 100644 (file)
@@ -25,11 +25,11 @@ int dccp_feat_change(struct dccp_minisock *dmsk, u8 type, u8 feature,
        dccp_feat_debug(type, feature, *val);
 
        if (!dccp_feat_is_valid_type(type)) {
-               pr_info("option type %d invalid in negotiation\n", type);
+               DCCP_WARN("option type %d invalid in negotiation\n", type);
                return 1;
        }
        if (!dccp_feat_is_valid_length(type, feature, len)) {
-               pr_info("invalid length %d\n", len);
+               DCCP_WARN("invalid length %d\n", len);
                return 1;
        }
        /* XXX add further sanity checks */
@@ -169,7 +169,8 @@ static int dccp_feat_reconcile(struct sock *sk, struct dccp_opt_pend *opt,
                        break;
 
                default:
-                       WARN_ON(1); /* XXX implement res */
+                       DCCP_BUG("Fell through, feat=%d", opt->dccpop_feat);
+                       /* XXX implement res */
                        return -EFAULT;
                }
 
@@ -328,7 +329,7 @@ static void dccp_feat_empty_confirm(struct dccp_minisock *dmsk,
        switch (type) {
        case DCCPO_CHANGE_L: opt->dccpop_type = DCCPO_CONFIRM_R; break;
        case DCCPO_CHANGE_R: opt->dccpop_type = DCCPO_CONFIRM_L; break;
-       default:             pr_info("invalid type %d\n", type); return;
+       default:             DCCP_WARN("invalid type %d\n", type); return;
 
        }
        opt->dccpop_feat = feature;
@@ -426,7 +427,7 @@ int dccp_feat_confirm_recv(struct sock *sk, u8 type, u8 feature,
        switch (type) {
        case DCCPO_CONFIRM_L: t = DCCPO_CHANGE_R; break;
        case DCCPO_CONFIRM_R: t = DCCPO_CHANGE_L; break;
-       default:              pr_info("invalid type %d\n", type);
+       default:              DCCP_WARN("invalid type %d\n", type);
                              return 1;
 
        }
@@ -609,7 +610,7 @@ const char *dccp_feat_typename(const u8 type)
        case DCCPO_CHANGE_R:  return("ChangeR");
        case DCCPO_CONFIRM_R: return("ConfirmR");
        /* the following case must not appear in feature negotation  */
-       default:              dccp_pr_debug("unknown type %d [BUG!]\n", type);
+       default:              dccp_pr_debug("unknown type %d [BUG!]\n", type);
        }
        return NULL;
 }