]> granicus.if.org Git - ipset/commitdiff
netfilter: Convert pr_warning to pr_warn
authorJoe Perches <joe@perches.com>
Sun, 14 Sep 2014 18:57:03 +0000 (20:57 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sun, 14 Sep 2014 19:55:43 +0000 (21:55 +0200)
Use the more common pr_warn.

Other miscellanea:

o Coalesce formats
o Realign arguments

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/netfilter/ipset/ip_set_core.c
kernel/net/netfilter/ipset/ip_set_hash_gen.h
kernel/net/netfilter/xt_set.c

index 1599b181fe51734aa94c69f6b54ab556f1e351e5..e14255fc53d163a222b487d87ebd3587b9e215d4 100644 (file)
@@ -107,7 +107,7 @@ load_settype(const char *name)
        unlock_nfnl();
        pr_debug("try to load ip_set_%s\n", name);
        if (request_module("ip_set_%s", name) < 0) {
-               pr_warning("Can't find ip_set type %s\n", name);
+               pr_warn("Can't find ip_set type %s\n", name);
                lock_nfnl();
                return false;
        }
@@ -201,20 +201,19 @@ ip_set_type_register(struct ip_set_type *type)
        int ret = 0;
 
        if (type->protocol != IPSET_PROTOCOL) {
-               pr_warning("ip_set type %s, family %s, revision %u:%u uses "
-                          "wrong protocol version %u (want %u)\n",
-                          type->name, family_name(type->family),
-                          type->revision_min, type->revision_max,
-                          type->protocol, IPSET_PROTOCOL);
+               pr_warn("ip_set type %s, family %s, revision %u:%u uses wrong protocol version %u (want %u)\n",
+                       type->name, family_name(type->family),
+                       type->revision_min, type->revision_max,
+                       type->protocol, IPSET_PROTOCOL);
                return -EINVAL;
        }
 
        ip_set_type_lock();
        if (find_set_type(type->name, type->family, type->revision_min)) {
                /* Duplicate! */
-               pr_warning("ip_set type %s, family %s with revision min %u "
-                          "already registered!\n", type->name,
-                          family_name(type->family), type->revision_min);
+               pr_warn("ip_set type %s, family %s with revision min %u already registered!\n",
+                       type->name, family_name(type->family),
+                       type->revision_min);
                ret = -EINVAL;
                goto unlock;
        }
@@ -234,9 +233,9 @@ ip_set_type_unregister(struct ip_set_type *type)
 {
        ip_set_type_lock();
        if (!find_set_type(type->name, type->family, type->revision_min)) {
-               pr_warning("ip_set type %s, family %s with revision min %u "
-                          "not registered\n", type->name,
-                          family_name(type->family), type->revision_min);
+               pr_warn("ip_set type %s, family %s with revision min %u not registered\n",
+                       type->name, family_name(type->family),
+                       type->revision_min);
                goto unlock;
        }
        list_del_rcu(&type->list);
index 0de86ccb75ffd62ac4125161c090784b0457005f..c465907e4617eb92602084437ff7e651c87a56c1 100644 (file)
@@ -565,8 +565,8 @@ retry:
                 set->name, orig->htable_bits, htable_bits, orig);
        if (!htable_bits) {
                /* In case we have plenty of memory :-) */
-               pr_warning("Cannot increase the hashsize of set %s further\n",
-                          set->name);
+               pr_warn("Cannot increase the hashsize of set %s further\n",
+                       set->name);
                return -IPSET_ERR_HASH_FULL;
        }
        t = ip_set_alloc(sizeof(*t)
@@ -651,8 +651,8 @@ mtype_add(struct ip_set *set, void *value, const struct ip_set_ext *ext,
 
        if (h->elements >= h->maxelem) {
                if (net_ratelimit())
-                       pr_warning("Set %s is full, maxelem %u reached\n",
-                                  set->name, h->maxelem);
+                       pr_warn("Set %s is full, maxelem %u reached\n",
+                               set->name, h->maxelem);
                return -IPSET_ERR_HASH_FULL;
        }
 
@@ -1003,8 +1003,8 @@ mtype_list(const struct ip_set *set,
 nla_put_failure:
        nlmsg_trim(skb, incomplete);
        if (unlikely(first == cb->args[IPSET_CB_ARG0])) {
-               pr_warning("Can't list set %s: one bucket does not fit into "
-                          "a message. Please report it!\n", set->name);
+               pr_warn("Can't list set %s: one bucket does not fit into a message. Please report it!\n",
+                       set->name);
                cb->args[IPSET_CB_ARG0] = 0;
                return -EMSGSIZE;
        }
index f94229907f6a25524bd8997d0687b43dcc0ba886..ddcf4c724a5643cfa3838d6c79f183416f90c11a 100644 (file)
@@ -99,13 +99,12 @@ set_match_v0_checkentry(const struct xt_mtchk_param *par)
        index = ip_set_nfnl_get_byindex(XT_PAR_NET(par), info->match_set.index);
 
        if (index == IPSET_INVALID_ID) {
-               pr_warning("Cannot find set indentified by id %u to match\n",
-                          info->match_set.index);
+               pr_warn("Cannot find set indentified by id %u to match\n",
+                       info->match_set.index);
                return CHECK_FAIL(-ENOENT);
        }
        if (info->match_set.u.flags[IPSET_DIM_MAX-1] != 0) {
-               pr_warning("Protocol error: set match dimension "
-                          "is over the limit!\n");
+               pr_warn("Protocol error: set match dimension is over the limit!\n");
                ip_set_nfnl_put(XT_PAR_NET(par), info->match_set.index);
                return CHECK_FAIL(-ERANGE);
        }
@@ -149,13 +148,12 @@ set_match_v1_checkentry(const struct xt_mtchk_param *par)
        index = ip_set_nfnl_get_byindex(XT_PAR_NET(par), info->match_set.index);
 
        if (index == IPSET_INVALID_ID) {
-               pr_warning("Cannot find set indentified by id %u to match\n",
-                          info->match_set.index);
+               pr_warn("Cannot find set indentified by id %u to match\n",
+                       info->match_set.index);
                return CHECK_FAIL(-ENOENT);
        }
        if (info->match_set.dim > IPSET_DIM_MAX) {
-               pr_warning("Protocol error: set match dimension "
-                          "is over the limit!\n");
+               pr_warn("Protocol error: set match dimension is over the limit!\n");
                ip_set_nfnl_put(XT_PAR_NET(par), info->match_set.index);
                return CHECK_FAIL(-ERANGE);
        }
@@ -256,8 +254,8 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
                index = ip_set_nfnl_get_byindex(XT_PAR_NET(par),
                                                info->add_set.index);
                if (index == IPSET_INVALID_ID) {
-                       pr_warning("Cannot find add_set index %u as target\n",
-                                  info->add_set.index);
+                       pr_warn("Cannot find add_set index %u as target\n",
+                               info->add_set.index);
                        return CHECK_FAIL(-ENOENT);
                }
        }
@@ -266,8 +264,8 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
                index = ip_set_nfnl_get_byindex(XT_PAR_NET(par),
                                                info->del_set.index);
                if (index == IPSET_INVALID_ID) {
-                       pr_warning("Cannot find del_set index %u as target\n",
-                                  info->del_set.index);
+                       pr_warn("Cannot find del_set index %u as target\n",
+                               info->del_set.index);
                        if (info->add_set.index != IPSET_INVALID_ID)
                                ip_set_nfnl_put(XT_PAR_NET(par),
                                                info->add_set.index);
@@ -276,8 +274,7 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
        }
        if (info->add_set.u.flags[IPSET_DIM_MAX-1] != 0 ||
            info->del_set.u.flags[IPSET_DIM_MAX-1] != 0) {
-               pr_warning("Protocol error: SET target dimension "
-                          "is over the limit!\n");
+               pr_warn("Protocol error: SET target dimension is over the limit!\n");
                if (info->add_set.index != IPSET_INVALID_ID)
                        ip_set_nfnl_put(XT_PAR_NET(par), info->add_set.index);
                if (info->del_set.index != IPSET_INVALID_ID)
@@ -334,8 +331,8 @@ set_target_v1_checkentry(const struct xt_tgchk_param *par)
                index = ip_set_nfnl_get_byindex(XT_PAR_NET(par),
                                                info->add_set.index);
                if (index == IPSET_INVALID_ID) {
-                       pr_warning("Cannot find add_set index %u as target\n",
-                                  info->add_set.index);
+                       pr_warn("Cannot find add_set index %u as target\n",
+                               info->add_set.index);
                        return CHECK_FAIL(-ENOENT);
                }
        }
@@ -344,8 +341,8 @@ set_target_v1_checkentry(const struct xt_tgchk_param *par)
                index = ip_set_nfnl_get_byindex(XT_PAR_NET(par),
                                                info->del_set.index);
                if (index == IPSET_INVALID_ID) {
-                       pr_warning("Cannot find del_set index %u as target\n",
-                                  info->del_set.index);
+                       pr_warn("Cannot find del_set index %u as target\n",
+                               info->del_set.index);
                        if (info->add_set.index != IPSET_INVALID_ID)
                                ip_set_nfnl_put(XT_PAR_NET(par),
                                                info->add_set.index);
@@ -354,8 +351,7 @@ set_target_v1_checkentry(const struct xt_tgchk_param *par)
        }
        if (info->add_set.dim > IPSET_DIM_MAX ||
            info->del_set.dim > IPSET_DIM_MAX) {
-               pr_warning("Protocol error: SET target dimension "
-                          "is over the limit!\n");
+               pr_warn("Protocol error: SET target dimension is over the limit!\n");
                if (info->add_set.index != IPSET_INVALID_ID)
                        ip_set_nfnl_put(XT_PAR_NET(par), info->add_set.index);
                if (info->del_set.index != IPSET_INVALID_ID)
@@ -491,8 +487,7 @@ set_target_v3_checkentry(const struct xt_tgchk_param *par)
                     !(par->hook_mask & (1 << NF_INET_FORWARD |
                                         1 << NF_INET_LOCAL_OUT |
                                         1 << NF_INET_POST_ROUTING))) {
-                       pr_warn("mapping of prio or/and queue is allowed only"
-                               "from OUTPUT/FORWARD/POSTROUTING chains\n");
+                       pr_warn("mapping of prio or/and queue is allowed only from OUTPUT/FORWARD/POSTROUTING chains\n");
                        return CHECK_FAIL(-EINVAL);
                }
                index = ip_set_nfnl_get_byindex(XT_PAR_NET(par),
@@ -513,8 +508,7 @@ set_target_v3_checkentry(const struct xt_tgchk_param *par)
        if (info->add_set.dim > IPSET_DIM_MAX ||
            info->del_set.dim > IPSET_DIM_MAX ||
            info->map_set.dim > IPSET_DIM_MAX) {
-               pr_warn("Protocol error: SET target dimension "
-                       "is over the limit!\n");
+               pr_warn("Protocol error: SET target dimension is over the limit!\n");
                if (info->add_set.index != IPSET_INVALID_ID)
                        ip_set_nfnl_put(XT_PAR_NET(par), info->add_set.index);
                if (info->del_set.index != IPSET_INVALID_ID)