[PATCH bpf-next v1] docs/bpf: Fix sample code in MAP_TYPE_ARRAY docs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 Documentation/bpf/map_array.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
     }
-- 
2.35.1




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux