netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hsr: avoid newline at end of message in NL_SET_ERR_MSG_MOD
@ 2020-09-09  9:38 Ye Bin
  2020-09-09 18:16 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ye Bin @ 2020-09-09  9:38 UTC (permalink / raw)
  To: netdev; +Cc: Ye Bin

clean follow coccicheck warning:
net//hsr/hsr_netlink.c:94:8-42: WARNING avoid newline at end of message
in NL_SET_ERR_MSG_MOD
net//hsr/hsr_netlink.c:87:30-57: WARNING avoid newline at end of message
in NL_SET_ERR_MSG_MOD
net//hsr/hsr_netlink.c:79:29-53: WARNING avoid newline at end of message
in NL_SET_ERR_MSG_MOD

Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 net/hsr/hsr_netlink.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c
index 06c3cd988760..0e4681cf71db 100644
--- a/net/hsr/hsr_netlink.c
+++ b/net/hsr/hsr_netlink.c
@@ -76,7 +76,7 @@ static int hsr_newlink(struct net *src_net, struct net_device *dev,
 		proto = nla_get_u8(data[IFLA_HSR_PROTOCOL]);
 
 	if (proto >= HSR_PROTOCOL_MAX) {
-		NL_SET_ERR_MSG_MOD(extack, "Unsupported protocol\n");
+		NL_SET_ERR_MSG_MOD(extack, "Unsupported protocol");
 		return -EINVAL;
 	}
 
@@ -84,14 +84,14 @@ static int hsr_newlink(struct net *src_net, struct net_device *dev,
 		proto_version = HSR_V0;
 	} else {
 		if (proto == HSR_PROTOCOL_PRP) {
-			NL_SET_ERR_MSG_MOD(extack, "PRP version unsupported\n");
+			NL_SET_ERR_MSG_MOD(extack, "PRP version unsupported");
 			return -EINVAL;
 		}
 
 		proto_version = nla_get_u8(data[IFLA_HSR_VERSION]);
 		if (proto_version > HSR_V1) {
 			NL_SET_ERR_MSG_MOD(extack,
-					   "Only HSR version 0/1 supported\n");
+					   "Only HSR version 0/1 supported");
 			return -EINVAL;
 		}
 	}
-- 
2.16.2.dirty


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hsr: avoid newline at end of message in NL_SET_ERR_MSG_MOD
  2020-09-09  9:38 [PATCH] hsr: avoid newline at end of message in NL_SET_ERR_MSG_MOD Ye Bin
@ 2020-09-09 18:16 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-09-09 18:16 UTC (permalink / raw)
  To: yebin10; +Cc: netdev

From: Ye Bin <yebin10@huawei.com>
Date: Wed, 9 Sep 2020 17:38:21 +0800

> clean follow coccicheck warning:
> net//hsr/hsr_netlink.c:94:8-42: WARNING avoid newline at end of message
> in NL_SET_ERR_MSG_MOD
> net//hsr/hsr_netlink.c:87:30-57: WARNING avoid newline at end of message
> in NL_SET_ERR_MSG_MOD
> net//hsr/hsr_netlink.c:79:29-53: WARNING avoid newline at end of message
> in NL_SET_ERR_MSG_MOD
> 
> Signed-off-by: Ye Bin <yebin10@huawei.com>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-09 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-09  9:38 [PATCH] hsr: avoid newline at end of message in NL_SET_ERR_MSG_MOD Ye Bin
2020-09-09 18:16 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).