public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Youngdo, Lee" <oss.ydlee@gmail.com>
To: gregkh@linuxfoundation.org, labbott@redhat.com,
	sumit.semwal@linaro.org, arve@android.com, riandrews@android.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	"Youngdo, Lee" <oss.ydlee@gmail.com>
Subject: [PATCH] staging: android: ion: fix coding style issue
Date: Sat, 11 Feb 2017 00:29:15 +0900	[thread overview]
Message-ID: <1486740555-4605-1-git-send-email-oss.ydlee@gmail.com> (raw)

Replaced sizeof(struct foo) into sizeof(*ptr), found by checkpatch.pl.

Signed-off-by: Youngdo, Lee <oss.ydlee@gmail.com>
---
 drivers/staging/android/ion/ion_cma_heap.c | 6 +++---
 1 file 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 22b9582..6c40685 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);
-- 
1.9.1

             reply	other threads:[~2017-02-10 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10 15:29 Youngdo, Lee [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-04-23 10:07 [PATCH] staging: android: ion: fix coding style issue Adheer Chandravanshi
2017-04-25 18:56 ` Greg KH
2017-04-26 16:34   ` adheer chandravanshi

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=1486740555-4605-1-git-send-email-oss.ydlee@gmail.com \
    --to=oss.ydlee@gmail.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --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