Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: zstd - Remove unnecessary size_t cast

Use max() instead of max_t() since zstd_cstream_workspace_bound() and
zstd_dstream_workspace_bound() already return size_t and casting the
values is unnecessary.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Thorsten Blum and committed by
Herbert Xu
2236fc00 6cf32607

+2 -3
+2 -3
crypto/zstd.c
··· 39 39 40 40 params = zstd_get_params(ZSTD_DEF_LEVEL, ZSTD_MAX_SIZE); 41 41 42 - wksp_size = max_t(size_t, 43 - zstd_cstream_workspace_bound(&params.cParams), 44 - zstd_dstream_workspace_bound(ZSTD_MAX_SIZE)); 42 + wksp_size = max(zstd_cstream_workspace_bound(&params.cParams), 43 + zstd_dstream_workspace_bound(ZSTD_MAX_SIZE)); 45 44 if (!wksp_size) 46 45 return ERR_PTR(-EINVAL); 47 46