Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709471 > unrolled thread

[PATCH] openvswitch: Remove unnecessary newlines from OVS_NLERR uses

Started byJoe Perches <joe@perches.com>
First post2017-08-11 13:30 +0200
Last post2017-08-12 00:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] openvswitch: Remove unnecessary newlines from OVS_NLERR uses Joe Perches <joe@perches.com> - 2017-08-11 13:30 +0200
    Re: [PATCH] openvswitch: Remove unnecessary newlines from OVS_NLERR uses Joe Stringer <joe@ovn.org> - 2017-08-11 18:20 +0200
    Re: [PATCH] openvswitch: Remove unnecessary newlines from  OVS_NLERR uses David Miller <davem@davemloft.net> - 2017-08-12 00:00 +0200

#1709471 — [PATCH] openvswitch: Remove unnecessary newlines from OVS_NLERR uses

FromJoe Perches <joe@perches.com>
Date2017-08-11 13:30 +0200
Subject[PATCH] openvswitch: Remove unnecessary newlines from OVS_NLERR uses
Message-ID<udgiB-2Us-1@gated-at.bofh.it>
OVS_NLERR already adds a newline so these just add blank
lines to the logging.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/openvswitch/conntrack.c    | 14 +++++---------
 net/openvswitch/flow_netlink.c |  2 +-
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 03859e386b47..30d632509f82 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -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;
@@ -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;
@@ -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) {
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index f07d10ac35d8..e8eb427ce6d1 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -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;
 		}
-- 
2.10.0.rc2.1.g053435c

[toc] | [next] | [standalone]


#1709805

FromJoe Stringer <joe@ovn.org>
Date2017-08-11 18:20 +0200
Message-ID<udkPg-5Kw-15@gated-at.bofh.it>
In reply to#1709471
On 11 August 2017 at 04:26, Joe Perches <joe@perches.com> wrote:
> OVS_NLERR already adds a newline so these just add blank
> lines to the logging.
>
> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Joe Stringer <joe@ovn.org>

[toc] | [prev] | [next] | [standalone]


#1709991 — Re: [PATCH] openvswitch: Remove unnecessary newlines from OVS_NLERR uses

FromDavid Miller <davem@davemloft.net>
Date2017-08-12 00:00 +0200
SubjectRe: [PATCH] openvswitch: Remove unnecessary newlines from OVS_NLERR uses
Message-ID<udq8i-la-3@gated-at.bofh.it>
In reply to#1709471
From: Joe Perches <joe@perches.com>
Date: Fri, 11 Aug 2017 04:26:26 -0700

> OVS_NLERR already adds a newline so these just add blank
> lines to the logging.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied to net-next.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web