diff options
author | 2024-09-16 13:30:49 -0300 | |
---|---|---|
committer | 2024-09-16 20:10:39 -0500 | |
commit | 5ac1f99fdd09d80223e8f47dffaea41a6563aace (patch) | |
tree | d8c4bea7ef360eefb35f2d5d2e3d3ce64176a97f /scripts/generate_rust_analyzer.py | |
parent | cifs: Update SFU comments about fifos and sockets (diff) | |
download | linux-rng-5ac1f99fdd09d80223e8f47dffaea41a6563aace.tar.xz linux-rng-5ac1f99fdd09d80223e8f47dffaea41a6563aace.zip |
smb: client: fix compression heuristic functions
Change is_compressible() return type to bool, use WARN_ON_ONCE(1) for
internal errors and return false for those.
Renames:
check_repeated_data -> has_repeated_data
check_ascii_bytes -> is_mostly_ascii (also refactor into a single loop)
calc_shannon_entropy -> has_low_entropy
Also wraps "wreq->Length" in le32_to_cpu() in should_compress() (caught
by sparse).
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions