qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] checkpatch: add check for bzero
@ 2016-07-21  9:03 Paolo Bonzini
  2016-07-21 10:13 ` Peter Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2016-07-21  9:03 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/checkpatch.pl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index afa7f79..b7cb4ab 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2544,7 +2544,7 @@ sub process {
 		}
 	}
 
-# check for non-portable ffs() calls that have portable alternatives in QEMU
+# check for non-portable libc calls that have portable alternatives in QEMU
 		if ($line =~ /\bffs\(/) {
 			ERROR("use ctz32() instead of ffs()\n" . $herecurr);
 		}
@@ -2554,6 +2554,9 @@ sub process {
 		if ($line =~ /\bffsll\(/) {
 			ERROR("use ctz64() instead of ffsll()\n" . $herecurr);
 		}
+		if ($line =~ /\bbzero\(/) {
+			ERROR("use memset() instead of bzero()\n" . $herecurr);
+		}
 	}
 
 	# If we have no input at all, then there is nothing to report on
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] checkpatch: add check for bzero
  2016-07-21  9:03 [Qemu-devel] [PATCH] checkpatch: add check for bzero Paolo Bonzini
@ 2016-07-21 10:13 ` Peter Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Xu @ 2016-07-21 10:13 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Thu, Jul 21, 2016 at 11:03:20AM +0200, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Thanks, Paolo.

Tested-By: Peter Xu <peterx@redhat.com>

> ---
>  scripts/checkpatch.pl | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index afa7f79..b7cb4ab 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2544,7 +2544,7 @@ sub process {
>  		}
>  	}
>  
> -# check for non-portable ffs() calls that have portable alternatives in QEMU
> +# check for non-portable libc calls that have portable alternatives in QEMU
>  		if ($line =~ /\bffs\(/) {
>  			ERROR("use ctz32() instead of ffs()\n" . $herecurr);
>  		}
> @@ -2554,6 +2554,9 @@ sub process {
>  		if ($line =~ /\bffsll\(/) {
>  			ERROR("use ctz64() instead of ffsll()\n" . $herecurr);
>  		}
> +		if ($line =~ /\bbzero\(/) {
> +			ERROR("use memset() instead of bzero()\n" . $herecurr);
> +		}
>  	}
>  
>  	# If we have no input at all, then there is nothing to report on
> -- 
> 2.7.4
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-21 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-21  9:03 [Qemu-devel] [PATCH] checkpatch: add check for bzero Paolo Bonzini
2016-07-21 10:13 ` Peter Xu

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).