qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts/checkpatch: Fix a typo
@ 2025-03-03 17:25 Philippe Mathieu-Daudé
  2025-03-03 17:35 ` Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-03-03 17:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P . Berrangé, Stefan Hajnoczi,
	Philippe Mathieu-Daudé

When running checkpatch.pl on a commit adding a file without
SPDX tag we get:

  Undefined subroutine &main::WARNING called at ./scripts/checkpatch.pl line 1694.

The WARNING level is reported by the WARN() method. Fix the typo.

Fixes: fa4d79c64da ("scripts: mandate that new files have SPDX-License-Identifier")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
Possible candidate to apply on /master as buildfix
---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 83b59fb4436..6ae9d7febee 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1691,8 +1691,8 @@ sub process {
 				  "'SPDX-License-Identifer'");
 			} else {
 			    # Other files MAY have SPDX license if appropriate
-			    WARNING("Does new file '$expect_spdx_file' need " .
-				    "'SPDX-License-Identifer'?");
+			    WARN("Does new file '$expect_spdx_file' need " .
+				 "'SPDX-License-Identifer'?");
 			}
 		    }
 		    $expect_spdx = 1;
-- 
2.47.1



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

* Re: [PATCH] scripts/checkpatch: Fix a typo
  2025-03-03 17:25 [PATCH] scripts/checkpatch: Fix a typo Philippe Mathieu-Daudé
@ 2025-03-03 17:35 ` Philippe Mathieu-Daudé
  2025-03-03 19:39   ` Markus Armbruster
  2025-03-04  4:26 ` Stefan Hajnoczi
  2025-03-04  9:48 ` Daniel P. Berrangé
  2 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-03-03 17:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel P . Berrangé, Stefan Hajnoczi

On 3/3/25 18:25, Philippe Mathieu-Daudé wrote:
> When running checkpatch.pl on a commit adding a file without
> SPDX tag we get:
> 
>    Undefined subroutine &main::WARNING called at ./scripts/checkpatch.pl line 1694.
> 
> The WARNING level is reported by the WARN() method. Fix the typo.
> 
> Fixes: fa4d79c64da ("scripts: mandate that new files have SPDX-License-Identifier")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Possible candidate to apply on /master as buildfix

buildfix: because otherwise everybody running checkpatch and adding
new file without SPDX tag will have to debug checkpatch.pl.

> ---
>   scripts/checkpatch.pl | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 83b59fb4436..6ae9d7febee 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1691,8 +1691,8 @@ sub process {
>   				  "'SPDX-License-Identifer'");
>   			} else {
>   			    # Other files MAY have SPDX license if appropriate
> -			    WARNING("Does new file '$expect_spdx_file' need " .
> -				    "'SPDX-License-Identifer'?");
> +			    WARN("Does new file '$expect_spdx_file' need " .
> +				 "'SPDX-License-Identifer'?");
>   			}
>   		    }
>   		    $expect_spdx = 1;



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

* Re: [PATCH] scripts/checkpatch: Fix a typo
  2025-03-03 17:35 ` Philippe Mathieu-Daudé
