aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/Context.c
diff options
context:
space:
mode:
authorIlpo Järvinen <[email protected]>2023-03-09 10:20:32 +0200
committerGreg Kroah-Hartman <[email protected]>2023-03-17 15:01:08 +0100
commit7e26c84d02d17e7412e6f2471916fd415654a1ba (patch)
tree45dad8770275398807603351ced02b55b6383e20 /tools/perf/scripts/python/Perf-Trace-Util/Context.c
parent9db1be84054b7445f911b9efe9bc3c924ffdb543 (diff)
n_tty: Use DIV_ROUND_UP() in room calculation
When PARMRK is set, a character can result in up to 3 chars in the read buffer. Receive code calculates for how many characters there (at least) is room. Convert an opencoded rounding in the calculation to use DIV_ROUND_UP(). Note: the room variable is decremented afterwards by one which ensures the characters will fit into the buffer for real so the code is okay despite rounding upwards. Signed-off-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/Context.c')
0 files changed, 0 insertions, 0 deletions