linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: android/ion: Fix coding style issues
@ 2017-01-11 21:20 Bogdan Purcareata
  2017-01-12  7:36 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Bogdan Purcareata @ 2017-01-11 21:20 UTC (permalink / raw)
  To: labbott, sumit.semwal, gregkh, arve, riandrews, devel, linux-kernel
  Cc: Bogdan Purcareata

Fix following checkpatch warnings:
- Lines over 80 characters
- void function with return statement
- Unaligned comment mark
- Header function prototypes missing variable names

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@gmail.com>
---
 drivers/staging/android/ion/ion-ioctl.c |  3 ++-
 drivers/staging/android/ion/ion_of.c    |  1 -
 drivers/staging/android/ion/ion_priv.h  | 40 ++++++++++++++++-----------------
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/android/ion/ion-ioctl.c b/drivers/staging/android/ion/ion-ioctl.c
index 7e7431d..e28fffb 100644
--- a/drivers/staging/android/ion/ion-ioctl.c
+++ b/drivers/staging/android/ion/ion-ioctl.c
@@ -111,7 +111,8 @@ long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		struct ion_handle *handle;
 
 		mutex_lock(&client->lock);
-		handle = ion_handle_get_by_id_nolock(client, data.handle.handle);
+		handle = ion_handle_get_by_id_nolock(client,
+							data.handle.handle);
 		if (IS_ERR(handle)) {
 			mutex_unlock(&client->lock);
 			return PTR_ERR(handle);
diff --git a/drivers/staging/android/ion/ion_of.c b/drivers/staging/android/ion/ion_of.c
index 46b2bb9..7791c70 100644
--- a/drivers/staging/android/ion/ion_of.c
+++ b/drivers/staging/android/ion/ion_of.c
@@ -161,7 +161,6 @@ static int rmem_ion_device_init(struct reserved_mem *rmem, struct device *dev)
 static void rmem_ion_device_release(struct reserved_mem *rmem,
 				    struct device *dev)
 {
-	return;
 }
 
 static const struct reserved_mem_ops rmem_dma_ops = {
diff --git a/drivers/staging/android/ion/ion_priv.h b/drivers/staging/android/ion/ion_priv.h
index 3c3b324..444a1a1 100644
--- a/drivers/staging/android/ion/ion_priv.h
+++ b/drivers/staging/android/ion/ion_priv.h
@@ -54,7 +54,7 @@
  *			handle, used for debugging
  * @pid:		pid of last client to reference this buffer in a
  *			handle, used for debugging
-*/
+ */
 struct ion_buffer {
 	struct kref ref;
 	union {
@@ -287,10 +287,10 @@ void ion_device_add_heap(struct ion_device *dev, struct ion_heap *heap);
  * some helpers for common operations on buffers using the sg_table
  * and vaddr fields
  */
-void *ion_heap_map_kernel(struct ion_heap *, struct ion_buffer *);
-void ion_heap_unmap_kernel(struct ion_heap *, struct ion_buffer *);
-int ion_heap_map_user(struct ion_heap *, struct ion_buffer *,
-			struct vm_area_struct *);
+void *ion_heap_map_kernel(struct ion_heap *heap, struct ion_buffer *buffer);
+void ion_heap_unmap_kernel(struct ion_heap *heap, struct ion_buffer *buffer);
+int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer,
+			struct vm_area_struct *vma);
 int ion_heap_buffer_zero(struct ion_buffer *buffer);
 int ion_heap_pages_zero(struct page *page, size_t size, pgprot_t pgprot);
 
@@ -371,21 +371,21 @@ size_t ion_heap_freelist_size(struct ion_heap *heap);
  * heaps as appropriate.
  */
 
-struct ion_heap *ion_heap_create(struct ion_platform_heap *);
-void ion_heap_destroy(struct ion_heap *);
-struct ion_heap *ion_system_heap_create(struct ion_platform_heap *);
-void ion_system_heap_destroy(struct ion_heap *);
+struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data);
+void ion_heap_destroy(struct ion_heap *heap);
+struct ion_heap *ion_system_heap_create(struct ion_platform_heap *unused);
+void ion_system_heap_destroy(struct ion_heap *heap);
 
-struct ion_heap *ion_system_contig_heap_create(struct ion_platform_heap *);
-void ion_system_contig_heap_destroy(struct ion_heap *);
+struct ion_heap *ion_system_contig_heap_create(struct ion_platform_heap *heap);
+void ion_system_contig_heap_destroy(struct ion_heap *heap);
 
-struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *);
-void ion_carveout_heap_destroy(struct ion_heap *);
+struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data);
+void ion_carveout_heap_destroy(struct ion_heap *heap);
 
-struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *);
-void ion_chunk_heap_destroy(struct ion_heap *);
-struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *);
-void ion_cma_heap_destroy(struct ion_heap *);
+struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data);
+void ion_chunk_heap_destroy(struct ion_heap *heap);
+struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *data);
+void ion_cma_heap_destroy(struct ion_heap *heap);
 
 /**
  * functions for creating and destroying a heap pool -- allows you
@@ -427,9 +427,9 @@ struct ion_page_pool {
 
 struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned int order,
 					   bool cached);
-void ion_page_pool_destroy(struct ion_page_pool *);
-struct page *ion_page_pool_alloc(struct ion_page_pool *);
-void ion_page_pool_free(struct ion_page_pool *, struct page *);
+void ion_page_pool_destroy(struct ion_page_pool *pool);
+struct page *ion_page_pool_alloc(struct ion_page_pool *pool);
+void ion_page_pool_free(struct ion_page_pool *pool, struct page *page);
 
 /** ion_page_pool_shrink - shrinks the size of the memory cached in the pool
  * @pool:		the pool
-- 
2.10.0

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

* Re: [PATCH] staging: android/ion: Fix coding style issues
  2017-01-11 21:20 [PATCH] staging: android/ion: Fix coding style issues Bogdan Purcareata
@ 2017-01-12  7:36 ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2017-01-12  7:36 UTC (permalink / raw)
  To: Bogdan Purcareata
  Cc: labbott, sumit.semwal, arve, riandrews, devel, linux-kernel

On Wed, Jan 11, 2017 at 11:20:39PM +0200, Bogdan Purcareata wrote:
> Fix following checkpatch warnings:
> - Lines over 80 characters
> - void function with return statement
> - Unaligned comment mark
> - Header function prototypes missing variable names

That's a lot of different things to be doing all in one patch.  Please
break this up into "one-logical-thing-per-patch" and send this as a
patch series.

And no, "fix coding style issues" is not "one logical thing".

thanks,

greg k-h

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

* Re: [PATCH] staging: android/ion: Fix coding style issues
  2017-01-10 21:40 Bogdan Purcareata
  2017-01-10 21:47 ` Greg KH
@ 2017-01-10 22:12 ` Joe Perches
  1 sibling, 0 replies; 5+ messages in thread
From: Joe Perches @ 2017-01-10 22:12 UTC (permalink / raw)
  To: Bogdan Purcareata, labbott, sumit.semwal, gregkh, arve,
	riandrews, devel, linux-kernel

On Tue, 2017-01-10 at 23:40 +0200, Bogdan Purcareata wrote:
> Fix following checkpatch warnings:
> - Lines over 80 characters
> - void function with return statement
> - Unaligned comment mark
> - Header function prototypes missing variable names

Please read Documentation/SubmittingPatches
(umm, make that Documentation/process/submitting-patches.rst)

Make sure to send the patch to yourself only until
you know you can apply it correctly and then send
it to the mailing list.

btw:

This should probably be a series of 4 patches, each
single patch doing one of the things listed above.

And do please use checkpatch on your proposed patches.

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

* Re: [PATCH] staging: android/ion: Fix coding style issues
  2017-01-10 21:40 Bogdan Purcareata
@ 2017-01-10 21:47 ` Greg KH
  2017-01-10 22:12 ` Joe Perches
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2017-01-10 21:47 UTC (permalink / raw)
  To: Bogdan Purcareata
  Cc: labbott, sumit.semwal, arve, riandrews, devel, linux-kernel

On Tue, Jan 10, 2017 at 11:40:30PM +0200, Bogdan Purcareata wrote:
> Fix following checkpatch warnings:
> - Lines over 80 characters
> - void function with return statement
> - Unaligned comment mark
> - Header function prototypes missing variable names
> 
> Sent against staging-next.
> 
> Signed-off-by: Bogdan Purcareata <bogdan.purcareata@gmail.com>
> ---
>  drivers/staging/android/ion/ion-ioctl.c |  3 ++-
>  drivers/staging/android/ion/ion_of.c    |  1 -
>  drivers/staging/android/ion/ion_priv.h  | 40
> ++++++++++++++++-----------------

Your patch is line-wrapped and can't be applied :(

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

* [PATCH] staging: android/ion: Fix coding style issues
@ 2017-01-10 21:40 Bogdan Purcareata
  2017-01-10 21:47 ` Greg KH
  2017-01-10 22:12 ` Joe Perches
  0 siblings, 2 replies; 5+ messages in thread
From: Bogdan Purcareata @ 2017-01-10 21:40 UTC (permalink / raw)
  To: labbott, sumit.semwal, gregkh, arve, riandrews, devel, linux-kernel

Fix following checkpatch warnings:
- Lines over 80 characters
- void function with return statement
- Unaligned comment mark
- Header function prototypes missing variable names

Sent against staging-next.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@gmail.com>
---
  drivers/staging/android/ion/ion-ioctl.c |  3 ++-
  drivers/staging/android/ion/ion_of.c    |  1 -
  drivers/staging/android/ion/ion_priv.h  | 40 
++++++++++++++++-----------------
  3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/android/ion/ion-ioctl.c 
b/drivers/staging/android/ion/ion-ioctl.c
index 7e7431d..e28fffb 100644
--- a/drivers/staging/android/ion/ion-ioctl.c
+++ b/drivers/staging/android/ion/ion-ioctl.c
@@ -111,7 +111,8 @@ long ion_ioctl(struct file *filp, unsigned int cmd, 
unsigned long arg)
  		struct ion_handle *handle;

  		mutex_lock(&client->lock);
-		handle = ion_handle_get_by_id_nolock(client, data.handle.handle);
+		handle = ion_handle_get_by_id_nolock(client,
+							data.handle.handle);
  		if (IS_ERR(handle)) {
  			mutex_unlock(&client->lock);
  			return PTR_ERR(handle);
diff --git a/drivers/staging/android/ion/ion_of.c 
b/drivers/staging/android/ion/ion_of.c
index 46b2bb9..7791c70 100644
--- a/drivers/staging/android/ion/ion_of.c
+++ b/drivers/staging/android/ion/ion_of.c
@@ -161,7 +161,6 @@ static int rmem_ion_device_init(struct reserved_mem 
*rmem, struct device *dev)
  static void rmem_ion_device_release(struct reserved_mem *rmem,
  				    struct device *dev)
  {
-	return;
  }

  static const struct reserved_mem_ops rmem_dma_ops = {
diff --git a/drivers/staging/android/ion/ion_priv.h 
b/drivers/staging/android/ion/ion_priv.h
index 3c3b324..444a1a1 100644
--- a/drivers/staging/android/ion/ion_priv.h
+++ b/drivers/staging/android/ion/ion_priv.h
@@ -54,7 +54,7 @@
   *			handle, used for debugging
   * @pid:		pid of last client to reference this buffer in a
   *			handle, used for debugging
-*/
+ */
  struct ion_buffer {
  	struct kref ref;
  	union {
@@ -287,10 +287,10 @@ void ion_device_add_heap(struct ion_device *dev, 
struct ion_heap *heap);
   * some helpers for common operations on buffers using the sg_table
-void *ion_heap_map_kernel(struct ion_heap *, struct ion_buffer *);
-void ion_heap_unmap_kernel(struct ion_heap *, struct ion_buffer *);
-int ion_heap_map_user(struct ion_heap *, struct ion_buffer *,
-			struct vm_area_struct *);
+void *ion_heap_map_kernel(struct ion_heap *heap, struct ion_buffer 
*buffer);
+void ion_heap_unmap_kernel(struct ion_heap *heap, struct ion_buffer 
*buffer);
+int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer,
+			struct vm_area_struct *vma);
  int ion_heap_buffer_zero(struct ion_buffer *buffer);
  int ion_heap_pages_zero(struct page *page, size_t size, pgprot_t pgprot);

@@ -371,21 +371,21 @@ size_t ion_heap_freelist_size(struct ion_heap *heap);
   * heaps as appropriate.
   */

-struct ion_heap *ion_heap_create(struct ion_platform_heap *);
-void ion_heap_destroy(struct ion_heap *);
-struct ion_heap *ion_system_heap_create(struct ion_platform_heap *);
-void ion_system_heap_destroy(struct ion_heap *);
+struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data);
+void ion_heap_destroy(struct ion_heap *heap);
+struct ion_heap *ion_system_heap_create(struct ion_platform_heap *unused);
+void ion_system_heap_destroy(struct ion_heap *heap);

