Skip to contentSkip to conversation

bpf: Fix typo in comments in verifier

PATCH In review Kuee K1r0a 2 participants 2 messages Jul 18, 2022

Subsystems (2)
lore
Share & tools
lore

Kuee K1r0a

author
#0 lore raw

PATCH 1/1 bpf: Fix typo in comments in verifier

Replace 'then' with 'than'.

Fixes f4d7e40a5b71 ("bpf: introduce function calls (verification)")
---
 kernel/bpf/verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/verifier.c +1 -1
index 0efbac0fd126..4da1a7c7657a 100644
@@ -1167,7 +1167,7 @@ static int copy_verifier_state(struct bpf_verifier_state *dst_state,
 		return -ENOMEM;
 	dst_state->jmp_history_cnt = src->jmp_history_cnt;
 
-	/* if dst has more stack frames then src frame, free them */
+	/* if dst has more stack frames than src frame, free them */
 	for (i = src->curframe + 1; i <= dst_state->curframe; i++) {
 		free_func_state(dst_state->frame[i]);
 		dst_state->frame[i] = NULL;
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · On Mon, Jul 18, 2022 at 02:52:31PM +0800, Kuee K1r0a wrote:

Replace 'then' with 'than'.

Fixes f4d7e40a5b71 ("bpf: introduce function calls (verification)")
---
 kernel/bpf/verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/verifier.c +0 -0
index 0efbac0fd126..4da1a7c7657a 100644

kernel/bpf/verifier.c static int copy_verifier_state(struct bpf_verifier_state *dst_state, · line 1170

Quoted 5 lines
kernel/bpf/verifier.c +1 -1
@@ -1167,7 +1167,7 @@ static int copy_verifier_state(struct bpf_verifier_state *dst_state,
 		return -ENOMEM;
 	dst_state->jmp_history_cnt = src->jmp_history_cnt;
 
-	/* if dst has more stack frames then src frame, free them */
+	/* if dst has more stack frames than src frame, free them */

Should we use plural as well, 'src frames'?

[...]

I believe the patch prefix should indicate which branch the patch targets as well. E.g., [PATCH bpf-next]. Looks good to me otherwise.