projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6373ef1
)
docs/bpf: Fix sample code in MAP_TYPE_ARRAY docs
author
Donald Hunter
<donald.hunter@gmail.com>
Tue, 15 Nov 2022 09:59:10 +0000
(09:59 +0000)
committer
Alexei Starovoitov
<ast@kernel.org>
Wed, 16 Nov 2022 05:33:47 +0000
(21:33 -0800)
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>
Documentation/bpf/map_array.rst
patch
|
blob
|
history
diff --git
a/Documentation/bpf/map_array.rst
b/Documentation/bpf/map_array.rst
index b2cceb6c696b3d7d2d5b6df1be34390c227c2388..97bb803332543eae8e65f0cba9110c6dec6a6348 100644
(file)
--- 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;
}