mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
dtc: dt-check-style: Right strip whitespaces, leftovers before comments
Stripping a comment from a line to get the code leads trailing whitespace (e.g. in a line like "enable-active-high; /* comment */") which will break DtsLine.code.endswith() checks. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20260915-b4-dts-style-checker-continued-lines-v4-5-5b8e09b11ef2@oss.qualcomm.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This commit is contained in:
parent
c6138ed5ce
commit
897e4c0de6
|
|
@ -91,7 +91,8 @@ class DtsLine:
|
|||
self.indent_str = indent_str # leading whitespace as-is
|
||||
self.depth = depth
|
||||
self.stripped = stripped # Code without indentation
|
||||
self.code = _strip_strings_and_comments(stripped) # Only the code, skipping trailing comments
|
||||
# Only the code, skipping trailing comments and space between code and trailing comment
|
||||
self.code = _strip_strings_and_comments(stripped).rstrip()
|
||||
self.is_root = is_root
|
||||
self.prop_name = None
|
||||
self.continuations = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user