public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Phong Tran <tranmanphong@gmail.com>
To: gregkh@linuxfoundation.org
Cc: swetland@google.com, ccross@android.com,
	linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	Phong Tran <tranmanphong@gmail.com>
Subject: [PATCH 5/5] staging: android: ion: ion_dummy_driver.c Fix checkpatch warning
Date: Tue, 12 Aug 2014 23:17:30 +0700	[thread overview]
Message-ID: <1407860250-9779-6-git-send-email-tranmanphong@gmail.com> (raw)
In-Reply-To: <1407860250-9779-1-git-send-email-tranmanphong@gmail.com>

This patch fix coding style

- Replace kzalloc() by kcalloc()
- Remove return of void function

Tested by compilation

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
---
 drivers/staging/android/ion/ion_dummy_driver.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c
index 3a45e79..f3ea1c3 100644
--- a/drivers/staging/android/ion/ion_dummy_driver.c
+++ b/drivers/staging/android/ion/ion_dummy_driver.c
@@ -68,7 +68,7 @@ static int __init ion_dummy_init(void)
 	int i, err;
 
 	idev = ion_device_create(NULL);
-	heaps = kzalloc(sizeof(struct ion_heap *) * dummy_ion_pdata.nr,
+	heaps = kcalloc(dummy_ion_pdata.nr, sizeof(struct ion_heap *),
 			GFP_KERNEL);
 	if (!heaps)
 		return -ENOMEM;
@@ -152,7 +152,5 @@ static void __exit ion_dummy_exit(void)
 				dummy_heaps[ION_HEAP_TYPE_CHUNK].size);
 		chunk_ptr = NULL;
 	}
-
-	return;
 }
 __exitcall(ion_dummy_exit);
-- 
1.9.3


  parent reply	other threads:[~2014-08-12 16:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12 16:17 staging: android: ion checkpatch.pl cleanups Phong Tran
2014-08-12 16:17 ` [PATCH 1/5] staging: android: ion: ion.c Fix checkpatch warning Phong Tran
2014-08-12 16:37   ` [RFC PATCH] checkpatch: Warn on patch subjects with "checkpatch" Joe Perches
2014-08-13 10:37     ` Dan Carpenter
2014-08-12 16:17 ` [PATCH 2/5] staging: android: ion: ion_chunk_heap.c Fix checkpatch warning Phong Tran
2014-08-12 16:17 ` [PATCH 3/5] staging: android: ion: ion_system_heap.c " Phong Tran
2014-08-13 10:38   ` Dan Carpenter
2014-08-12 16:17 ` [PATCH 4/5] staging: android: ion: ion_carveout_heap.c " Phong Tran
2014-08-12 16:17 ` Phong Tran [this message]
2014-08-13 13:09 ` [Patch V2 1/3] staging: android: ion: ion_dummy_driver.c Fix coding style Phong Tran
2014-08-13 13:09   ` [Patch V2 2/3] staging: android: ion: ion.c " Phong Tran
2014-08-13 13:09   ` [Patch V2 3/3] staging: android: ion: " Phong Tran
2014-08-13 13:15   ` [Patch V2 1/3] staging: android: ion: ion_dummy_driver.c " Dan Carpenter
2014-08-13 13:37 ` [PATCH V3 1/3] staging: android: ion: ion_dummy_driver.c Replace kzalloc() by kcalloc() Phong Tran
2014-08-13 13:37   ` [PATCH V3 2/3] staging: android: ion: ion.c Add a new blank line after decleration Phong Tran
2014-08-13 13:37   ` [PATCH V3 3/3] staging: android: ion: Remove redundant return of void function Phong Tran

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=1407860250-9779-6-git-send-email-tranmanphong@gmail.com \
    --to=tranmanphong@gmail.com \
    --cc=ccross@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swetland@google.com \
    /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