linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: staging: android: Fix style/formatting issues
@ 2017-08-23  1:04 Nick Fox
  2017-08-23  1:38 ` Greg KH
  2017-08-23  2:55 ` [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch) Nick Fox
  0 siblings, 2 replies; 7+ messages in thread
From: Nick Fox @ 2017-08-23  1:04 UTC (permalink / raw)
  To: greg; +Cc: arve, riandrews, devel, linux-kernel, Nick Fox

Fix two issues reported by checkpatch. The first removes an extra
blank line, the second changes an argument to kmalloc(). Original
checkpatch output is below:

ion/ion_cma_heap.c:34: CHECK: Please don't use multiple blank lines
ion/ion_cma_heap.c:49: CHECK: Prefer kmalloc(sizeof(*table)...) over kmalloc(sizeof(struct sg_table)...)
total: 0 errors, 0 warnings, 2 checks, 128 lines checked

Signed-off-by: Nick Fox <fox.nicholas.j@gmail.com>
---
 drivers/staging/android/ion/ion_cma_heap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c
index a0949bc0dcf4..bb2c1449cbcf 100644
--- a/drivers/staging/android/ion/ion_cma_heap.c
+++ b/drivers/staging/android/ion/ion_cma_heap.c
@@ -31,7 +31,6 @@ struct ion_cma_heap {
 
 #define to_cma_heap(x) container_of(x, struct ion_cma_heap, heap)
 
-
 /* ION CMA heap operations functions */
 static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
 			    unsigned long len,
@@ -46,7 +45,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;
 
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drivers: staging: android: Fix style/formatting issues
  2017-08-23  1:04 [PATCH] drivers: staging: android: Fix style/formatting issues Nick Fox
@ 2017-08-23  1:38 ` Greg KH
  2017-08-23  2:55 ` [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch) Nick Fox
  1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2017-08-23  1:38 UTC (permalink / raw)
  To: Nick Fox; +Cc: arve, riandrews, devel, linux-kernel

On Tue, Aug 22, 2017 at 09:04:50PM -0400, Nick Fox wrote:
> Fix two issues reported by checkpatch. The first removes an extra
> blank line, the second changes an argument to kmalloc(). Original
> checkpatch output is below:

That should be two different patches, please break this up.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch)
  2017-08-23  1:04 [PATCH] drivers: staging: android: Fix style/formatting issues Nick Fox
  2017-08-23  1:38 ` Greg KH
@ 2017-08-23  2:55 ` Nick Fox
  2017-08-23  2:55   ` [PATCH 2/2] staging: android: ion: Change argument to kmalloc (checkpatch) Nick Fox
  2017-08-23  5:38   ` [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch) Greg KH
  1 sibling, 2 replies; 7+ messages in thread
From: Nick Fox @ 2017-08-23  2:55 UTC (permalink / raw)
  To: greg; +Cc: arve, riandrews, devel, linux-kernel, Nick Fox

Remove extra blank line (reported by checkpatch.pl)

Signed-off-by: Nick Fox <fox.nicholas.j@gmail.com>
---
 drivers/staging/android/ion/ion_cma_heap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c
index a0949bc0dcf4..b06f4cee9c7c 100644
--- a/drivers/staging/android/ion/ion_cma_heap.c
+++ b/drivers/staging/android/ion/ion_cma_heap.c
@@ -31,7 +31,6 @@ struct ion_cma_heap {
 
 #define to_cma_heap(x) container_of(x, struct ion_cma_heap, heap)
 
-
 /* ION CMA heap operations functions */
 static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
 			    unsigned long len,
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] staging: android: ion: Change argument to kmalloc (checkpatch)
  2017-08-23  2:55 ` [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch) Nick Fox
@ 2017-08-23  2:55   ` Nick Fox
  2017-08-23  5:38     ` Greg KH
  2017-08-23  5:38   ` [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch) Greg KH
  1 sibling, 1 reply; 7+ messages in thread
From: Nick Fox @ 2017-08-23  2:55 UTC (permalink / raw)
  To: greg; +Cc: arve, riandrews, devel, linux-kernel, Nick Fox

Change argument to kmalloc() to fix style issue, reported by checkpatch

Signed-off-by: Nick Fox <fox.nicholas.j@gmail.com>
---
 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 b06f4cee9c7c..bb2c1449cbcf 100644
