mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Alexander Kapshuk <alexander.kapshuk@gmail.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
	kbuild test robot <lkp@intel.com>,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH RESEND] gen-insn-attr-x86.awk: Fix regexp warnings
Date: Mon, 23 Sep 2019 12:31:39 +0200	[thread overview]
Message-ID: <20190923103139.GD15355@zn.tnic> (raw)
In-Reply-To: <20190922150328.6722-1-alexander.kapshuk@gmail.com>

+ Masami.

On Sun, Sep 22, 2019 at 06:03:28PM +0300, Alexander Kapshuk wrote:
> This patch fixes the regexp warnings shown below:

Avoid having "This patch" or "This commit" in the commit message. It is
tautologically useless.

Also, do

$ git grep 'This patch' Documentation/process

for more details.

> GEN      /home/sasha/torvalds/tools/objtool/arch/x86/lib/inat-tables.c
> awk: ../arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape sequence `\:' is not a known regexp operator
> awk: ../arch/x86/tools/gen-insn-attr-x86.awk:350: (FILENAME=../arch/x86/lib/x86-opcode-map.txt FNR=41) warning: regexp escape sequence `\&' is not a known regexp operator
> 
> The ':' and '&' characters need not escaping when used in string constants
> as part of regular expressions.

I could use a reasoning here, as in, "gawk manual doesn't have those two
characters in the list here:

https://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html"

or so.

> 
> [Test-run]
> awk -f arch/x86/tools/gen-insn-attr-x86.awk \
> 	arch/x86/lib/x86-opcode-map.txt >../tmp/inat-tables.c
> 
> diff arch/x86/lib/inat-tables.c ~/tmp/inat-tables.c; echo $?
> 0
> 
> awk -f tools/arch/x86/tools/gen-insn-attr-x86.awk \
> 	tools/arch/x86/lib/x86-opcode-map.txt >../tmp/inat-tables.c
> 
> diff tools/objtool/arch/x86/lib/inat-tables.c ~/tmp/inat-tables.c; echo $?
> 0

No need for that - just say that diffing the output before and after
shows no changes.

> [Debugging output]
> DBG:ext:(66&F2)
> DBG:match(ext, ...):(66&F2)
> DBG:match(..., lprefix3_expr):\((F2|!F3|66&F2)\)

That is supposed to say what exactly? That it still does what it is
expected to do?

Leaving in the rest for Masami.

Thx.

> Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> ---
>  arch/x86/tools/gen-insn-attr-x86.awk       | 4 ++--
>  tools/arch/x86/tools/gen-insn-attr-x86.awk | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/tools/gen-insn-attr-x86.awk b/arch/x86/tools/gen-insn-attr-x86.awk
> index b02a36b2c14f..a42015b305f4 100644
> --- a/arch/x86/tools/gen-insn-attr-x86.awk
> +++ b/arch/x86/tools/gen-insn-attr-x86.awk
> @@ -69,7 +69,7 @@ BEGIN {
> 
>  	lprefix1_expr = "\\((66|!F3)\\)"
>  	lprefix2_expr = "\\(F3\\)"
> -	lprefix3_expr = "\\((F2|!F3|66\\&F2)\\)"
> +	lprefix3_expr = "\\((F2|!F3|66&F2)\\)"
>  	lprefix_expr = "\\((66|F2|F3)\\)"
>  	max_lprefix = 4
> 
> @@ -257,7 +257,7 @@ function convert_operands(count,opnd,       i,j,imm,mod)
>  	return add_flags(imm, mod)
>  }
> 
> -/^[0-9a-f]+\:/ {
> +/^[0-9a-f]+:/ {
>  	if (NR == 1)
>  		next
>  	# get index
> diff --git a/tools/arch/x86/tools/gen-insn-attr-x86.awk b/tools/arch/x86/tools/gen-insn-attr-x86.awk
> index b02a36b2c14f..a42015b305f4 100644
> --- a/tools/arch/x86/tools/gen-insn-attr-x86.awk
> +++ b/tools/arch/x86/tools/gen-insn-attr-x86.awk
> @@ -69,7 +69,7 @@ BEGIN {
> 
>  	lprefix1_expr = "\\((66|!F3)\\)"
>  	lprefix2_expr = "\\(F3\\)"
> -	lprefix3_expr = "\\((F2|!F3|66\\&F2)\\)"
> +	lprefix3_expr = "\\((F2|!F3|66&F2)\\)"
>  	lprefix_expr = "\\((66|F2|F3)\\)"
>  	max_lprefix = 4
> 
> @@ -257,7 +257,7 @@ function convert_operands(count,opnd,       i,j,imm,mod)
>  	return add_flags(imm, mod)
>  }
> 
> -/^[0-9a-f]+\:/ {
> +/^[0-9a-f]+:/ {
>  	if (NR == 1)
>  		next
>  	# get index
> --
> 2.23.0
> 

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  parent reply	other threads:[~2019-09-23 10:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-21 11:37 [PATCH] " Alexander Kapshuk
2019-09-22  8:33 ` kbuild test robot
2019-09-22 15:03   ` [PATCH RESEND] " Alexander Kapshuk
2019-09-23  9:19     ` Borislav Petkov
2019-09-23  9:56       ` Alexander Kapshuk
2019-09-23 10:27         ` Borislav Petkov
2019-09-23 10:31     ` Borislav Petkov [this message]
2019-09-23 10:54       ` Alexander Kapshuk
2019-09-23 18:49       ` Masami Hiramatsu
2019-09-24  4:46         ` Alexander Kapshuk
2019-09-30  5:34           ` Borislav Petkov
2019-09-30  5:48             ` Alexander Kapshuk
2019-10-01 10:19           ` [tip: core/objtool] x86/insn: Fix awk " tip-bot2 for Alexander Kapshuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190923103139.GD15355@zn.tnic \
    --to=bp@alien8.de \
    --cc=alexander.kapshuk@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®