lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aVjgRs4ODrKiItvd@archie.me>
Date: Sat, 3 Jan 2026 16:24:22 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: Alex Tran <alex.t.tran@...il.com>, Andy Whitcroft <apw@...onical.com>,
	Joe Perches <joe@...ches.com>,
	Dwaipayan Ray <dwaipayanray1@...il.com>,
	Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>
Subject: Re: [PATCH] checkpatch: Fix false positive check for dt-binding docs
 and include

[CC'ing devicetree people]

On Wed, Dec 24, 2025 at 05:41:17PM -0800, Alex Tran wrote:
> The check for when to display a DT_SPLIT_BINDING_PATCH warning
> is performed on all files that are not MAINTAINERS files.
> This causes issues, specifically when checking against a
> patch that only touches docs/dt-bindings or a patch that
> only touches include/dt-bindings. The warning is still
> displayed when it should not be, giving false positives.
> 
> The check for when to issue a DT_SPLIT_BINDING_PATCH warning
> is currently too pervasive and should only be performed when
> a change under docs/dt-bindings is detected or include/dt-bindings.
> If the current changed file is under include/dt-bindings or
> docs/dt-bindings then it is compared to the last file detected
> under include/dt-bindings or docs/dt-bindings. If there is a
> difference then a warning is issued.

Can you elaborate on example of where this issue occurs?
I'm still confused...

> 
> Signed-off-by: Alex Tran <alex.t.tran@...il.com>
> ---
>  scripts/checkpatch.pl | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index c0250244cf7a3cb5e289b04fa4a9f644692dc278..fe3499bc9adda158c88231b48b3b0100f3af0ee1 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2668,7 +2668,7 @@ sub process {
>  	my $authorsignoff = 0;
>  	my $author_sob = '';
>  	my $is_patch = 0;
> -	my $is_binding_patch = -1;
> +	my $is_doc_binding_patch = -1;
>  	my $in_header_lines = $file ? 0 : 1;
>  	my $in_commit_log = 0;		#Scanning lines before patch
>  	my $has_patch_separator = 0;	#Found a --- line
> @@ -2924,13 +2924,13 @@ sub process {
>  			}
>  			$checklicenseline = 1;
>  
> -			if ($realfile !~ /^MAINTAINERS/) {
> -				my $last_binding_patch = $is_binding_patch;
> +			if ($realfile =~ m@^(?:Documentation/devicetree/|include/dt-bindings/)@) {
> +				my $last_binding_patch_is_doc = $is_doc_binding_patch;
>  
> -				$is_binding_patch = () = $realfile =~ m@^(?:Documentation/devicetree/|include/dt-bindings/)@;
> +				$is_doc_binding_patch = () = $realfile =~ m@^(?:Documentation/devicetree/)@;
>  
> -				if (($last_binding_patch != -1) &&
> -				    ($last_binding_patch ^ $is_binding_patch)) {
> +				if (($last_binding_patch_is_doc != -1) &&
> +				    ($last_binding_patch_is_doc ^ $is_doc_binding_patch)) {
>  					WARN("DT_SPLIT_BINDING_PATCH",
>  					     "DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst\n");
>  				}
> 

I can't say for the actuall diff, though.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