Skip to content

Commit b87f9fe

Browse files
Ye Bindavem330
authored andcommitted
hsr: avoid newline at end of message in NL_SET_ERR_MSG_MOD
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0ddaa27 commit b87f9fe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎net/hsr/hsr_netlink.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,22 @@ static int hsr_newlink(struct net *src_net, struct net_device *dev,
7676
proto = nla_get_u8(data[IFLA_HSR_PROTOCOL]);
7777

7878
if (proto >= HSR_PROTOCOL_MAX) {
79-
NL_SET_ERR_MSG_MOD(extack, "Unsupported protocol\n");
79+
NL_SET_ERR_MSG_MOD(extack, "Unsupported protocol");
8080
return -EINVAL;
8181
}
8282

8383
if (!data[IFLA_HSR_VERSION]) {
8484
proto_version = HSR_V0;
8585
} else {
8686
if (proto == HSR_PROTOCOL_PRP) {
87-
NL_SET_ERR_MSG_MOD(extack, "PRP version unsupported\n");
87+
NL_SET_ERR_MSG_MOD(extack, "PRP version unsupported");
8888
return -EINVAL;
8989
}
9090

9191
proto_version = nla_get_u8(data[IFLA_HSR_VERSION]);
9292
if (proto_version > HSR_V1) {
9393
NL_SET_ERR_MSG_MOD(extack,
94-
"Only HSR version 0/1 supported\n");
94+
"Only HSR version 0/1 supported");
9595
return -EINVAL;
9696
}
9797
}

0 commit comments

Comments
 (0)