Skip to content

Commit bd4d67f

Browse files
Lin YikaiAlexei Starovoitov
authored andcommitted
libbpf: fix some typos in libbpf
Hi, fix some spelling errors in libbpf, the details are as follows: -in the code comments: termintaing->terminating architecutre->architecture requring->requiring recored->recoded sanitise->sanities allowd->allowed abover->above see bpf_udst_arg()->see bpf_usdt_arg() Signed-off-by: Lin Yikai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent a86857d commit bd4d67f

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

tools/lib/bpf/bpf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct bpf_prog_load_opts {
100100
__u32 log_level;
101101
__u32 log_size;
102102
char *log_buf;
103-
/* output: actual total log contents size (including termintaing zero).
103+
/* output: actual total log contents size (including terminating zero).
104104
* It could be both larger than original log_size (if log was
105105
* truncated), or smaller (if log buffer wasn't filled completely).
106106
* If kernel doesn't support this feature, log_size is left unchanged.
@@ -129,7 +129,7 @@ struct bpf_btf_load_opts {
129129
char *log_buf;
130130
__u32 log_level;
131131
__u32 log_size;
132-
/* output: actual total log contents size (including termintaing zero).
132+
/* output: actual total log contents size (including terminating zero).
133133
* It could be both larger than original log_size (if log was
134134
* truncated), or smaller (if log buffer wasn't filled completely).
135135
* If kernel doesn't support this feature, log_size is left unchanged.

tools/lib/bpf/bpf_tracing.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ struct pt_regs;
480480
#endif
481481
/*
482482
* Similarly, syscall-specific conventions might differ between function call
483-
* conventions within each architecutre. All supported architectures pass
483+
* conventions within each architecture. All supported architectures pass
484484
* either 6 or 7 syscall arguments in registers.
485485
*
486486
* See syscall(2) manpage for succinct table with information on each arch.
@@ -658,7 +658,7 @@ struct pt_regs;
658658
* BPF_PROG is a convenience wrapper for generic tp_btf/fentry/fexit and
659659
* similar kinds of BPF programs, that accept input arguments as a single
660660
* pointer to untyped u64 array, where each u64 can actually be a typed
661-
* pointer or integer of different size. Instead of requring user to write
661+
* pointer or integer of different size. Instead of requiring user to write
662662
* manual casts and work with array elements by index, BPF_PROG macro
663663
* allows user to declare a list of named and typed input arguments in the
664664
* same syntax as for normal C function. All the casting is hidden and

tools/lib/bpf/btf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4192,7 +4192,7 @@ static bool btf_dedup_identical_structs(struct btf_dedup *d, __u32 id1, __u32 id
41924192
* and canonical graphs are not compatible structurally, whole graphs are
41934193
* incompatible. If types are structurally equivalent (i.e., all information
41944194
* except referenced type IDs is exactly the same), a mapping from `canon_id` to
4195-
* a `cand_id` is recored in hypothetical mapping (`btf_dedup->hypot_map`).
4195+
* a `cand_id` is recoded in hypothetical mapping (`btf_dedup->hypot_map`).
41964196
* If a type references other types, then those referenced types are checked
41974197
* for equivalence recursively.
41984198
*

tools/lib/bpf/libbpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ static char *internal_map_name(struct bpf_object *obj, const char *real_name)
18481848
snprintf(map_name, sizeof(map_name), "%.*s%.*s", pfx_len, obj->name,
18491849
sfx_len, real_name);
18501850

1851-
/* sanitise map name to characters allowed by kernel */
1851+
/* sanities map name to characters allowed by kernel */
18521852
for (p = map_name; *p && p < map_name + sizeof(map_name); p++)
18531853
if (!isalnum(*p) && *p != '_' && *p != '.')
18541854
*p = '_';

tools/lib/bpf/linker.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ static bool glob_sym_btf_matches(const char *sym_name, bool exact,
14131413
return true;
14141414
case BTF_KIND_PTR:
14151415
/* just validate overall shape of the referenced type, so no
1416-
* contents comparison for struct/union, and allowd fwd vs
1416+
* contents comparison for struct/union, and allowed fwd vs
14171417
* struct/union
14181418
*/
14191419
exact = false;
@@ -1962,7 +1962,7 @@ static int linker_append_elf_sym(struct bpf_linker *linker, struct src_obj *obj,
19621962

19631963
/* If existing symbol is a strong resolved symbol, bail out,
19641964
* because we lost resolution battle have nothing to
1965-
* contribute. We already checked abover that there is no
1965+
* contribute. We already checked above that there is no
19661966
* strong-strong conflict. We also already tightened binding
19671967
* and visibility, so nothing else to contribute at that point.
19681968
*/

tools/lib/bpf/usdt.bpf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ enum __bpf_usdt_arg_type {
3939
struct __bpf_usdt_arg_spec {
4040
/* u64 scalar interpreted depending on arg_type, see below */
4141
__u64 val_off;
42-
/* arg location case, see bpf_udst_arg() for details */
42+
/* arg location case, see bpf_usdt_arg() for details */
4343
enum __bpf_usdt_arg_type arg_type;
4444
/* offset of referenced register within struct pt_regs */
4545
short reg_off;

0 commit comments

Comments
 (0)