libbpf: Fix a couple of typos
PATCH 1/1 libbpf: Fix a couple of typos
This change fixes a couple of typos that were encountered while studying the source code.
Signed-off-by Daniel Müller <[email protected]>
--- tools/lib/bpf/btf.c | 2 +- tools/lib/bpf/libbpf.h | 2 +- tools/lib/bpf/relo_core.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
tools/lib/bpf/btf.c +1 -1
@@ -130,7 +130,7 @@ static inline __u64 ptr_to_u64(const void *ptr)/* Ensure given dynamically allocated memory region pointed to by *data* with * capacity of *cap_cnt* elements each taking *elem_sz* bytes has enough -* memory to accomodate *add_cnt* new elements, assuming *cur_cnt* elements +* memory to accommodate *add_cnt* new elements, assuming *cur_cnt* elements * are already used. At most *max_cnt* elements can be ever allocated. * If necessary, memory is reallocated and all existing data is copied over, * new pointer to the memory region is stored at *data, new memory region
tools/lib/bpf/libbpf.h +1 -1
@@ -107,7 +107,7 @@ struct bpf_object_open_attr { };struct bpf_object_open_opts { -/* size of this struct, for forward/backward compatiblity */ +/* size of this struct, for forward/backward compatibility */ size_t sz;/* object name override, if provided: * - for object open from file, this will override setting object
tools/lib/bpf/relo_core.c +4 -4
@@ -167,7 +167,7 @@ static bool core_relo_is_enumval_based(enum bpf_core_relo_kind kind)* just a parsed access string representation): [0, 1, 2, 3]. * * High-level spec will capture only 3 points: -* - intial zero-index access by pointer (&s->... is the same as &s[0]...); +* - initial zero-index access by pointer (&s->... is the same as &s[0]...); * - field 'a' access (corresponds to '2' in low-level spec); * - array element #3 access (corresponds to '3' in low-level spec). *
@@ -1148,11 +1148,11 @@ int bpf_core_format_spec(char *buf, size_t buf_sz, const struct bpf_core_spec *s* 3. It is supported and expected that there might be multiple flavors * matching the spec. As long as all the specs resolve to the same set of * offsets across all candidates, there is no error. If there is any -* ambiguity, CO-RE relocation will fail. This is necessary to accomodate -* imprefection of BTF deduplication, which can cause slight duplication of +* ambiguity, CO-RE relocation will fail. This is necessary to accommodate +* imperfection of BTF deduplication, which can cause slight duplication of * the same BTF type, if some directly or indirectly referenced (by * pointer) type gets resolved to different actual types in different -* object files. If such situation occurs, deduplicated BTF will end up +* object files. If such a situation occurs, deduplicated BTF will end up * with two (or more) structurally identical types, which differ only in * types they refer to through pointer. This should be OK in most cases and * is not an error.
Signature · 1 line
2.30.2
Quoted 5 lines · Daniel Müller
This change fixes a couple of typos that were encountered while studying the source code.
Signed-off-by Daniel Müller <[email protected]>
Acked-by Song Liu <[email protected]>
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann <[email protected]>:
Quoted 9 lines · On Wed, 1 Jun 2022 15:40:25 +0000 you wrote:
This change fixes a couple of typos that were encountered while studying the source code.
Signed-off-by Daniel Müller <[email protected]>--- tools/lib/bpf/btf.c | 2 +- tools/lib/bpf/libbpf.h | 2 +- tools/lib/bpf/relo_core.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
Here is the summary with links:
- [bpf-next] libbpf: Fix a couple of typos
https://git.kernel.org/bpf/bpf-next/c/788542f2b407
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html