diff mbox series

[bpf-next,1/5] samples/bpf: Fix typo in comment

Message ID 1524101646-6544-2-git-send-email-leo.yan@linaro.org
State New
Headers show
Series samples/bpf: Minor fixes and cleanup | expand

Commit Message

Leo Yan April 19, 2018, 1:34 a.m. UTC
Fix typo by replacing 'iif' with 'if'.

Signed-off-by: Leo Yan <leo.yan@linaro.org>

---
 samples/bpf/bpf_load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1

Comments

Jesper Dangaard Brouer April 20, 2018, 12:10 p.m. UTC | #1
On Thu, 19 Apr 2018 09:34:02 +0800 Leo Yan <leo.yan@linaro.org> wrote:

> Fix typo by replacing 'iif' with 'if'.

> 

> Signed-off-by: Leo Yan <leo.yan@linaro.org>

> ---

>  samples/bpf/bpf_load.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c

> index bebe418..28e4678 100644

> --- a/samples/bpf/bpf_load.c

> +++ b/samples/bpf/bpf_load.c

> @@ -393,7 +393,7 @@ static int load_elf_maps_section(struct bpf_map_data *maps, int maps_shndx,

>  			continue;

>  		if (sym[nr_maps].st_shndx != maps_shndx)

>  			continue;

> -		/* Only increment iif maps section */

> +		/* Only increment if maps section */

>  		nr_maps++;

>  	}


This was actually not a typo from my side.

With 'iif' I mean 'if and only if' ... but it doesn't matter much.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer
Daniel Thompson April 20, 2018, 1:21 p.m. UTC | #2
On Fri, Apr 20, 2018 at 02:10:04PM +0200, Jesper Dangaard Brouer wrote:
> 

> On Thu, 19 Apr 2018 09:34:02 +0800 Leo Yan <leo.yan@linaro.org> wrote:

> 

> > Fix typo by replacing 'iif' with 'if'.

> > 

> > Signed-off-by: Leo Yan <leo.yan@linaro.org>

> > ---

> >  samples/bpf/bpf_load.c | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> > 

> > diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c

> > index bebe418..28e4678 100644

> > --- a/samples/bpf/bpf_load.c

> > +++ b/samples/bpf/bpf_load.c

> > @@ -393,7 +393,7 @@ static int load_elf_maps_section(struct bpf_map_data *maps, int maps_shndx,

> >  			continue;

> >  		if (sym[nr_maps].st_shndx != maps_shndx)

> >  			continue;

> > -		/* Only increment iif maps section */

> > +		/* Only increment if maps section */

> >  		nr_maps++;

> >  	}

> 

> This was actually not a typo from my side.

> 

> With 'iif' I mean 'if and only if' ... but it doesn't matter much.


I think 'if and only if' is more commonly abbreviated 'iff' isn't it?


Daniel.
Jesper Dangaard Brouer April 20, 2018, 1:52 p.m. UTC | #3
On Fri, 20 Apr 2018 14:21:16 +0100
Daniel Thompson <daniel.thompson@linaro.org> wrote:

> On Fri, Apr 20, 2018 at 02:10:04PM +0200, Jesper Dangaard Brouer wrote:

> > 

> > On Thu, 19 Apr 2018 09:34:02 +0800 Leo Yan <leo.yan@linaro.org> wrote:

> >   

> > > Fix typo by replacing 'iif' with 'if'.

> > > 

> > > Signed-off-by: Leo Yan <leo.yan@linaro.org>

> > > ---

> > >  samples/bpf/bpf_load.c | 2 +-

> > >  1 file changed, 1 insertion(+), 1 deletion(-)

> > > 

> > > diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c

> > > index bebe418..28e4678 100644

> > > --- a/samples/bpf/bpf_load.c

> > > +++ b/samples/bpf/bpf_load.c

> > > @@ -393,7 +393,7 @@ static int load_elf_maps_section(struct bpf_map_data *maps, int maps_shndx,

> > >  			continue;

> > >  		if (sym[nr_maps].st_shndx != maps_shndx)

> > >  			continue;

> > > -		/* Only increment iif maps section */

> > > +		/* Only increment if maps section */

> > >  		nr_maps++;

> > >  	}  

> > 

> > This was actually not a typo from my side.

> > 

> > With 'iif' I mean 'if and only if' ... but it doesn't matter much.  

> 

> I think 'if and only if' is more commonly abbreviated 'iff' isn't it?


Ah, yes![1]  -- then it *is* actually a typo! - LOL

I'm fine with changing this to "if" :-)


[1] https://en.wikipedia.org/wiki/If_and_only_if

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer
Leo Yan April 25, 2018, 10:01 a.m. UTC | #4
On Fri, Apr 20, 2018 at 03:52:13PM +0200, Jesper Dangaard Brouer wrote:
> On Fri, 20 Apr 2018 14:21:16 +0100

> Daniel Thompson <daniel.thompson@linaro.org> wrote:

> 

> > On Fri, Apr 20, 2018 at 02:10:04PM +0200, Jesper Dangaard Brouer wrote:

> > > 

> > > On Thu, 19 Apr 2018 09:34:02 +0800 Leo Yan <leo.yan@linaro.org> wrote:

> > >   

> > > > Fix typo by replacing 'iif' with 'if'.

> > > > 

> > > > Signed-off-by: Leo Yan <leo.yan@linaro.org>

> > > > ---

> > > >  samples/bpf/bpf_load.c | 2 +-

> > > >  1 file changed, 1 insertion(+), 1 deletion(-)

> > > > 

> > > > diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c

> > > > index bebe418..28e4678 100644

> > > > --- a/samples/bpf/bpf_load.c

> > > > +++ b/samples/bpf/bpf_load.c

> > > > @@ -393,7 +393,7 @@ static int load_elf_maps_section(struct bpf_map_data *maps, int maps_shndx,

> > > >  			continue;

> > > >  		if (sym[nr_maps].st_shndx != maps_shndx)

> > > >  			continue;

> > > > -		/* Only increment iif maps section */

> > > > +		/* Only increment if maps section */

> > > >  		nr_maps++;

> > > >  	}  

> > > 

> > > This was actually not a typo from my side.

> > > 

> > > With 'iif' I mean 'if and only if' ... but it doesn't matter much.  

> > 

> > I think 'if and only if' is more commonly abbreviated 'iff' isn't it?

> 

> Ah, yes![1]  -- then it *is* actually a typo! - LOL

> 

> I'm fine with changing this to "if" :-)


Thanks for the reviewing, Daniel & Jesper.
I also learn it from the discussion :)

> [1] https://en.wikipedia.org/wiki/If_and_only_if

> 

> -- 

> Best regards,

>   Jesper Dangaard Brouer

>   MSc.CS, Principal Kernel Engineer at Red Hat

>   LinkedIn: http://www.linkedin.com/in/brouer
diff mbox series

Patch

diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c
index bebe418..28e4678 100644
--- a/samples/bpf/bpf_load.c
+++ b/samples/bpf/bpf_load.c
@@ -393,7 +393,7 @@  static int load_elf_maps_section(struct bpf_map_data *maps, int maps_shndx,
 			continue;
 		if (sym[nr_maps].st_shndx != maps_shndx)
 			continue;
-		/* Only increment iif maps section */
+		/* Only increment if maps section */
 		nr_maps++;
 	}