Re: [Patch v2] checkpatch: sugguest to use qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE)

2019-10-22 Thread Paolo Bonzini
On 17/10/19 02:46, Wei Yang wrote:
> Signed-off-by: Wei Yang 
> CC: Richard Henderson 
> CC: Stefan Hajnoczi 
> 
> ---
> v2: add "\b" for better match, suggested by Richard Henderson 
> 
> ---
>  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



Re: [Patch v2] checkpatch: sugguest to use qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE)

2019-10-17 Thread Stefan Hajnoczi
On Thu, Oct 17, 2019 at 08:46:33AM +0800, Wei Yang wrote:
> Signed-off-by: Wei Yang 
> CC: Richard Henderson 
> CC: Stefan Hajnoczi 
> 
> ---
> v2: add "\b" for better match, suggested by Richard Henderson 
> 
> ---
>  scripts/checkpatch.pl | 6 ++
>  1 file changed, 6 insertions(+)

Reviewed-by: Stefan Hajnoczi 


signature.asc
Description: PGP signature


Re: [Patch v2] checkpatch: sugguest to use qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE)

2019-10-16 Thread Richard Henderson
On 10/16/19 5:46 PM, Wei Yang wrote:
> Signed-off-by: Wei Yang 
> CC: Richard Henderson 
> CC: Stefan Hajnoczi 
> 
> ---
> v2: add "\b" for better match, suggested by Richard Henderson 
> 
> ---
>  scripts/checkpatch.pl | 6 ++
>  1 file changed, 6 insertions(+)

Reviewed-by: Richard Henderson 


r~



Re: [Patch v2] checkpatch: sugguest to use qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE)

2019-10-16 Thread no-reply
Patchew URL: 
https://patchew.org/QEMU/20191017004633.13229-1-richardw.y...@linux.intel.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Patch v2] checkpatch: sugguest to use qemu_real_host_page_size 
instead of getpagesize() or sysconf(_SC_PAGESIZE)
Type: series
Message-id: 20191017004633.13229-1-richardw.y...@linux.intel.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
3751d76 checkpatch: sugguest to use qemu_real_host_page_size instead of 
getpagesize() or sysconf(_SC_PAGESIZE)

=== OUTPUT BEGIN ===
ERROR: line over 90 characters
#22: FILE: scripts/checkpatch.pl:2919:
+   ERROR("use qemu_real_host_page_size instead of 
getpagesize()\n" . $herecurr);

ERROR: line over 90 characters
#25: FILE: scripts/checkpatch.pl:2922:
+   ERROR("use qemu_real_host_page_size instead of 
sysconf(_SC_PAGESIZE)\n" . $herecurr);

total: 2 errors, 0 warnings, 12 lines checked

Commit 3751d7633653 (checkpatch: sugguest to use qemu_real_host_page_size 
instead of getpagesize() or sysconf(_SC_PAGESIZE)) has style problems, please 
review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20191017004633.13229-1-richardw.y...@linux.intel.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-de...@redhat.com

[Patch v2] checkpatch: sugguest to use qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE)

2019-10-16 Thread Wei Yang
Signed-off-by: Wei Yang 
CC: Richard Henderson 
CC: Stefan Hajnoczi 

---
v2: add "\b" for better match, suggested by Richard Henderson 

---
 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|
-- 
2.17.1