[Qemu-devel] [PATCH for-4.0 2/4] checkpatch: check Signed-off-by in --mailback mode

Paolo Bonzini posted 4 patches 7 years, 2 months ago
[Qemu-devel] [PATCH for-4.0 2/4] checkpatch: check Signed-off-by in --mailback mode
Posted by Paolo Bonzini 7 years, 2 months ago
Pull the test before the anticipated exits from the process sub.

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

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d58fcb1efd..c216c55e01 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2866,6 +2866,10 @@ sub process {
 		}
 	}
 
+	if ($is_patch && $chk_signoff && $signoff == 0) {
+		ERROR("Missing Signed-off-by: line(s)\n");
+	}
+
 	# If we have no input at all, then there is nothing to report on
 	# so just keep quiet.
 	if ($#rawlines == -1) {
@@ -2887,9 +2891,6 @@ sub process {
 	if (!$is_patch) {
 		ERROR("Does not appear to be a unified-diff format patch\n");
 	}
-	if ($is_patch && $chk_signoff && $signoff == 0) {
-		ERROR("Missing Signed-off-by: line(s)\n");
-	}
 
 	print report_dump();
 	if ($summary && !($clean == 1 && $quiet == 1)) {
-- 
2.19.1



Re: [Qemu-devel] [PATCH for-4.0 2/4] checkpatch: check Signed-off-by in --mailback mode
Posted by Philippe Mathieu-Daudé 7 years, 2 months ago
On 29/11/18 10:01, Paolo Bonzini wrote:
> Pull the test before the anticipated exits from the process sub.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  scripts/checkpatch.pl | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d58fcb1efd..c216c55e01 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2866,6 +2866,10 @@ sub process {
>  		}
>  	}
>  
> +	if ($is_patch && $chk_signoff && $signoff == 0) {
> +		ERROR("Missing Signed-off-by: line(s)\n");
> +	}
> +
>  	# If we have no input at all, then there is nothing to report on
>  	# so just keep quiet.
>  	if ($#rawlines == -1) {
> @@ -2887,9 +2891,6 @@ sub process {
>  	if (!$is_patch) {
>  		ERROR("Does not appear to be a unified-diff format patch\n");
>  	}
> -	if ($is_patch && $chk_signoff && $signoff == 0) {
> -		ERROR("Missing Signed-off-by: line(s)\n");
> -	}
>  
>  	print report_dump();
>  	if ($summary && !($clean == 1 && $quiet == 1)) {
> 

Re: [Qemu-devel] [PATCH for-4.0 2/4] checkpatch: check Signed-off-by in --mailback mode
Posted by Markus Armbruster 7 years, 2 months ago
Paolo Bonzini <pbonzini@redhat.com> writes:

> Pull the test before the anticipated exits from the process sub.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  scripts/checkpatch.pl | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d58fcb1efd..c216c55e01 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2866,6 +2866,10 @@ sub process {
>  		}
>  	}
>  
> +	if ($is_patch && $chk_signoff && $signoff == 0) {
> +		ERROR("Missing Signed-off-by: line(s)\n");
> +	}
> +
>  	# If we have no input at all, then there is nothing to report on
>  	# so just keep quiet.
>  	if ($#rawlines == -1) {
> @@ -2887,9 +2891,6 @@ sub process {
>  	if (!$is_patch) {
>  		ERROR("Does not appear to be a unified-diff format patch\n");
>  	}
> -	if ($is_patch && $chk_signoff && $signoff == 0) {
> -		ERROR("Missing Signed-off-by: line(s)\n");
> -	}
>  
>  	print report_dump();
>  	if ($summary && !($clean == 1 && $quiet == 1)) {

Would this make sense for Linux's checkpatch.pl, too?

Re: [Qemu-devel] [PATCH for-4.0 2/4] checkpatch: check Signed-off-by in --mailback mode
Posted by Paolo Bonzini 7 years, 2 months ago
On 29/11/18 17:21, Markus Armbruster wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
>> Pull the test before the anticipated exits from the process sub.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  scripts/checkpatch.pl | 7 ++++---
>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index d58fcb1efd..c216c55e01 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -2866,6 +2866,10 @@ sub process {
>>  		}
>>  	}
>>  
>> +	if ($is_patch && $chk_signoff && $signoff == 0) {
>> +		ERROR("Missing Signed-off-by: line(s)\n");
>> +	}
>> +
>>  	# If we have no input at all, then there is nothing to report on
>>  	# so just keep quiet.
>>  	if ($#rawlines == -1) {
>> @@ -2887,9 +2891,6 @@ sub process {
>>  	if (!$is_patch) {
>>  		ERROR("Does not appear to be a unified-diff format patch\n");
>>  	}
>> -	if ($is_patch && $chk_signoff && $signoff == 0) {
>> -		ERROR("Missing Signed-off-by: line(s)\n");
>> -	}
>>  
>>  	print report_dump();
>>  	if ($summary && !($clean == 1 && $quiet == 1)) {
> 
> Would this make sense for Linux's checkpatch.pl, too?
> 

Yes, but I have never had any luck upstreaming our changes. :(  For
example, e20122ff0faf07cb701d35e39e106d1783c07725 is a genuine bugfix
but it was ignored.

I am willing to give it a try, but I'd rather not hold this change to
QEMU's checkpatch.

(Same answer for 1/4).

Paolo