Skip to content

Remove unneeded casts of memory-alloc function return values

Firo Yang kernel-janitors 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15reiserfs: Avoid pointless casts of kmem_cache_alloc() return value.fs/reiserfs/super.c+1 -20 replies
2/15proc: Remove unnecessary cast of allocation return valuefs/proc/inode.c+1 -10 replies
3/15nfs: Remove unneeded kmem_cache_alloc() return value casts in nfsfs/nfs/inode.c+1 -10 replies
4/15ncpfs: Get rid of some pointless allocation castsfs/ncpfs/inode.c+1 -10 replies
5/15minix: No need to cast kmem_cache_alloc() return value in minixfs/minix/inode.c+1 -10 replies
6/15hpfs:Remove explicit casts of kmem_cache_alloc() return valuefs/hpfs/super.c+1 -10 replies
7/15efs:Remove unneeded kmem_cache_alloc() return value castsfs/efs/super.c+1 -10 replies
8/15adfs:Remove unneeded kmem_cache_alloc() return value castfs/adfs/super.c+1 -11 reply
9/159p:kzalloc() returns void pointer, no need to castfs/9p/vfs_inode.c+1 -20 replies
10/15scsi: kzalloc() returns void pointer, no need to castdrivers/scsi/lpfc/lpfc_init.c+1 -20 replies
11/15scsi: kzalloc() returns void pointer, no need to cast in hpsa driverdrivers/scsi/hpsa.c+1 -20 replies
12/15gpu:No need to cast kmalloc() return values in AMD kfd driverdrivers/gpu/drm/amd/amdkfd/kfd_process.c+1 -21 reply
13/15block: Do not do pointless kmalloc return value cast in cciss driver.drivers/block/cciss_scsi.c+1 -20 replies
14/15arm: Remove pointless kmalloc() return value cast in kvm mmu.arch/arm/kvm/mmu.c+2 -21 reply
15/15x86:Get rid of pointless cast of kzalloc() return value in crypto shaarch/x86/crypto/sha-mb/sha1_mb.c+2 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/15]Remove unneeded casts of memory-alloc function return values

The memory-alloc() functions return a void pointer, so when assigning to a pointer type variable there is no need to cast the return value.