summaryrefslogtreecommitdiffstats
path: root/Documentation/bpf
diff options
context:
space:
mode:
authorDonald Hunter <donald.hunter@gmail.com>2022-11-15 10:59:10 +0100
committerAlexei Starovoitov <ast@kernel.org>2022-11-16 06:33:47 +0100
commite0eb60829a6eb249d7c6cccef0605c3004004bef (patch)
tree69d733c03aa9663caf16a5efcb346334a8a3e51e /Documentation/bpf
parentMerge branch 'propagate nullness information for reg to reg comparisons' (diff)
downloadlinux-e0eb60829a6eb249d7c6cccef0605c3004004bef.tar.xz
linux-e0eb60829a6eb249d7c6cccef0605c3004004bef.zip
docs/bpf: Fix sample code in MAP_TYPE_ARRAY docs
Remove mistaken & from code example in MAP_TYPE_ARRAY docs Fixes: 1cfa97b30c5a ("bpf, docs: Document BPF_MAP_TYPE_ARRAY") Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20221115095910.86407-1-donald.hunter@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'Documentation/bpf')
-rw-r--r--Documentation/bpf/map_array.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/bpf/map_array.rst b/Documentation/bpf/map_array.rst
index b2cceb6c696b..97bb80333254 100644
--- a/Documentation/bpf/map_array.rst
+++ b/Documentation/bpf/map_array.rst
@@ -119,7 +119,7 @@ This example BPF program shows how to access an array element.
index = ip.protocol;
value = bpf_map_lookup_elem(&my_map, &index);
if (value)
- __sync_fetch_and_add(&value, skb->len);
+ __sync_fetch_and_add(value, skb->len);
return 0;
}