Skip to content

Commit

Permalink
openvswitch: Remove unnecessary newlines from OVS_NLERR uses
Browse files Browse the repository at this point in the history
OVS_NLERR already adds a newline so these just add blank
lines to the logging.

Signed-off-by: Joe Perches <[email protected]>
Acked-by: Joe Stringer <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
JoePerches authored and davem330 committed Aug 11, 2017
1 parent 12acb13 commit 0ed80da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions net/openvswitch/conntrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,15 +1180,13 @@ static int parse_nat(const struct nlattr *attr,
int type = nla_type(a);

if (type > OVS_NAT_ATTR_MAX) {
OVS_NLERR(log,
"Unknown NAT attribute (type=%d, max=%d).\n",
OVS_NLERR(log, "Unknown NAT attribute (type=%d, max=%d)",
type, OVS_NAT_ATTR_MAX);
return -EINVAL;
}

if (nla_len(a) != ovs_nat_attr_lens[type][ip_vers]) {
OVS_NLERR(log,
"NAT attribute type %d has unexpected length (%d != %d).\n",
OVS_NLERR(log, "NAT attribute type %d has unexpected length (%d != %d)",
type, nla_len(a),
ovs_nat_attr_lens[type][ip_vers]);
return -EINVAL;
Expand All @@ -1198,9 +1196,7 @@ static int parse_nat(const struct nlattr *attr,
case OVS_NAT_ATTR_SRC:
case OVS_NAT_ATTR_DST:
if (info->nat) {
OVS_NLERR(log,
"Only one type of NAT may be specified.\n"
);
OVS_NLERR(log, "Only one type of NAT may be specified");
return -ERANGE;
}
info->nat |= OVS_CT_NAT;
Expand Down Expand Up @@ -1245,13 +1241,13 @@ static int parse_nat(const struct nlattr *attr,
break;

default:
OVS_NLERR(log, "Unknown nat attribute (%d).\n", type);
OVS_NLERR(log, "Unknown nat attribute (%d)", type);
return -EINVAL;
}
}

if (rem > 0) {
OVS_NLERR(log, "NAT attribute has %d unknown bytes.\n", rem);
OVS_NLERR(log, "NAT attribute has %d unknown bytes", rem);
return -EINVAL;
}
if (!info->nat) {
Expand Down
2 changes: 1 addition & 1 deletion net/openvswitch/flow_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ static int ovs_key_from_nlattrs(struct net *net, struct sw_flow_match *match,
}

if (!is_mask && ipv6_key->ipv6_label & htonl(0xFFF00000)) {
OVS_NLERR(log, "IPv6 flow label %x is out of range (max=%x).\n",
OVS_NLERR(log, "IPv6 flow label %x is out of range (max=%x)",
ntohl(ipv6_key->ipv6_label), (1 << 20) - 1);
return -EINVAL;
}
Expand Down

0 comments on commit 0ed80da

Please sign in to comment.