linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/1] checkpatch: Don't warn on "orhapned" DT schema file
@ 2025-10-27  9:36 Andy Shevchenko
  2025-10-27 15:45 ` Joe Perches
  2025-10-28  8:05 ` Markus Elfring
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2025-10-27  9:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	Andy Shevchenko, Akhilesh Patil

Currently checkpatch warns is the DT schema file is absent in MAINTAINERS.
However the DT schema files are self-contained in this sense and
have embedded information about maintainers of it. This is a requirement.
Hence, avoid checkpatch warning about it.

Tested-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---

v3: removed Requested-by tag
v2: drop some leftovers


The motivation of the patch is that DT people complaining about checkpatch but
doing nothing about it. They should be more collaborative.

 scripts/checkpatch.pl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 6729f18e5654..db274a7c2fb0 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3441,9 +3441,12 @@ sub process {
 		     ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
 		      (defined($1) || defined($2))))) {
 			$is_patch = 1;
-			$reported_maintainer_file = 1;
-			WARN("FILE_PATH_CHANGES",
-			     "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
+			# DT bindings are incorporate maintainer information, no need to report
+			if ($realfile !~ m@^Documentation/devicetree/bindings/@)) {
+				$reported_maintainer_file = 1;
+				WARN("FILE_PATH_CHANGES",
+				     "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
+			}
 		}
 
 # Check for adding new DT bindings not in schema format
-- 
2.50.1


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

* Re: [PATCH v3 1/1] checkpatch: Don't warn on "orhapned" DT schema file
  2025-10-27  9:36 [PATCH v3 1/1] checkpatch: Don't warn on "orhapned" DT schema file Andy Shevchenko
@ 2025-10-27 15:45 ` Joe Perches
  2025-10-28  7:54   ` Andy Shevchenko
  2025-10-28  8:05 ` Markus Elfring
  1 sibling, 1 reply; 4+ messages in thread
From: Joe Perches @ 2025-10-27 15:45 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel
  Cc: Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn, Akhilesh Patil

On Mon, 2025-10-27 at 10:36 +0100, Andy Shevchenko wrote:
> Currently checkpatch warns is the DT schema file is absent in MAINTAINERS.
> However the DT schema files are self-contained in this sense and
> have embedded information about maintainers of it. This is a requirement.
> Hence, avoid checkpatch warning about it.
> 
> Tested-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

nackish.

Perhaps it'd be better to make checkpatch and get_maintainer have
some list of filename suffixes that are expected to have embedded
maintainer email addresses

Maybe something like:

our $maintainer_in_file_types = '\.(?:yaml|dts.?|rst)$';


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

* Re: [PATCH v3 1/1] checkpatch: Don't warn on "orhapned" DT schema file
  2025-10-27 15:45 ` Joe Perches
@ 2025-10-28  7:54   ` Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2025-10-28  7:54 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn,
	Akhilesh Patil

On Mon, Oct 27, 2025 at 08:45:08AM -0700, Joe Perches wrote:
> On Mon, 2025-10-27 at 10:36 +0100, Andy Shevchenko wrote:
> > Currently checkpatch warns is the DT schema file is absent in MAINTAINERS.
> > However the DT schema files are self-contained in this sense and
> > have embedded information about maintainers of it. This is a requirement.
> > Hence, avoid checkpatch warning about it.
> > 
> > Tested-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> nackish.
> 
> Perhaps it'd be better to make checkpatch and get_maintainer have
> some list of filename suffixes that are expected to have embedded
> maintainer email addresses
> 
> Maybe something like:
> 
> our $maintainer_in_file_types = '\.(?:yaml|dts.?|rst)$';

Please, do that. I have no idea where all these Perl files do the necessary bits.
But currently we have a problem (false positives) with checkpatch, and some
maintainers dislike them.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v3 1/1] checkpatch: Don't warn on "orhapned" DT schema file
  2025-10-27  9:36 [PATCH v3 1/1] checkpatch: Don't warn on "orhapned" DT schema file Andy Shevchenko
  2025-10-27 15:45 ` Joe Perches
@ 2025-10-28  8:05 ` Markus Elfring
  1 sibling, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2025-10-28  8:05 UTC (permalink / raw)
  To: Andy Shevchenko, kernel-janitors, Joe Perches
  Cc: LKML, Akhilesh Patil, Andy Whitcroft, Dwaipayan Ray,
	Lukas Bulwahn

…
> Hence, avoid checkpatch warning about it.

Do you try to influence software evolution any further for “orphaned” information?

Regards,
Markus

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

end of thread, other threads:[~2025-10-28  8:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27  9:36 [PATCH v3 1/1] checkpatch: Don't warn on "orhapned" DT schema file Andy Shevchenko
2025-10-27 15:45 ` Joe Perches
2025-10-28  7:54   ` Andy Shevchenko
2025-10-28  8:05 ` Markus Elfring

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