[PATCH] scripts/checkpatch: Fix a typo

Philippe Mathieu-Daudé posted 1 patch 1 day, 4 hours ago
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] scripts/checkpatch: Fix a typo
Posted by Philippe Mathieu-Daudé 1 day, 4 hours ago
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


Re: [PATCH] scripts/checkpatch: Fix a typo
Posted by Daniel P. Berrangé 12 hours ago
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 :|


Re: [PATCH] scripts/checkpatch: Fix a typo
Posted by Stefan Hajnoczi 17 hours ago
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
Re: [PATCH] scripts/checkpatch: Fix a typo
Posted by Philippe Mathieu-Daudé 1 day, 4 hours ago
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;


Re: [PATCH] scripts/checkpatch: Fix a typo
Posted by Markus Armbruster 1 day, 2 hours ago
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>