lkml.org 
[lkml]   [2020]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch: Check for .byte-spelled insn opcodes documentation on x86
From
Date
On Sat, 2020-10-10 at 12:54 +0200, Borislav Petkov wrote:
> > checkpatch uses only a single line output only before $herecurr
> > Output line length doesn't matter.
[]
> WARNING: Please document which binutils version supports these .byte-spelled
> insn opcodes by adding "binutils version <num>" in a comment above them.
> #90: FILE: arch/x86/include/asm/special_insns.h:254:
> + asm volatile(".byte 0x66, 0x0f, 0x38, 0xf8, 0x02"
>
>
> is easier readable than this:
>
> WARNING: Please document which binutils version supports these .byte-spelledinsn opcodes by adding "binutils version <num>" in a comment above them.
> #90: FILE: arch/x86/include/asm/special_insns.h:254:
> + asm volatile(".byte 0x66, 0x0f, 0x38, 0xf8, 0x02"

Readability is a consideration but it still must be a single line.

using --terse requires single line error output

Perhaps:
if ($comment !~ /\bbinutils version [0-9.]+/ms) {
WARN("MISSING_BINUTILS_VERSION",
"Please add a comment for .byte-spelled insn opcodes with \"binutils version <minimum_required_version>\"\n" . $herecurr);

\
 
 \ /
  Last update: 2020-10-11 00:56    [W:0.090 / U:2.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site