summaryrefslogtreecommitdiffstats
path: root/Documentation/bpf
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2023-07-26 11:25:43 +0200
committerAlexei Starovoitov <ast@kernel.org>2023-07-28 02:31:49 +0200
commit10d78a66a5f29fbbde1b09b5139c17c436b08c6e (patch)
tree0d667de303c0e94fbfc1fc6fe3729e0b9c678d8b /Documentation/bpf
parentbpf: work around -Wuninitialized warning (diff)
downloadlinux-10d78a66a5f29fbbde1b09b5139c17c436b08c6e.tar.xz
linux-10d78a66a5f29fbbde1b09b5139c17c436b08c6e.zip
bpf, docs: fix BPF_NEG entry in instruction-set.rst
This patch fixes the documentation of the BPF_NEG instruction to denote that it does not use the source register operand. Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com> Acked-by: Dave Thaler <dthaler@microsoft.com> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20230726092543.6362-1-jose.marchesi@oracle.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'Documentation/bpf')
-rw-r--r--Documentation/bpf/standardization/instruction-set.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/bpf/standardization/instruction-set.rst b/Documentation/bpf/standardization/instruction-set.rst
index 751e657973f0..6ef5534b410a 100644
--- a/Documentation/bpf/standardization/instruction-set.rst
+++ b/Documentation/bpf/standardization/instruction-set.rst
@@ -165,7 +165,7 @@ BPF_OR 0x40 dst \|= src
BPF_AND 0x50 dst &= src
BPF_LSH 0x60 dst <<= (src & mask)
BPF_RSH 0x70 dst >>= (src & mask)
-BPF_NEG 0x80 dst = -src
+BPF_NEG 0x80 dst = -dst
BPF_MOD 0x90 dst = (src != 0) ? (dst % src) : dst
BPF_XOR 0xa0 dst ^= src
BPF_MOV 0xb0 dst = src