@ 2025-03-03 19:39   ` Markus Armbruster
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2025-03-03 19:39 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Daniel P . Berrangé, Stefan Hajnoczi

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 3/3/25 18:25, Philippe Mathieu-Daudé wrote:
>> When running checkpatch.pl on a commit adding a file without
>> SPDX tag we get:
>>    Undefined subroutine &main::WARNING called at ./scripts/checkpatch.pl line 1694.
>> The WARNING level is reported by the WARN() method. Fix the typo.
>> Fixes: fa4d79c64da ("scripts: mandate that new files have SPDX-License-Identifier")
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> Possible candidate to apply on /master as buildfix
>
> buildfix: because otherwise everybody running checkpatch and adding
> new file without SPDX tag will have to debug checkpatch.pl.
>
>> ---
>>   scripts/checkpatch.pl | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 83b59fb4436..6ae9d7febee 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -1691,8 +1691,8 @@ sub process {
>>   				  "'SPDX-License-Identifer'");
>>   			} else {
>>   			    # Other files MAY have SPDX license if appropriate
>> -			    WARNING("Does new file '$expect_spdx_file' need " .
>> -				    "'SPDX-License-Identifer'?");
>> +			    WARN("Does new file '$expect_spdx_file' need " .
>> +				 "'SPDX-License-Identifer'?");
>>   			}
>>   		    }
>>   		    $expect_spdx = 1;

Reviewed-by: Markus Armbruster <armbru@redhat.com>



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

* Re: [PATCH] scripts/checkpatch: Fix a typo
  2025-03-03 17:25 [PATCH] scripts/checkpatch: Fix a typo Philippe Mathieu-Daudé
  2025-03-03 17:35 ` Philippe Mathieu-Daudé
@ 2025-03-04  4:26 ` Stefan Hajnoczi
  2025-03-04  9:48 ` Daniel P. Berrangé
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2025-03-04  4:26 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-devel, Daniel P . Berrangé

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

On Mon, Mar 03, 2025 at 06:25:08PM +0100, Philippe Mathieu-Daudé wrote:
> When running checkpatch.pl on a commit adding a file without
> SPDX tag we get:
> 
>   Undefined subroutine &main::WARNING called at ./scripts/checkpatch.pl line 1694.
> 
> The WARNING level is reported by the WARN() method. Fix the typo.
> 
> Fixes: fa4d79c64da ("scripts: mandate that new files have SPDX-License-Identifier")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Possible candidate to apply on /master as buildfix
> ---
>  scripts/checkpatch.pl | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied to qemu.git/master!

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] scripts/checkpatch: Fix a typo
  2025-03-03 17:25 [PATCH] scripts/checkpatch: Fix a typo Philippe Mathieu-Daudé
  2025-03-03 17:35 ` Philippe Mathieu-Daudé
  2025-03-04  4:26 ` Stefan Hajnoczi
@ 2025-03-04  9:48 ` Daniel P. Berrangé
  2 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrangé @ 2025-03-04  9:48 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-devel, Stefan Hajnoczi

On Mon, Mar 03, 2025 at 06:25:08PM +0100, Philippe Mathieu-Daudé wrote:
> When running checkpatch.pl on a commit adding a file without
> SPDX tag we get:
> 
>   Undefined subroutine &main::WARNING called at ./scripts/checkpatch.pl line 1694.
> 
> The WARNING level is reported by the WARN() method. Fix the typo.
> 
> Fixes: fa4d79c64da ("scripts: mandate that new files have SPDX-License-Identifier")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Possible candidate to apply on /master as buildfix
> ---
>  scripts/checkpatch.pl | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Urgh, sorry about that, thanks for fixing my messup.

> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 83b59fb4436..6ae9d7febee 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1691,8 +1691,8 @@ sub process {
>  				  "'SPDX-License-Identifer'");
>  			} else {
>  			    # Other files MAY have SPDX license if appropriate
> -			    WARNING("Does new file '$expect_spdx_file' need " .
> -				    "'SPDX-License-Identifer'?");
> +			    WARN("Does new file '$expect_spdx_file' need " .
> +				 "'SPDX-License-Identifer'?");
>  			}
>  		    }
>  		    $expect_spdx = 1;
> -- 
> 2.47.1
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

end of thread, other threads:[~2025-03-04  9:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-03 17:25 [PATCH] scripts/checkpatch: Fix a typo Philippe Mathieu-Daudé
2025-03-03 17:35 ` Philippe Mathieu-Daudé
2025-03-03 19:39   ` Markus Armbruster
2025-03-04  4:26 ` Stefan Hajnoczi
2025-03-04  9:48 ` Daniel P. Berrangé

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