diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2023-09-19 11:51:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-03 15:31:15 +0300 |
commit | 72369f2d493d4c0f4f0ed5a66b19c6912c4837ef (patch) | |
tree | cc319b10ba6fe68220feee01fbb24c1d0c12cf3c /tools/perf/scripts/python | |
parent | 1e619477a9c8d6e2ec05a53cda97558fdf9f440e (diff) | |
download | linux-72369f2d493d4c0f4f0ed5a66b19c6912c4837ef.tar.xz |
tty: n_tty: use min3() in copy_from_read_buf()
n is a minimum of:
* available chars in the ring buffer
* available chars in the ring buffer till the end of the ring buffer
* requested number (*nr)
We can use min3() for that instead of two min()s.
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230919085156.1578-4-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions