mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-05-26 11:40:24 +02:00
net: pktgen: replace ENOTSUPP with EOPNOTSUPP
Replace ENOTSUPP with EOPNOTSUPP, fixes checkpatch hint WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP and e.g. $ echo "clone_skb 1" > /proc/net/pktgen/lo\@0 -bash: echo: write error: Unknown error 524 Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250219084527.20488-2-ps.report@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
1340461e51
commit
802fb6db9f
+3
-3
@@ -1198,7 +1198,7 @@ static ssize_t pktgen_if_write(struct file *file,
|
||||
if ((value > 0) &&
|
||||
((pkt_dev->xmit_mode == M_NETIF_RECEIVE) ||
|
||||
!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)))
|
||||
return -ENOTSUPP;
|
||||
return -EOPNOTSUPP;
|
||||
if (value > 0 && (pkt_dev->n_imix_entries > 0 ||
|
||||
!(pkt_dev->flags & F_SHARED)))
|
||||
return -EINVAL;
|
||||
@@ -1258,7 +1258,7 @@ static ssize_t pktgen_if_write(struct file *file,
|
||||
((pkt_dev->xmit_mode == M_QUEUE_XMIT) ||
|
||||
((pkt_dev->xmit_mode == M_START_XMIT) &&
|
||||
(!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)))))
|
||||
return -ENOTSUPP;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (value > 1 && !(pkt_dev->flags & F_SHARED))
|
||||
return -EINVAL;
|
||||
@@ -1303,7 +1303,7 @@ static ssize_t pktgen_if_write(struct file *file,
|
||||
} else if (strcmp(f, "netif_receive") == 0) {
|
||||
/* clone_skb set earlier, not supported in this mode */
|
||||
if (pkt_dev->clone_skb > 0)
|
||||
return -ENOTSUPP;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
pkt_dev->xmit_mode = M_NETIF_RECEIVE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user