diff options
| author | Joe Perches <joe@perches.com> | 2014-09-10 00:17:32 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-09-10 15:40:10 -0400 |
| commit | b167a37c7bbc6f7589f439ba7d9a49af5ad37ff5 (patch) | |
| tree | f4007da67ea5bdd707475df3150f592396219f9b | |
| parent | 47c4cfc37fb71e0fa801a4ed9228de83404abfce (diff) | |
netfilter: Convert pr_warning to pr_warn
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: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/netfilter/ipset/ip_set_core.c | 23 | ||||
| -rw-r--r-- | net/netfilter/ipset/ip_set_hash_gen.h | 12 | ||||
| -rw-r--r-- | net/netfilter/xt_connbytes.c | 2 | ||||
| -rw-r--r-- | net/netfilter/xt_hashlimit.c | 2 | ||||
| -rw-r--r-- | net/netfilter/xt_set.c | 36 |
5 files changed, 35 insertions, 40 deletions
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index ec8114fae50b..5593e97426c4 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c | |||
| @@ -101,7 +101,7 @@ load_settype(const char *name) | |||
| 101 | nfnl_unlock(NFNL_SUBSYS_IPSET); | 101 | nfnl_unlock(NFNL_SUBSYS_IPSET); |
| 102 | pr_debug("try to load ip_set_%s\n", name); | 102 | pr_debug("try to load ip_set_%s\n", name); |
| 103 | if (request_module("ip_set_%s", name) < 0) { | 103 | if (request_module("ip_set_%s", name) < 0) { |
| 104 | pr_warning("Can't find ip_set type %s\n", name); | 104 | pr_warn("Can't find ip_set type %s\n", name); |
| 105 | nfnl_lock(NFNL_SUBSYS_IPSET); | 105 | nfnl_lock(NFNL_SUBSYS_IPSET); |
| 106 | return false; | 106 | return false; |
| 107 | } | 107 | } |
| @@ -195,20 +195,19 @@ ip_set_type_register(struct ip_set_type *type) | |||
| 195 | int ret = 0; | 195 | int ret = 0; |
| 196 | 196 | ||
| 197 | if (type->protocol != IPSET_PROTOCOL) { | 197 | if (type->protocol != IPSET_PROTOCOL) { |
| 198 | pr_warning("ip_set type %s, family %s, revision %u:%u uses " | 198 | pr_warn("ip_set type %s, family %s, revision %u:%u uses wrong protocol version %u (want %u)\n", |
| 199 | "wrong protocol version %u (want %u)\n", | 199 | type->name, family_name(type->family), |
| 200 | type->name, family_name(type->family), | 200 | type->revision_min, type->revision_max, |
| 201 | type->revision_min, type->revision_max, | 201 | type->protocol, IPSET_PROTOCOL); |
| 202 | type->protocol, IPSET_PROTOCOL); | ||
| 203 | return -EINVAL; | 202 | return -EINVAL; |
| 204 | } | 203 | } |
| 205 | 204 | ||
| 206 | ip_set_type_lock(); | 205 | ip_set_type_lock(); |
| 207 | if (find_set_type(type->name, type->family, type->revision_min)) { | 206 | if (find_set_type(type->name, type->family, type->revision_min)) { |
| 208 | /* Duplicate! */ | 207 | /* Duplicate! */ |
| 209 | pr_warning("ip_set type %s, family %s with revision min %u " | 208 | pr_warn("ip_set type %s, family %s with revision min %u already registered!\n", |
| 210 | "already registered!\n", type->name, | 209 | type->name, family_name(type->family), |
| 211 | family_name(type->family), type->revision_min); | 210 | type->revision_min); |
| 212 | ret = -EINVAL; | 211 | ret = -EINVAL; |
| 213 | goto unlock; | 212 | goto unlock; |
| 214 | } | 213 | } |
| @@ -228,9 +227,9 @@ ip_set_type_unregister(struct ip_set_type *type) | |||
| 228 | { | 227 | { |
| 229 | ip_set_type_lock(); | 228 | ip_set_type_lock(); |
| 230 | if (!find_set_type(type->name, type->family, type->revision_min)) { | 229 | if (!find_set_type(type->name, type->family, type->revision_min)) { |
| 231 | pr_warning("ip_set type %s, family %s with revision min %u " | 230 | pr_warn("ip_set type %s, family %s with revision min %u not registered\n", |
| 232 | "not registered\n", type->name, | 231 | type->name, family_name(type->family), |
| 233 | family_name(type->family), type->revision_min); | 232 | type->revision_min); |
| 234 | goto unlock; | 233 | goto unlock; |
| 235 | } | 234 | } |
| 236 | list_del_rcu(&type->list); | 235 | list_del_rcu(&type->list); |
diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h index 61c7fb052802..80f49dfba555 100644 --- a/net/netfilter/ipset/ip_set_hash_gen.h +++ b/net/netfilter/ipset/ip_set_hash_gen.h | |||
| @@ -565,8 +565,8 @@ retry: | |||
| 565 | set->name, orig->htable_bits, htable_bits, orig); | 565 | set->name, orig->htable_bits, htable_bits, orig); |
| 566 | if (!htable_bits) { | 566 | if (!htable_bits) { |
| 567 | /* In case we have plenty of memory :-) */ | 567 | /* In case we have plenty of memory :-) */ |
| 568 | pr_warning("Cannot increase the hashsize of set %s further\n", | 568 | pr_warn("Cannot increase the hashsize of set %s further\n", |
| 569 | set->name); | 569 | set->name); |
| 570 | return -IPSET_ERR_HASH_FULL; | 570 | return -IPSET_ERR_HASH_FULL; |
| 571 | } | 571 | } |
| 572 | t = ip_set_alloc(sizeof(*t) | 572 | t = ip_set_alloc(sizeof(*t) |
| @@ -651,8 +651,8 @@ mtype_add(struct ip_set *set, void *value, const struct ip_set_ext *ext, | |||
| 651 | 651 | ||
| 652 | if (h->elements >= h->maxelem) { | 652 | if (h->elements >= h->maxelem) { |
| 653 | if (net_ratelimit()) | 653 | if (net_ratelimit()) |
| 654 | pr_warning("Set %s is full, maxelem %u reached\n", | 654 | pr_warn("Set %s is full, maxelem %u reached\n", |
| 655 | set->name, h->maxelem); | 655 | set->name, h->maxelem); |
| 656 | return -IPSET_ERR_HASH_FULL; | 656 | return -IPSET_ERR_HASH_FULL; |
| 657 | } | 657 | } |
| 658 | 658 | ||
| @@ -998,8 +998,8 @@ mtype_list(const struct ip_set *set, | |||
| 998 | nla_put_failure: | 998 | nla_put_failure: |
| 999 | nlmsg_trim(skb, incomplete); | 999 | nlmsg_trim(skb, incomplete); |
| 1000 | if (unlikely(first == cb->args[IPSET_CB_ARG0])) { | 1000 | if (unlikely(first == cb->args[IPSET_CB_ARG0])) { |
| 1001 | pr_warning("Can't list set %s: one bucket does not fit into " | 1001 | pr_warn("Can't list set %s: one bucket does not fit into a message. Please report it!\n", |
| 1002 | "a message. Please report it!\n", set->name); | 1002 | set->name); |
| 1003 | cb->args[IPSET_CB_ARG0] = 0; | 1003 | cb->args[IPSET_CB_ARG0] = 0; |
| 1004 | return -EMSGSIZE; | 1004 | return -EMSGSIZE; |
| 1005 | } | 1005 | } |
diff --git a/net/netfilter/xt_connbytes.c b/net/netfilter/xt_connbytes.c index 1e634615ab9d..d4bec261e74e 100644 --- a/net/netfilter/xt_connbytes.c +++ b/net/netfilter/xt_connbytes.c | |||
| @@ -120,7 +120,7 @@ static int connbytes_mt_check(const struct xt_mtchk_param *par) | |||
| 120 | * accounting is enabled, so complain in the hope that someone notices. | 120 | * accounting is enabled, so complain in the hope that someone notices. |
| 121 | */ | 121 | */ |
| 122 | if (!nf_ct_acct_enabled(par->net)) { | 122 | if (!nf_ct_acct_enabled(par->net)) { |
| 123 | pr_warning("Forcing CT accounting to be enabled\n"); | 123 | pr_warn("Forcing CT accounting to be enabled\n"); |
| 124 | nf_ct_set_acct(par->net, true); | 124 | nf_ct_set_acct(par->net, true); |
| 125 | } | 125 | } |
| 126 | 126 | ||
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 52eb3e03458d..05fbc2a0be46 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
| @@ -943,7 +943,7 @@ static int __init hashlimit_mt_init(void) | |||
| 943 | sizeof(struct dsthash_ent), 0, 0, | 943 | sizeof(struct dsthash_ent), 0, 0, |
| 944 | NULL); | 944 | NULL); |
| 945 | if (!hashlimit_cachep) { | 945 | if (!hashlimit_cachep) { |
| 946 | pr_warning("unable to create slab cache\n"); | 946 | pr_warn("unable to create slab cache\n"); |
| 947 | goto err2; | 947 | goto err2; |
| 948 | } | 948 | } |
| 949 | return 0; | 949 | return 0; |
diff --git a/net/netfilter/xt_set.c b/net/netfilter/xt_set.c index 80c2e2d603e0..cb70f6ec5695 100644 --- a/net/netfilter/xt_set.c +++ b/net/netfilter/xt_set.c | |||
| @@ -84,13 +84,12 @@ set_match_v0_checkentry(const struct xt_mtchk_param *par) | |||
| 84 | index = ip_set_nfnl_get_byindex(par->net, info->match_set.index); | 84 | index = ip_set_nfnl_get_byindex(par->net, info->match_set.index); |
| 85 | 85 | ||
| 86 | if (index == IPSET_INVALID_ID) { | 86 | if (index == IPSET_INVALID_ID) { |
| 87 | pr_warning("Cannot find set identified by id %u to match\n", | 87 | pr_warn("Cannot find set identified by id %u to match\n", |
| 88 | info->match_set.index); | 88 | info->match_set.index); |
| 89 | return -ENOENT; | 89 | return -ENOENT; |
| 90 | } | 90 | } |
| 91 | if (info->match_set.u.flags[IPSET_DIM_MAX-1] != 0) { | 91 | if (info->match_set.u.flags[IPSET_DIM_MAX-1] != 0) { |
| 92 | pr_warning("Protocol error: set match dimension " | 92 | pr_warn("Protocol error: set match dimension is over the limit!\n"); |
| 93 | "is over the limit!\n"); | ||
| 94 | ip_set_nfnl_put(par->net, info->match_set.index); | 93 | ip_set_nfnl_put(par->net, info->match_set.index); |
| 95 | return -ERANGE; | 94 | return -ERANGE; |
| 96 | } | 95 | } |
| @@ -134,13 +133,12 @@ set_match_v1_checkentry(const struct xt_mtchk_param *par) | |||
| 134 | index = ip_set_nfnl_get_byindex(par->net, info->match_set.index); | 133 | index = ip_set_nfnl_get_byindex(par->net, info->match_set.index); |
| 135 | 134 | ||
| 136 | if (index == IPSET_INVALID_ID) { | 135 | if (index == IPSET_INVALID_ID) { |
| 137 | pr_warning("Cannot find set identified by id %u to match\n", | 136 | pr_warn("Cannot find set identified by id %u to match\n", |
| 138 | info->match_set.index); | 137 | info->match_set.index); |
| 139 | return -ENOENT; | 138 | return -ENOENT; |
| 140 | } | 139 | } |
| 141 | if (info->match_set.dim > IPSET_DIM_MAX) { | 140 | if (info->match_set.dim > IPSET_DIM_MAX) { |
| 142 | pr_warning("Protocol error: set match dimension " | 141 | pr_warn("Protocol error: set match dimension is over the limit!\n"); |
| 143 | "is over the limit!\n"); | ||
| 144 | ip_set_nfnl_put(par->net, info->match_set.index); | 142 | ip_set_nfnl_put(par->net, info->match_set.index); |
| 145 | return -ERANGE; | 143 | return -ERANGE; |
| 146 | } | 144 | } |
| @@ -230,8 +228,8 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par) | |||
| 230 | if (info->add_set.index != IPSET_INVALID_ID) { | 228 | if (info->add_set.index != IPSET_INVALID_ID) { |
| 231 | index = ip_set_nfnl_get_byindex(par->net, info->add_set.index); | 229 | index = ip_set_nfnl_get_byindex(par->net, info->add_set.index); |
| 232 | if (index == IPSET_INVALID_ID) { | 2 | |
