Patch "dt: dt-extract-compatibles: Handle cfile arguments in generator function" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dt: dt-extract-compatibles: Handle cfile arguments in generator function

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dt-dt-extract-compatibles-handle-cfile-arguments-in-.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7e609b95f2eb404cd19d1a34a01f95c3cde6ecc1
Author: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
Date:   Mon Aug 28 17:13:10 2023 -0400

    dt: dt-extract-compatibles: Handle cfile arguments in generator function
    
    [ Upstream commit eb2139fc0da63b89a2ad565ecd8133a37e8b7c4f ]
    
    Move the handling of the cfile arguments to a separate generator
    function to avoid redundancy.
    
    Signed-off-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230828211424.2964562-2-nfraprado@xxxxxxxxxxxxx
    Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
    Stable-dep-of: 8f51593cdcab ("dt: dt-extract-compatibles: Don't follow symlinks when walking tree")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/scripts/dtc/dt-extract-compatibles b/scripts/dtc/dt-extract-compatibles
index a1119762ed086..05c47e3d8c00e 100755
--- a/scripts/dtc/dt-extract-compatibles
+++ b/scripts/dtc/dt-extract-compatibles
@@ -49,6 +49,14 @@ def print_compat(filename, compatibles):
 	else:
 		print(*compatibles, sep='\n')
 
+def files_to_parse(path_args):
+	for f in path_args:
+		if os.path.isdir(f):
+			for filename in glob.iglob(f + "/**/*.c", recursive=True):
+				yield filename
+		else:
+			yield f
+
 show_filename = False
 
 if __name__ == "__main__":
@@ -59,11 +67,6 @@ if __name__ == "__main__":
 
 	show_filename = args.with_filename
 
-	for f in args.cfile:
-		if os.path.isdir(f):
-			for filename in glob.iglob(f + "/**/*.c", recursive=True):
-				compat_list = parse_compatibles(filename)
-				print_compat(filename, compat_list)
-		else:
-			compat_list = parse_compatibles(f)
-			print_compat(f, compat_list)
+	for f in files_to_parse(args.cfile):
+		compat_list = parse_compatibles(f)
+		print_compat(f, compat_list)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux