lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 29 Jun 2017 13:04:04 +0530
From:   Jaya Durga <rjdurga@...il.com>
To:     gregkh@...uxfoundation.org
Cc:     labbott@...hat.com, sumit.semwal@...aro.org, arve@...roid.com,
        riandrews@...roid.com, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, Jaya Durga <rjdurga@...il.com>,
        Jaya Durga <jayad@...c.in>
Subject: [PATCH 5/5] Staging: android: ion_cma_heap.c: fix coding style of kmalloc usage

This patch fixes coding style of kmalloc usage
found by checkpatch.pl
CHECK: Prefer kmalloc(sizeof(*table)...) over
kmalloc(sizeof(struct sg_table)...)

Signed-off-by: Jaya Durga <jayad@...c.in>
---
 drivers/staging/android/ion/ion_cma_heap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c
index a0949bc..5099298 100644
--- a/drivers/staging/android/ion/ion_cma_heap.c
+++ b/drivers/staging/android/ion/ion_cma_heap.c
@@ -46,7 +46,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
 	if (!pages)
 		return -ENOMEM;
 
-	table = kmalloc(sizeof(struct sg_table), GFP_KERNEL);
+	table = kmalloc(sizeof(*table), GFP_KERNEL);
 	if (!table)
 		goto err;
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