summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/parse_data_structs.py
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2025-11-19 11:01:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-21 18:30:39 +0100
commit977e75909db72e3ee70483a21aec7d745eef02b7 (patch)
tree0c89d9ef514428de453b1007ea9ce48efc39a8ab /tools/lib/python/kdoc/parse_data_structs.py
parent6c84a61ac023d581b4b9fcfa44532eaf15946f56 (diff)
tty: pty: use guard()s
Use guards in the pty code. This improves readability, makes error handling easier, and marks locked portions of code explicit. All that while being sure the lock is unlocked. pty_set_pktmode() is handled specially -- the conditions are inverted and return called if conditions unmet. This avoid double nested 'if's. The variable is renamed to want_pktmode so it is not confused with the current state of pktmode. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Link: https://patch.msgid.link/20251119100140.830761-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions