linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo
@ 2016-12-16 18:21 Ozgur Karatas
  2016-12-16 18:35 ` Joe Perches
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ozgur Karatas @ 2016-12-16 18:21 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, netdev


This patch fixed to keyboard typo, brackets not closed. 
I think, it should be close to parenthes.

Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org>
---
 tools/net/bpf_dbg.c       | 2 +-
 1 files changed, 1 insertion(+), 1 deletions(-)

diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c
index 4f254bc..f715f46 100644
--- a/tools/net/bpf_dbg.c
+++ b/tools/net/bpf_dbg.c
@@ -1213,7 +1213,7 @@ static int cmd_disassemble(char *line_string)
 
 	if (!bpf_prog_loaded())
 		return CMD_ERR;
-	if (strlen(line_string) > 0 &&
+	if (strlen(line_string) > 0 &&)
 	    (line = strtoul(line_string, NULL, 10)) < bpf_prog_len)
 		single_line = true;
 	if (single_line)
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo
  2016-12-16 18:21 [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Ozgur Karatas
@ 2016-12-16 18:35 ` Joe Perches
  2016-12-16 18:53   ` Ozgur Karatas
  2016-12-16 18:58   ` Ozgur Karatas
  2016-12-16 19:08 ` Sergei Shtylyov
  2016-12-16 19:31 ` Daniel Borkmann
  2 siblings, 2 replies; 7+ messages in thread
From: Joe Perches @ 2016-12-16 18:35 UTC (permalink / raw)
  To: Ozgur Karatas, David Miller; +Cc: linux-kernel, netdev

On Fri, 2016-12-16 at 20:21 +0200, Ozgur Karatas wrote:
> This patch fixed to keyboard typo, brackets not closed. 
> I think, it should be close to parenthes.

No.

Please compile and test your patches on your own system
before you send them.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo
  2016-12-16 18:35 ` Joe Perches
@ 2016-12-16 18:53   ` Ozgur Karatas
  2016-12-16 18:58   ` Ozgur Karatas
  1 sibling, 0 replies; 7+ messages in thread
From: Ozgur Karatas @ 2016-12-16 18:53 UTC (permalink / raw)
  To: Joe Perches, David Miller; +Cc: linux-kernel, netdev

16.12.2016, 20:35, "Joe Perches" <joe@perches.com>:
> On Fri, 2016-12-16 at 20:21 +0200, Ozgur Karatas wrote:
>>  This patch fixed to keyboard typo, brackets not closed.
>>  I think, it should be close to parenthes.
>
> No.
>
> Please compile and test your patches on your own system
> before you send them.

Dear Perches,

I have already tested and it was not a part of the code anyway. if there is no parentheses, the code works incorrectly and give a error. 
I'm sorry, have a little problem with my english but "line_string" variables would not equal NULL, 10. So the code it skips it and runs to "bpf_prog_len".
If it should be equal "0 &&" and already be completed (>) right?

if (strlen(line_string) > 0 &&
            (line = strtoul(line_string, NULL, 10)) < bpf_prog_len)

Testing:

$ make M=tools/
tools//Makefile:6: scripts/Makefile.include: No such file or directory
$ cp tools/scripts/Makefile.include scripts/Makefile
$ make M=tools/
  Building modules, stage 2.
  MODPOST 0 modules

I try to module (insmod) and worked.

Regards,

 ~Ozgur

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo
  2016-12-16 18:35 ` Joe Perches
  2016-12-16 18:53   ` Ozgur Karatas
@ 2016-12-16 18:58   ` Ozgur Karatas
  1 sibling, 0 replies; 7+ messages in thread
From: Ozgur Karatas @ 2016-12-16 18:58 UTC (permalink / raw)
  To: Joe Perches, David Miller; +Cc: linux-kernel, netdev

16.12.2016, 20:35, "Joe Perches" <joe@perches.com>:
> On Fri, 2016-12-16 at 20:21 +0200, Ozgur Karatas wrote:
>>  This patch fixed to keyboard typo, brackets not closed.
>>  I think, it should be close to parenthes.
>
> No.
>
> Please compile and test your patches on your own system
> before you send them.

Also, checkpatch script give a error, it should not forget.

$ ./scripts/checkpatch.pl --file --terse tools/net/bpf_dbg.c
tools/net/bpf_dbg.c:1216: ERROR: do not use assignment in if condition

After fix:

$ ./scripts/checkpatch.pl --file --terse tools/net/bpf_dbg.c 
total: 0 errors, 6 warnings, 1395 lines checked

Regards,

