[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for s
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for syscall tests |
Date: |
Tue, 27 Sep 2016 19:02:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 27/09/2016 17:14, address@hidden wrote:
> From: Riku Voipio <address@hidden>
>
> Linux-user and bsd-user code need ifdef guards for new system
> calls that aren't implemented on all host/target combinations.
> Allow ifdefs for system calls when defined as __NR_foo.
>
> Signed-off-by: Riku Voipio <address@hidden>
> ---
> scripts/checkpatch.pl | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 3afa19a..e17f445 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2405,8 +2405,10 @@ 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 =~ address@hidden@) {
> +# where they might be necessary. Ignore __NR and __TARGET_NR
> +# definitions that are needed for linux-user builds
> + if (($line =~ address@hidden@) &&
> + !($realfile =~ /^(linux|bsd)-user/ && $line =~ /__NR_/)) {
> WARN("architecture specific defines should be
> avoided\n" . $herecurr);
> }
>
>
Acked-by: Paolo Bonzini <address@hidden>