Re: [PATCH 1/1] checkpatch: allow space between colon and bracket
On Tue, 2018-04-03 at 21:16 +0200, Heinrich Schuchardt wrote: > Allow a space between a colon and subsequent opening bracket. > This sequence may occur in inline assembler statements like > > asm( > "ldr %[out], [%[in]]\n\t" > : [out] "=r" (ret) > : [in] "r" (addr) > ); > > Signed-off-by: Heinrich SchuchardtI can't think of a valid c90 sequence that has a colon before a bracket so Acked-by: Joe Perches > --- > scripts/checkpatch.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index d2464002bb40..2cbab86e6d4c 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -4083,7 +4083,7 @@ sub process { > my ($where, $prefix) = ($-[1], $1); > if ($prefix !~ /$Type\s+$/ && > ($where != 0 || $prefix !~ /^.\s+$/) && > - $prefix !~ /[{,]\s+$/) { > + $prefix !~ /[{,:]\s+$/) { > if (ERROR("BRACKET_SPACE", > "space prohibited before open square > bracket '['\n" . $herecurr) && > $fix) {
Re: [PATCH 1/1] checkpatch: allow space between colon and bracket
On Tue, 2018-04-03 at 21:16 +0200, Heinrich Schuchardt wrote: > Allow a space between a colon and subsequent opening bracket. > This sequence may occur in inline assembler statements like > > asm( > "ldr %[out], [%[in]]\n\t" > : [out] "=r" (ret) > : [in] "r" (addr) > ); > > Signed-off-by: Heinrich Schuchardt I can't think of a valid c90 sequence that has a colon before a bracket so Acked-by: Joe Perches > --- > scripts/checkpatch.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index d2464002bb40..2cbab86e6d4c 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -4083,7 +4083,7 @@ sub process { > my ($where, $prefix) = ($-[1], $1); > if ($prefix !~ /$Type\s+$/ && > ($where != 0 || $prefix !~ /^.\s+$/) && > - $prefix !~ /[{,]\s+$/) { > + $prefix !~ /[{,:]\s+$/) { > if (ERROR("BRACKET_SPACE", > "space prohibited before open square > bracket '['\n" . $herecurr) && > $fix) {
[PATCH 1/1] checkpatch: allow space between colon and bracket
Allow a space between a colon and subsequent opening bracket. This sequence may occur in inline assembler statements like asm( "ldr %[out], [%[in]]\n\t" : [out] "=r" (ret) : [in] "r" (addr) ); Signed-off-by: Heinrich Schuchardt--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d2464002bb40..2cbab86e6d4c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4083,7 +4083,7 @@ sub process { my ($where, $prefix) = ($-[1], $1); if ($prefix !~ /$Type\s+$/ && ($where != 0 || $prefix !~ /^.\s+$/) && - $prefix !~ /[{,]\s+$/) { + $prefix !~ /[{,:]\s+$/) { if (ERROR("BRACKET_SPACE", "space prohibited before open square bracket '['\n" . $herecurr) && $fix) { -- 2.16.3
[PATCH 1/1] checkpatch: allow space between colon and bracket
Allow a space between a colon and subsequent opening bracket. This sequence may occur in inline assembler statements like asm( "ldr %[out], [%[in]]\n\t" : [out] "=r" (ret) : [in] "r" (addr) ); Signed-off-by: Heinrich Schuchardt --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d2464002bb40..2cbab86e6d4c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4083,7 +4083,7 @@ sub process { my ($where, $prefix) = ($-[1], $1); if ($prefix !~ /$Type\s+$/ && ($where != 0 || $prefix !~ /^.\s+$/) && - $prefix !~ /[{,]\s+$/) { + $prefix !~ /[{,:]\s+$/) { if (ERROR("BRACKET_SPACE", "space prohibited before open square bracket '['\n" . $herecurr) && $fix) { -- 2.16.3