[v2,06/18] bpf: fix spelling in comments

Message ID 20210909181048.176255-7-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Fix spelling errors |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Sept. 9, 2021, 6:10 p.m. UTC
  Found by running codespell on the bpf implementation.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/bpf/bpf_jit_x86.c  | 2 +-
 lib/bpf/bpf_validate.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Dmitry Kozlyuk Sept. 9, 2021, 7:49 p.m. UTC | #1
2021-09-09 11:10 (UTC-0700), Stephen Hemminger:
[...]
> diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
> index 7b1291b382e9..3e7d3d730637 100644
> --- a/lib/bpf/bpf_validate.c
> +++ b/lib/bpf/bpf_validate.c
> @@ -1723,7 +1723,7 @@ static const struct bpf_ins_check ins_chk[UINT8_MAX + 1] = {
>  
>  /*
>   * make sure that instruction syntax is valid,
> - * and it fields don't violate partciular instrcution type restrictions.
> + * and it fields don't violate particular instruction type restrictions.

Also "it" -> "its".

>   */
>  static const char *
>  check_syntax(const struct ebpf_insn *ins)
> @@ -1981,7 +1981,7 @@ validate(struct bpf_verifier *bvf)
>  
>  		/*
>  		 * construct CFG, jcc nodes have to outgoing edges,
> -		 * 'exit' nodes - none, all others nodes have exaclty one
> +		 * 'exit' nodes - none, all others nodes have exactly one

Also "others" -> "other".

>  		 * outgoing edge.
>  		 */
>  		switch (ins->code) {
  
Stephen Hemminger Sept. 9, 2021, 9:51 p.m. UTC | #2
On Thu, 9 Sep 2021 22:49:56 +0300
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:

> 2021-09-09 11:10 (UTC-0700), Stephen Hemminger:
> [...]
> > diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
> > index 7b1291b382e9..3e7d3d730637 100644
> > --- a/lib/bpf/bpf_validate.c
> > +++ b/lib/bpf/bpf_validate.c
> > @@ -1723,7 +1723,7 @@ static const struct bpf_ins_check ins_chk[UINT8_MAX + 1] = {
> >  
> >  /*
> >   * make sure that instruction syntax is valid,
> > - * and it fields don't violate partciular instrcution type restrictions.
> > + * and it fields don't violate particular instruction type restrictions.  
> 
> Also "it" -> "its".
> 
> >   */
> >  static const char *
> >  check_syntax(const struct ebpf_insn *ins)
> > @@ -1981,7 +1981,7 @@ validate(struct bpf_verifier *bvf)
> >  
> >  		/*
> >  		 * construct CFG, jcc nodes have to outgoing edges,
> > -		 * 'exit' nodes - none, all others nodes have exaclty one
> > +		 * 'exit' nodes - none, all others nodes have exactly one  
> 
> Also "others" -> "other".
> 
> >  		 * outgoing edge.
> >  		 */
> >  		switch (ins->code) {  
> 

Good catch, codespell and others don't check grammar.
  

Patch

diff --git a/lib/bpf/bpf_jit_x86.c b/lib/bpf/bpf_jit_x86.c
index aa22ea78a01d..518513376a67 100644
--- a/lib/bpf/bpf_jit_x86.c
+++ b/lib/bpf/bpf_jit_x86.c
@@ -1245,7 +1245,7 @@  emit_epilog(struct bpf_jit_state *st)
 	uint32_t i;
 	int32_t spil, ofs;
 
-	/* if we allready have an epilog generate a jump to it */
+	/* if we already have an epilog generate a jump to it */
 	if (st->exit.num++ != 0) {
 		emit_abs_jmp(st, st->exit.off);
 		return;
diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 7b1291b382e9..3e7d3d730637 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -1723,7 +1723,7 @@  static const struct bpf_ins_check ins_chk[UINT8_MAX + 1] = {
 
 /*
  * make sure that instruction syntax is valid,
- * and it fields don't violate partciular instrcution type restrictions.
+ * and it fields don't violate particular instruction type restrictions.
  */
 static const char *
 check_syntax(const struct ebpf_insn *ins)
@@ -1981,7 +1981,7 @@  validate(struct bpf_verifier *bvf)
 
 		/*
 		 * construct CFG, jcc nodes have to outgoing edges,
-		 * 'exit' nodes - none, all others nodes have exaclty one
+		 * 'exit' nodes - none, all others nodes have exactly one
 		 * outgoing edge.
 		 */
 		switch (ins->code) {