From: Jaya Durga <rjdurga@gmail.com>
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 <rjdurga@gmail.com>,
Jaya Durga <jayad@cdac.in>
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 [thread overview]
Message-ID: <1498721644-17995-1-git-send-email-rjdurga@gmail.com> (raw)
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@cdac.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
reply other threads:[~2017-06-29 7:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1498721644-17995-1-git-send-email-rjdurga@gmail.com \
--to=rjdurga@gmail.com \
--cc=arve@android.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jayad@cdac.in \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riandrews@android.com \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome