qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richardw.yang@linux.intel.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: thuth@redhat.com, berrange@redhat.com, qemu-devel@nongnu.org,
	Wei Yang <richardw.yang@linux.intel.com>,
	pbonzini@redhat.com, philmd@redhat.com,
	David Gibson <david@gibson.dropbear.id.au>
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:42:33 +0800	[thread overview]
Message-ID: <20191017004233.GA12405@richard> (raw)
In-Reply-To: <d45f4f13-cff1-9a17-6ce3-255dcca5503b@linaro.org>

On Wed, Oct 16, 2019 at 08:43:32AM -0700, Richard Henderson wrote:
>On 10/15/19 6:24 PM, Wei Yang wrote:
>>  		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\)/) {
>
>Use \b to match beginning of symbol like bzero did?
>

You are right, thanks for the suggestion.

>
>r~

-- 
Wei Yang
Help you, Help me


  reply	other threads:[~2019-10-17  0:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16  1:24 [PATCH] checkpatch: sugguest to use qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE) Wei Yang
2019-10-16 10:25 ` no-reply
2019-10-16 13:06   ` Wei Yang
2019-10-16 15:43 ` Richard Henderson
2019-10-17  0:42   ` Wei Yang [this message]
2019-10-16 18:48 ` Stefan Hajnoczi
2019-10-17  0:43   ` Wei Yang

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=20191017004233.GA12405@richard \
    --to=richardw.yang@linux.intel.com \
    --cc=berrange@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).