qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] checkpatch: sugguest to use qemu_real_host_page_size instead


From: Wei Yang
Subject: Re: [PATCH] checkpatch: sugguest to use qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE)
Date: Thu, 17 Oct 2019 08:43:57 +0800
User-agent: Mutt/1.9.4 (2018-02-28)

On Wed, Oct 16, 2019 at 07:48:50PM +0100, Stefan Hajnoczi wrote:
>On Wed, Oct 16, 2019 at 09:24:32AM +0800, Wei Yang wrote:
>> Signed-off-by: Wei Yang <address@hidden>
>> CC: David Gibson <address@hidden>
>> ---
>>  scripts/checkpatch.pl | 6 ++++++
>>  1 file changed, 6 insertions(+)
>> 
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index aa9a354a0e..4b360ed310 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 =~ /getpagesize\(\)/) {
>> +                    ERROR("use qemu_real_host_page_size instead of 
>> getpagesize()\n" . $herecurr);
>> +            }
>> +            if ($line =~ /sysconf\(_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|
>
>Just wanted to say thank you for extending checkpatch.pl!  We don't do
>it enough but it's the best way to extend QEMU coding style because it's
>automated :).
>

You are welcome. Glad to do something.

>Stefan



-- 
Wei Yang
Help you, Help me



reply via email to

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