summaryrefslogtreecommitdiff
path: root/drivers/staging/android/ion/ion_cma_heap.c
diff options
context:
space:
mode:
authorYoungdo, Lee <oss.ydlee@gmail.com>2017-02-11 00:29:15 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-12 13:26:14 +0100
commit8a0e4b9e469c7bbaa206d81e2e7515e1abb1aa00 (patch)
tree7e64e5cea5d642d1c52f5c5ae4d03285bbf5ec57 /drivers/staging/android/ion/ion_cma_heap.c
parent563a8412c563cd68b90bb55603deb0a4d397d2bb (diff)
staging: android: ion: fix coding style issue
Replaced sizeof(struct foo) into sizeof(*ptr), found by checkpatch.pl. Signed-off-by: Youngdo, Lee <oss.ydlee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/ion/ion_cma_heap.c')
-rw-r--r--drivers/staging/android/ion/ion_cma_heap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c
index 22b958259dea..6c4068523781 100644
--- a/drivers/staging/android/ion/ion_cma_heap.c
+++ b/drivers/staging/android/ion/ion_cma_heap.c
@@ -55,7 +55,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
if (align > PAGE_SIZE)
return -EINVAL;
- info = kzalloc(sizeof(struct ion_cma_buffer_info), GFP_KERNEL);
+ info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
@@ -67,7 +67,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
goto err;
}
- info->table = kmalloc(sizeof(struct sg_table), GFP_KERNEL);
+ info->table = kmalloc(sizeof(*info->table), GFP_KERNEL);
if (!info->table)
goto free_mem;
@@ -140,7 +140,7 @@ struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *data)
{
struct ion_cma_heap *cma_heap;
- cma_heap = kzalloc(sizeof(struct ion_cma_heap), GFP_KERNEL);
+ cma_heap = kzalloc(sizeof(*cma_heap), GFP_KERNEL);
if (!cma_heap)
return ERR_PTR(-ENOMEM);