Skip to contentSkip to conversation

docs/bpf: Fix sample code in MAP_TYPE_ARRAY docs

PATCH Applied Donald Hunter 2 participants 2 messages Nov 15, 2022 – Nov 16, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 Documentation/bpf/map_array.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/bpf/map_array.rst +1 -1
index b2cceb6c696b..97bb80333254 100644
@@ -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;
     }
Signature · 1 line
2.35.1
#1 lore raw
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Hello:

This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Quoted 7 lines · On Tue, 15 Nov 2022 09:59:10 +0000 you wrote:

Remove mistaken & from code example in MAP_TYPE_ARRAY docs

Fixes 1cfa97b30c5a ("bpf, docs: Document BPF_MAP_TYPE_ARRAY")
---
 Documentation/bpf/map_array.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [bpf-next,v1] docs/bpf: Fix sample code in MAP_TYPE_ARRAY docs

    https://git.kernel.org/bpf/bpf-next/c/e0eb60829a6e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html