Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44b40d26 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "checkpatch: Check to make sure DT property names are lowercase"

parents 3cd38192 fe930108
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -2963,6 +2963,20 @@ sub process {
# check we are in a valid source file if not then ignore this hunk
# check we are in a valid source file if not then ignore this hunk
		next if ($realfile !~ /\.(h|c|s|S|pl|sh|dtsi|dts)$/);
		next if ($realfile !~ /\.(h|c|s|S|pl|sh|dtsi|dts)$/);


# do DT checks:
#       * Property names should be lower-case
#       * Only newline after };

		if ($realfile =~ /\.(dts|dtsi)$/ && $line =~ /^\+/) {
			if($line =~ /\};.+$/) { # check for any characters after };
				ERROR("DT_STYLE", "newline does not follow immediately after };\n" . $herecurr);
			}

			if($line =~ /[0-9a-zA-Z,\._\+\?#]+\s*=/ && $line !~ /[0-9a-z,\._\+\?#]+\s*=/) { # find property names with uppercase characters
				ERROR("DT_PROPERTY_NAME", "property name is not lowercase\n" . $herecurr);
			}
		}

# line length limit (with some exclusions)
# line length limit (with some exclusions)
#
#
# There are a few types of lines that may extend beyond $max_line_length:
# There are a few types of lines that may extend beyond $max_line_length: