aboutsummaryrefslogtreecommitdiffstats
path: root/module/zstd
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2023-01-10 14:03:46 -0500
committerBrian Behlendorf <[email protected]>2023-01-12 15:59:12 -0800
commit7384ec65cd6b44511f0cdf54768bfe583ce14a27 (patch)
tree667c1fb0bda71cbda4687e1a448cfba3b20c1537 /module/zstd
parent80d64bb85fcfb07b9fb57ed75bf6356239632ba2 (diff)
Cleanup: Remove unnecessary explicit casts of pointers from allocators
The Linux 5.16.14 kernel's coccicheck caught these. The semantic patch that caught them was: ./scripts/coccinelle/api/alloc/alloc_cast.cocci Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #14372
Diffstat (limited to 'module/zstd')
-rw-r--r--module/zstd/zfs_zstd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zstd/zfs_zstd.c b/module/zstd/zfs_zstd.c
index 1bb95e460..ed0271a8d 100644
--- a/module/zstd/zfs_zstd.c
+++ b/module/zstd/zfs_zstd.c
@@ -784,9 +784,9 @@ create_fallback_mem(struct zstd_fallback_mem *mem, size_t size)
static void __init
zstd_mempool_init(void)
{
- zstd_mempool_cctx = (struct zstd_pool *)
+ zstd_mempool_cctx =
kmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP);
- zstd_mempool_dctx = (struct zstd_pool *)
+ zstd_mempool_dctx =
kmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP);
for (int i = 0; i < ZSTD_POOL_MAX; i++) {