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

Commit 52034352 authored by Prathyush Katukojwala's avatar Prathyush Katukojwala
Browse files

checkpatch: Only newline after };



Report an error if a "};" in a DT file is followed by anything
but a newline.

Change-Id: Idf41bde798b0f7991fd758d6e89e65406b9d1aee
Signed-off-by: default avatarPrathyush Katukojwala <pkatukoj@codeaurora.org>
parent 4d9a308b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2963,6 +2963,15 @@ sub process {
# 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)$/);

# do DT checks:
#       * 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);
			}
		}

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