Re: [PATCH -v3] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

From: Joe Perches
Date: Mon Oct 12 2020 - 11:04:53 EST


On Mon, 2020-10-12 at 16:23 +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@xxxxxxx>
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -408,6 +408,7 @@ our $Lval = qr{$Ident(?:$Member)*};
> our $Int_type = qr{(?i)llu|ull|ll|lu|ul|l|u};
> our $Binary = qr{(?i)0b[01]+$Int_type?};
> our $Hex = qr{(?i)0x[0-9a-f]+$Int_type?};
> +our $Hex_byte = qr{(?i)0x[0-9a-f]{1,2}};

$Hex_byte needs to be generic and this needs to
have a trailing \b otherwise it would match
0x12 from 0x1234 and leave 34