qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch v2] checkpatch: sugguest to use qemu_real_host_page_size inst


From: Paolo Bonzini
Subject: Re: [Patch v2] checkpatch: sugguest to use qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE)
Date: Tue, 22 Oct 2019 09:45:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 17/10/19 02:46, Wei Yang wrote:
> Signed-off-by: Wei Yang <address@hidden>
> CC: Richard Henderson <address@hidden>
> CC: Stefan Hajnoczi <address@hidden>
> 
> ---
> v2: add "\b" for better match, suggested by Richard Henderson <address@hidden>
> ---
>  scripts/checkpatch.pl | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index aa9a354a0e..ab68a16fd2 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2915,6 +2915,12 @@ sub process {
>               if ($line =~ /\bbzero\(/) {
>                       ERROR("use memset() instead of bzero()\n" . $herecurr);
>               }
> +             if ($line =~ /\bgetpagesize\(\)/) {
> +                     ERROR("use qemu_real_host_page_size instead of 
> getpagesize()\n" . $herecurr);
> +             }
> +             if ($line =~ /\bsysconf\(_SC_PAGESIZE\)/) {
> +                     ERROR("use qemu_real_host_page_size instead of 
> sysconf(_SC_PAGESIZE)\n" . $herecurr);
> +             }
>               my $non_exit_glib_asserts = qr{g_assert_cmpstr|
>                                               g_assert_cmpint|
>                                               g_assert_cmpuint|
> 

Queued, thanks.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]