All of lore.kernel.org
 help / color / mirror / Atom feed
From: Riku Voipio <riku.voipio@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user
Date: Tue, 27 Sep 2016 16:36:58 +0300	[thread overview]
Message-ID: <CAAqcGHmAFfEmVQGmc5Qw=pesYQgazdxdFOvavm-ysN1n9ot-LQ@mail.gmail.com> (raw)
In-Reply-To: <f80b91af-8af4-be43-506f-8cdc65dbc372@redhat.com>

On 27 September 2016 at 14:58, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 26/09/2016 21:58, riku.voipio@linaro.org wrote:
>> From: Riku Voipio <riku.voipio@linaro.org>
>>
>> Linux-user and bsd-user code needs lots of arch-specific ifdefs,
>> so disable the warning.
>>
>> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
>> ---
>>  scripts/checkpatch.pl | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index dde3f5f..98a007f 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -2405,8 +2405,9 @@ sub process {
>>               }
>>  # check of hardware specific defines
>>  # we have e.g. CONFIG_LINUX and CONFIG_WIN32 for common cases
>> -# where they might be necessary.
>> -             if ($line =~ m@^.\s*\#\s*if.*\b__@) {
>> +# where they might be necessary. Skip test on linux-user and bsd-user
>> +# where arch defines are needed
>> +             if (!($realfile =~ /^(linux|bsd)-user/) &&  $line =~ m@^.\s*\#\s*if.*\b__@) {
>>                       ERROR("architecture specific defines should be avoided\n" .  $herecurr);
>>               }
>>
>>
>
> Hi Riku,
>
> I have already posted a pull request that degrades this to a warning.
>
> Later on we may make it an error except for some files and/or patterns.
> For linux-user I think that __NR_* should be definitely allowed, but a
> blanket permission is not necessary.

I'll update my patch against your PR and to check not only for
linux-user dir, but also match __NR_.

Riku

      reply	other threads:[~2016-09-27 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 19:58 [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user riku.voipio
2016-09-26 20:03 ` no-reply
2016-09-26 21:08 ` Peter Maydell
2016-09-26 23:36   ` Riku Voipio
2016-09-27  0:21     ` Peter Maydell
2016-09-27 11:58 ` Paolo Bonzini
2016-09-27 13:36   ` Riku Voipio [this message]

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='CAAqcGHmAFfEmVQGmc5Qw=pesYQgazdxdFOvavm-ysN1n9ot-LQ@mail.gmail.com' \
    --to=riku.voipio@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.