-struct ion_heap *ion_system_contig_heap_create(struct ion_platform_heap *);
-void ion_system_contig_heap_destroy(struct ion_heap *);
+struct ion_heap *ion_system_contig_heap_create(struct ion_platform_heap 
*heap);
+void ion_system_contig_heap_destroy(struct ion_heap *heap);

-struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *);
-void ion_carveout_heap_destroy(struct ion_heap *);
+struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap 
*heap_data);
+void ion_carveout_heap_destroy(struct ion_heap *heap);

-struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *);
-void ion_chunk_heap_destroy(struct ion_heap *);
-struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *);
-void ion_cma_heap_destroy(struct ion_heap *);
+struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap 
*heap_data);
+void ion_chunk_heap_destroy(struct ion_heap *heap);
+struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *data);
+void ion_cma_heap_destroy(struct ion_heap *heap);

  /**
   * functions for creating and destroying a heap pool -- allows you
@@ -427,9 +427,9 @@ struct ion_page_pool {

  struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned 
int order,
  					   bool cached);
-void ion_page_pool_destroy(struct ion_page_pool *);
-struct page *ion_page_pool_alloc(struct ion_page_pool *);
-void ion_page_pool_free(struct ion_page_pool *, struct page *);
+void ion_page_pool_destroy(struct ion_page_pool *pool);
+struct page *ion_page_pool_alloc(struct ion_page_pool *pool);
+void ion_page_pool_free(struct ion_page_pool *pool, struct page *page);

  /** ion_page_pool_shrink - shrinks the size of the memory cached in 
the pool
   * @pool:		the pool
-- 
2.10.0

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

end of thread, other threads:[~2017-01-12  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 21:20 [PATCH] staging: android/ion: Fix coding style issues Bogdan Purcareata
2017-01-12  7:36 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2017-01-10 21:40 Bogdan Purcareata
2017-01-10 21:47 ` Greg KH
2017-01-10 22:12 ` 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).