[PATCH] checkpatch: ignore target/hexagon/imported/* files

Matheus Tavares Bernardino posted 1 patch 3 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/e3b6a345a88807a1c4daa45f638b2a90af538fd5.1663681339.git.quic._5Fmathbern@quicinc.com
scripts/checkpatch.pl | 1 +
1 file changed, 1 insertion(+)
[PATCH] checkpatch: ignore target/hexagon/imported/* files
Posted by Matheus Tavares Bernardino 3 years, 4 months ago
These files come from an external project (the hexagon archlib), so they
deliberately do not follow QEMU's coding style. To avoid false positives
from checkpatch.pl, let's disable the checking for those.

Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
---
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d900d18048..e3e3b43076 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1667,6 +1667,7 @@ sub process {
 # some scripts we imported from other projects.
 		next if ($realfile =~ /\.(s|S)$/);
 		next if ($realfile =~ /(checkpatch|get_maintainer)\.pl$/);
+		next if ($realfile =~ /^target\/hexagon\/imported\/*/);
 
 		if ($rawline =~ /^\+.*\t/) {
 			my $herevet = "$here\n" . cat_vet($rawline) . "\n";
-- 
2.37.2
Re: [PATCH] checkpatch: ignore target/hexagon/imported/* files
Posted by Laurent Vivier 3 years, 4 months ago
Le 20/09/2022 à 15:42, Matheus Tavares Bernardino a écrit :
> These files come from an external project (the hexagon archlib), so they
> deliberately do not follow QEMU's coding style. To avoid false positives
> from checkpatch.pl, let's disable the checking for those.
> 
> Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> ---
>   scripts/checkpatch.pl | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d900d18048..e3e3b43076 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1667,6 +1667,7 @@ sub process {
>   # some scripts we imported from other projects.
>   		next if ($realfile =~ /\.(s|S)$/);
>   		next if ($realfile =~ /(checkpatch|get_maintainer)\.pl$/);
> +		next if ($realfile =~ /^target\/hexagon\/imported\/*/);
>   
>   		if ($rawline =~ /^\+.*\t/) {
>   			my $herevet = "$here\n" . cat_vet($rawline) . "\n";

Applied to my trivial-patches branch.

Thanks,
Laurent


Re: [PATCH] checkpatch: ignore target/hexagon/imported/* files
Posted by Philippe Mathieu-Daudé via 3 years, 4 months ago
On 20/9/22 15:42, Matheus Tavares Bernardino wrote:
> These files come from an external project (the hexagon archlib), so they
> deliberately do not follow QEMU's coding style. To avoid false positives
> from checkpatch.pl, let's disable the checking for those.
> 
> Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> ---
>   scripts/checkpatch.pl | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>