--- a/drivers/staging/android/ion/ion_cma_heap.c
+++ b/drivers/staging/android/ion/ion_cma_heap.c
@@ -45,7 +45,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;
 
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] staging: android: ion: Change argument to kmalloc (checkpatch)
  2017-08-23  2:55   ` [PATCH 2/2] staging: android: ion: Change argument to kmalloc (checkpatch) Nick Fox
@ 2017-08-23  5:38     ` Greg KH
       [not found]       ` <CAAmVuH--a1Z0BmTAjvR5O-zobwGsVCQ+BqBZ8Wunsc0SY5W4Dw@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2017-08-23  5:38 UTC (permalink / raw)
  To: Nick Fox; +Cc: arve, riandrews, devel, linux-kernel

On Tue, Aug 22, 2017 at 10:55:37PM -0400, Nick Fox wrote:
> Change argument to kmalloc() to fix style issue, reported by checkpatch
> 
> Signed-off-by: Nick Fox <fox.nicholas.j@gmail.com>
> ---
>  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 b06f4cee9c7c..bb2c1449cbcf 100644
> --- a/drivers/staging/android/ion/ion_cma_heap.c
> +++ b/drivers/staging/android/ion/ion_cma_heap.c
> @@ -45,7 +45,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);

This doesn't apply to linux-next at all, what tree are you working
against?  Always work off of the correct tree please...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch)
  2017-08-23  2:55 ` [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch) Nick Fox
  2017-08-23  2:55   ` [PATCH 2/2] staging: android: ion: Change argument to kmalloc (checkpatch) Nick Fox
@ 2017-08-23  5:38   ` Greg KH
  1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2017-08-23  5:38 UTC (permalink / raw)
  To: Nick Fox; +Cc: arve, riandrews, devel, linux-kernel

On Tue, Aug 22, 2017 at 10:55:36PM -0400, Nick Fox wrote:
> Remove extra blank line (reported by checkpatch.pl)
> 
> Signed-off-by: Nick Fox <fox.nicholas.j@gmail.com>
> ---
>  drivers/staging/android/ion/ion_cma_heap.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c
> index a0949bc0dcf4..b06f4cee9c7c 100644
> --- a/drivers/staging/android/ion/ion_cma_heap.c
> +++ b/drivers/staging/android/ion/ion_cma_heap.c
> @@ -31,7 +31,6 @@ struct ion_cma_heap {
>  
>  #define to_cma_heap(x) container_of(x, struct ion_cma_heap, heap)
>  
> -

Also doesn't apply...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] staging: android: ion: Change argument to kmalloc (checkpatch)
       [not found]       ` <CAAmVuH--a1Z0BmTAjvR5O-zobwGsVCQ+BqBZ8Wunsc0SY5W4Dw@mail.gmail.com>
@ 2017-08-23 23:18         ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2017-08-23 23:18 UTC (permalink / raw)
  To: Nick Fox; +Cc: arve, riandrews, devel, linux-kernel

On Wed, Aug 23, 2017 at 12:48:29PM -0400, Nick Fox wrote:
> Apologies for the spam, but I think my last reply got rejected by Google for
> some reason and didn't get delivered to the linux-kernel mailing list. My
> original reply is below:

You can not send html email to vger.kernel.org, it will be rejected,
please fix up your email client.  Also please do not top-post on mailing
lists:

A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

> "Sorry about that--I'm brand new to contributing and got mixed up about which
> tree to use. Just so I'm understanding correctly, https://git.kernel.org/pub/
> scm/linux/kernel/git/next/linux-next.git/ is the tree I should be using to work
> on staging drivers?

It is the tree you should be using to do any new kernel development on,
but if you specifically want to work on staging drivers, the staging.git
tree on git.kernel.org is the place to work off of, specifically the
staging-next branch there.

hope this helps,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-23 23:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23  1:04 [PATCH] drivers: staging: android: Fix style/formatting issues Nick Fox
2017-08-23  1:38 ` Greg KH
2017-08-23  2:55 ` [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch) Nick Fox
2017-08-23  2:55   ` [PATCH 2/2] staging: android: ion: Change argument to kmalloc (checkpatch) Nick Fox
2017-08-23  5:38     ` Greg KH
     [not found]       ` <CAAmVuH--a1Z0BmTAjvR5O-zobwGsVCQ+BqBZ8Wunsc0SY5W4Dw@mail.gmail.com>
2017-08-23 23:18         ` Greg KH
2017-08-23  5:38   ` [PATCH 1/2] staging: android: ion: Remove extra line (checkpatch) Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).