linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: Android: fix code style in ion_cma_heap.c
@ 2017-08-24 15:40 Abishek V Ashok
  2017-08-24 15:55 ` Laura Abbott
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Abishek V Ashok @ 2017-08-24 15:40 UTC (permalink / raw)
  To: labbott, gregkh, sumit.semwal; +Cc: devel, linux-kernel, Abishek V Ashok

This is a patch to the ion_cma_heap.c file in
/drivers/staging/andrioid/ion that fixes a blank line and
kmalloc size warning found by the checkpatch.pl tool.

Signed-off-by: Abhishek V Ashok <abishekvashok@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 a0949bc0..1589b9e0 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(struct * table), GFP_KERNEL);
 	if (!table)
 		goto err;

--
2.11.0

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

* Re: [PATCH] Staging: Android: fix code style in ion_cma_heap.c
  2017-08-24 15:40 [PATCH] Staging: Android: fix code style in ion_cma_heap.c Abishek V Ashok
@ 2017-08-24 15:55 ` Laura Abbott
  2017-08-24 19:07 ` Dan Carpenter
  2017-08-24 20:50 ` Joe Perches
  2 siblings, 0 replies; 4+ messages in thread
From: Laura Abbott @ 2017-08-24 15:55 UTC (permalink / raw)
  To: Abishek V Ashok, gregkh, sumit.semwal; +Cc: devel, linux-kernel

On 08/24/2017 08:40 AM, Abishek V Ashok wrote:
> This is a patch to the ion_cma_heap.c file in
> /drivers/staging/andrioid/ion that fixes a blank line and
> kmalloc size warning found by the checkpatch.pl tool.
> 

You've done two things in this patch, please stick to a single
change per patch.

> Signed-off-by: Abhishek V Ashok <abishekvashok@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 a0949bc0..1589b9e0 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(struct * table), GFP_KERNEL);
>  	if (!table)
>  		goto err;
> 
> --
> 2.11.0
> 

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

* Re: [PATCH] Staging: Android: fix code style in ion_cma_heap.c
  2017-08-24 15:40 [PATCH] Staging: Android: fix code style in ion_cma_heap.c Abishek V Ashok
  2017-08-24 15:55 ` Laura Abbott
@ 2017-08-24 19:07 ` Dan Carpenter
  2017-08-24 20:50 ` Joe Perches
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-08-24 19:07 UTC (permalink / raw)
  To: Abishek V Ashok; +Cc: labbott, gregkh, sumit.semwal, devel, linux-kernel

On Thu, Aug 24, 2017 at 09:10:50PM +0530, Abishek V Ashok wrote:
> @@ -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(struct * table), GFP_KERNEL);

You didn't try compile this.

regards,
dan carpenter

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

* Re: [PATCH] Staging: Android: fix code style in ion_cma_heap.c
  2017-08-24 15:40 [PATCH] Staging: Android: fix code style in ion_cma_heap.c Abishek V Ashok
  2017-08-24 15:55 ` Laura Abbott
  2017-08-24 19:07 ` Dan Carpenter
@ 2017-08-24 20:50 ` Joe Perches
  2 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2017-08-24 20:50 UTC (permalink / raw)
  To: Abishek V Ashok, labbott, gregkh, sumit.semwal; +Cc: devel, linux-kernel

On Thu, 2017-08-24 at 21:10 +0530, Abishek V Ashok wrote:
> This is a patch to the ion_cma_heap.c file in
> /drivers/staging/andrioid/ion that fixes a blank line and
> kmalloc size warning found by the checkpatch.pl tool.
[]
> diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c
[]
> @@ -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(struct * table), GFP_KERNEL);

Please make sure you compile the files modified by
your proposed patches before sending the patches.

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

end of thread, other threads:[~2017-08-24 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-24 15:40 [PATCH] Staging: Android: fix code style in ion_cma_heap.c Abishek V Ashok
2017-08-24 15:55 ` Laura Abbott
2017-08-24 19:07 ` Dan Carpenter
2017-08-24 20:50 ` Joe Perches

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).