Skip to content

Commit e3ac815

Browse files
Tom RixNobody
authored andcommitted
bpf: cleanup comments
Add leading space to spdx tag Use // for spdx c file comment Replacements resereved to reserved inbetween to in between everytime to every time intutivie to intuitive currenct to current encontered to encountered referenceing to referencing upto to up to exectuted to executed Signed-off-by: Tom Rix <[email protected]> Acked-by: Song Liu <[email protected]>
1 parent 02368b2 commit e3ac815

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

kernel/bpf/bpf_local_storage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ bool bpf_selem_unlink_storage_nolock(struct bpf_local_storage *local_storage,
136136
* will be done by the caller.
137137
*
138138
* Although the unlock will be done under
139-
* rcu_read_lock(), it is more intutivie to
139+
* rcu_read_lock(), it is more intuitive to
140140
* read if the freeing of the storage is done
141141
* after the raw_spin_unlock_bh(&local_storage->lock).
142142
*

kernel/bpf/btf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* SPDX-License-Identifier: GPL-2.0 */
1+
// SPDX-License-Identifier: GPL-2.0
22
/* Copyright (c) 2018 Facebook */
33

44
#include <uapi/linux/btf.h>
@@ -2547,7 +2547,7 @@ static int btf_ptr_resolve(struct btf_verifier_env *env,
25472547
*
25482548
* We now need to continue from the last-resolved-ptr to
25492549
* ensure the last-resolved-ptr will not referring back to
2550-
* the currenct ptr (t).
2550+
* the current ptr (t).
25512551
*/
25522552
if (btf_type_is_modifier(next_type)) {
25532553
const struct btf_type *resolved_type;
@@ -6148,7 +6148,7 @@ int btf_type_snprintf_show(const struct btf *btf, u32 type_id, void *obj,
61486148

61496149
btf_type_show(btf, type_id, obj, (struct btf_show *)&ssnprintf);
61506150

6151-
/* If we encontered an error, return it. */
6151+
/* If we encountered an error, return it. */
61526152
if (ssnprintf.show.state.status)
61536153
return ssnprintf.show.state.status;
61546154

kernel/bpf/cgroup.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ int cgroup_bpf_prog_query(const union bpf_attr *attr,
10311031
* __cgroup_bpf_run_filter_skb() - Run a program for packet filtering
10321032
* @sk: The socket sending or receiving traffic
10331033
* @skb: The skb that is being sent or received
1034-
* @type: The type of program to be exectuted
1034+
* @type: The type of program to be executed
10351035
*
10361036
* If no socket is passed, or the socket is not of type INET or INET6,
10371037
* this function does nothing and returns 0.
@@ -1094,7 +1094,7 @@ EXPORT_SYMBOL(__cgroup_bpf_run_filter_skb);
10941094
/**
10951095
* __cgroup_bpf_run_filter_sk() - Run a program on a sock
10961096
* @sk: sock structure to manipulate
1097-
* @type: The type of program to be exectuted
1097+
* @type: The type of program to be executed
10981098
*
10991099
* socket is passed is expected to be of type INET or INET6.
11001100
*
@@ -1119,7 +1119,7 @@ EXPORT_SYMBOL(__cgroup_bpf_run_filter_sk);
11191119
* provided by user sockaddr
11201120
* @sk: sock struct that will use sockaddr
11211121
* @uaddr: sockaddr struct provided by user
1122-
* @type: The type of program to be exectuted
1122+
* @type: The type of program to be executed
11231123
* @t_ctx: Pointer to attach type specific context
11241124
* @flags: Pointer to u32 which contains higher bits of BPF program
11251125
* return value (OR'ed together).
@@ -1166,7 +1166,7 @@ EXPORT_SYMBOL(__cgroup_bpf_run_filter_sock_addr);
11661166
* @sock_ops: bpf_sock_ops_kern struct to pass to program. Contains
11671167
* sk with connection information (IP addresses, etc.) May not contain
11681168
* cgroup info if it is a req sock.
1169-
* @type: The type of program to be exectuted
1169+
* @type: The type of program to be executed
11701170
*
11711171
* socket passed is expected to be of type INET or INET6.
11721172
*

kernel/bpf/hashtab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ __htab_map_lookup_and_delete_batch(struct bpf_map *map,
16361636
value_size = size * num_possible_cpus();
16371637
total = 0;
16381638
/* while experimenting with hash tables with sizes ranging from 10 to
1639-
* 1000, it was observed that a bucket can have upto 5 entries.
1639+
* 1000, it was observed that a bucket can have up to 5 entries.
16401640
*/
16411641
bucket_size = 5;
16421642

kernel/bpf/helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ struct bpf_hrtimer {
10931093
struct bpf_timer_kern {
10941094
struct bpf_hrtimer *timer;
10951095
/* bpf_spin_lock is used here instead of spinlock_t to make
1096-
* sure that it always fits into space resereved by struct bpf_timer
1096+
* sure that it always fits into space reserved by struct bpf_timer
10971097
* regardless of LOCKDEP and spinlock debug flags.
10981098
*/
10991099
struct bpf_spin_lock lock;

kernel/bpf/local_storage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//SPDX-License-Identifier: GPL-2.0
1+
// SPDX-License-Identifier: GPL-2.0
22
#include <linux/bpf-cgroup.h>
33
#include <linux/bpf.h>
44
#include <linux/bpf_local_storage.h>

kernel/bpf/reuseport_array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static void reuseport_array_free(struct bpf_map *map)
143143

144144
/*
145145
* Once reaching here, all sk->sk_user_data is not
146-
* referenceing this "array". "array" can be freed now.
146+
* referencing this "array". "array" can be freed now.
147147
*/
148148
bpf_map_area_free(array);
149149
}

kernel/bpf/syscall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2566,7 +2566,7 @@ static int bpf_link_alloc_id(struct bpf_link *link)
25662566
* pre-allocated resources are to be freed with bpf_cleanup() call. All the
25672567
* transient state is passed around in struct bpf_link_primer.
25682568
* This is preferred way to create and initialize bpf_link, especially when
2569-
* there are complicated and expensive operations inbetween creating bpf_link
2569+
* there are complicated and expensive operations in between creating bpf_link
25702570
* itself and attaching it to BPF hook. By using bpf_link_prime() and
25712571
* bpf_link_settle() kernel code using bpf_link doesn't have to perform
25722572
* expensive (and potentially failing) roll back operations in a rare case

kernel/bpf/trampoline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void *bpf_jit_alloc_exec_page(void)
4545

4646
set_vm_flush_reset_perms(image);
4747
/* Keep image as writeable. The alternative is to keep flipping ro/rw
48-
* everytime new program is attached or detached.
48+
* every time new program is attached or detached.
4949
*/
5050
set_memory_x((long)image, 1);
5151
return image;

0 commit comments

Comments
 (0)