Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752415AbdF2HjE (ORCPT ); Thu, 29 Jun 2017 03:39:04 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36741 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752130AbdF2Hiz (ORCPT ); Thu, 29 Jun 2017 03:38:55 -0400 From: Jaya Durga To: gregkh@linuxfoundation.org Cc: labbott@redhat.com, sumit.semwal@linaro.org, arve@android.com, riandrews@android.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jaya Durga , Jaya Durga Subject: [PATCH 5/5] Staging: android: ion_cma_heap.c: fix coding style of kmalloc usage Date: Thu, 29 Jun 2017 13:04:04 +0530 Message-Id: <1498721644-17995-1-git-send-email-rjdurga@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 800 Lines: 25 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 --- 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