~Ozgur

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo
  2016-12-16 18:21 [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Ozgur Karatas
  2016-12-16 18:35 ` Joe Perches
@ 2016-12-16 19:08 ` Sergei Shtylyov
  2016-12-16 19:13   ` Ozgur Karatas
  2016-12-16 19:31 ` Daniel Borkmann
  2 siblings, 1 reply; 7+ messages in thread
From: Sergei Shtylyov @ 2016-12-16 19:08 UTC (permalink / raw)
  To: Ozgur Karatas, David Miller; +Cc: linux-kernel, netdev

Hello.

On 12/16/2016 09:21 PM, Ozgur Karatas wrote:

> This patch fixed to keyboard typo, brackets not closed.
> I think, it should be close to parenthes.
>
> Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org>
> ---
>  tools/net/bpf_dbg.c       | 2 +-
>  1 files changed, 1 insertion(+), 1 deletions(-)
>
> diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c
> index 4f254bc..f715f46 100644
> --- a/tools/net/bpf_dbg.c
> +++ b/tools/net/bpf_dbg.c
> @@ -1213,7 +1213,7 @@ static int cmd_disassemble(char *line_string)
>
>  	if (!bpf_prog_loaded())
>  		return CMD_ERR;
> -	if (strlen(line_string) > 0 &&
> +	if (strlen(line_string) > 0 &&)

    Have tried to you compile that? :-/

>  	    (line = strtoul(line_string, NULL, 10)) < bpf_prog_len)

    I think the code was correct before your patch...

>  		single_line = true;
>  	if (single_line)

MBR, Sergei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo
  2016-12-16 19:08 ` Sergei Shtylyov
@ 2016-12-16 19:13   ` Ozgur Karatas
  0 siblings, 0 replies; 7+ messages in thread
From: Ozgur Karatas @ 2016-12-16 19:13 UTC (permalink / raw)
  To: Sergei Shtylyov, David Miller; +Cc: linux-kernel, netdev



16.12.2016, 21:08, "Sergei Shtylyov" <sergei.shtylyov@cogentembedded.com>:
> Hello.

Hi

> On 12/16/2016 09:21 PM, Ozgur Karatas wrote:
>
>>  This patch fixed to keyboard typo, brackets not closed.
>>  I think, it should be close to parenthes.
>>
>>  Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org>
>>  ---
>>   tools/net/bpf_dbg.c | 2 +-
>>   1 files changed, 1 insertion(+), 1 deletions(-)
>>
>>  diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c
>>  index 4f254bc..f715f46 100644
>>  --- a/tools/net/bpf_dbg.c
>>  +++ b/tools/net/bpf_dbg.c
>>  @@ -1213,7 +1213,7 @@ static int cmd_disassemble(char *line_string)
>>
>>           if (!bpf_prog_loaded())
>>                   return CMD_ERR;
>>  - if (strlen(line_string) > 0 &&
>>  + if (strlen(line_string) > 0 &&)
>
>     Have tried to you compile that? :-/

Yes, i compiled but I apologize if there was NAK.
Also, checkpatch give a error.

I could be wrong, will review again.

Best Regards!

>>               (line = strtoul(line_string, NULL, 10)) < bpf_prog_len)
>
>     I think the code was correct before your patch...
>
>>                   single_line = true;
>>           if (single_line)
>
> MBR, Sergei

~Ozgur

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo
  2016-12-16 18:21 [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Ozgur Karatas
  2016-12-16 18:35 ` Joe Perches
  2016-12-16 19:08 ` Sergei Shtylyov
@ 2016-12-16 19:31 ` Daniel Borkmann
  2 siblings, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2016-12-16 19:31 UTC (permalink / raw)
  To: Ozgur Karatas, David Miller; +Cc: linux-kernel, netdev

On 12/16/2016 07:21 PM, Ozgur Karatas wrote:
>
> This patch fixed to keyboard typo, brackets not closed.
> I think, it should be close to parenthes.
>
> Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org>

NAK for obvious reasons ...

> ---
>   tools/net/bpf_dbg.c       | 2 +-
>   1 files changed, 1 insertion(+), 1 deletions(-)
>
> diff --git a/tools/net/bpf_dbg.c b/tools/net/bpf_dbg.c
> index 4f254bc..f715f46 100644
> --- a/tools/net/bpf_dbg.c
> +++ b/tools/net/bpf_dbg.c
> @@ -1213,7 +1213,7 @@ static int cmd_disassemble(char *line_string)
>
>   	if (!bpf_prog_loaded())
>   		return CMD_ERR;
> -	if (strlen(line_string) > 0 &&
> +	if (strlen(line_string) > 0 &&)
>   	    (line = strtoul(line_string, NULL, 10)) < bpf_prog_len)
>   		single_line = true;
>   	if (single_line)
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-12-16 19:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-16 18:21 [PATCH 1/1] tools: net: bpf_dbg.c fixed keyboard typo Ozgur Karatas
2016-12-16 18:35 ` Joe Perches
2016-12-16 18:53   ` Ozgur Karatas
2016-12-16 18:58   ` Ozgur Karatas
2016-12-16 19:08 ` Sergei Shtylyov
2016-12-16 19:13   ` Ozgur Karatas
2016-12-16 19:31 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).