You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Staging: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; @@ - (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a05d08c40c
commit
324148788b
@@ -941,8 +941,7 @@ int ca91cx42_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *src,
|
||||
dev = list->parent->parent->parent;
|
||||
|
||||
/* XXX descriptor must be aligned on 64-bit boundaries */
|
||||
entry = (struct ca91cx42_dma_entry *)
|
||||
kmalloc(sizeof(struct ca91cx42_dma_entry), GFP_KERNEL);
|
||||
entry = kmalloc(sizeof(struct ca91cx42_dma_entry), GFP_KERNEL);
|
||||
if (entry == NULL) {
|
||||
dev_err(dev, "Failed to allocate memory for dma resource "
|
||||
"structure\n");
|
||||
|
||||
@@ -2309,7 +2309,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
if (err_chk) {
|
||||
master_num--;
|
||||
|
||||
tsi148_device->flush_image = (struct vme_master_resource *)
|
||||
tsi148_device->flush_image =
|
||||
kmalloc(sizeof(struct vme_master_resource), GFP_KERNEL);
|
||||
if (tsi148_device->flush_image == NULL) {
|
||||
dev_err(&pdev->dev, "Failed to allocate memory for "
|
||||
|
||||
Reference in New Issue
Block a user