diff options
author | Julia Lawall <julia@diku.dk> | 2010-05-11 14:26:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 19:06:48 -0400 |
commit | 324148788bf3744d90fb6894ec5744eb0ca91b74 (patch) | |
tree | bb6a978e2c0ee43fd1588a898e9277f619b31c91 /drivers/staging/vme/bridges | |
parent | a05d08c40c0775e4691cffcfbfceeb4270987208 (diff) |
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>
Diffstat (limited to 'drivers/staging/vme/bridges')
-rw-r--r-- | drivers/staging/vme/bridges/vme_ca91cx42.c | 3 | ||||
-rw-r--r-- | drivers/staging/vme/bridges/vme_tsi148.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index b9f986b856e..c35dead64a3 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c | |||
@@ -941,8 +941,7 @@ int ca91cx42_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *src, | |||
941 | dev = list->parent->parent->parent; | 941 | dev = list->parent->parent->parent; |
942 | 942 | ||
943 | /* XXX descriptor must be aligned on 64-bit boundaries */ | 943 | /* XXX descriptor must be aligned on 64-bit boundaries */ |
944 | entry = (struct ca91cx42_dma_entry *) | 944 | entry = kmalloc(sizeof(struct ca91cx42_dma_entry), GFP_KERNEL); |
945 | kmalloc(sizeof(struct ca91cx42_dma_entry), GFP_KERNEL); | ||
946 | if (entry == NULL) { | 945 | if (entry == NULL) { |
947 | dev_err(dev, "Failed to allocate memory for dma resource " | 946 | dev_err(dev, "Failed to allocate memory for dma resource " |
948 | "structure\n"); | 947 | "structure\n"); |
diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index 25987d4069f..7539cce6e2a 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c | |||
@@ -2309,7 +2309,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2309 | if (err_chk) { | 2309 | if (err_chk) { |
2310 | master_num--; | 2310 | master_num--; |
2311 | 2311 | ||
2312 | tsi148_device->flush_image = (struct vme_master_resource *) | 2312 | tsi148_device->flush_image = |
2313 | kmalloc(sizeof(struct vme_master_resource), GFP_KERNEL); | 2313 | kmalloc(sizeof(struct vme_master_resource), GFP_KERNEL); |
2314 | if (tsi148_device->flush_image == NULL) { | 2314 | if (tsi148_device->flush_image == NULL) { |
2315 | dev_err(&pdev->dev, "Failed to allocate memory for " | 2315 | dev_err(&pdev->dev, "Failed to allocate memory for " |