public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/3] Staging: android: ion: fix coding style
       [not found] <5593EA18.8060109@zoho.com>
@ 2015-07-01 13:46 ` Sohny Thomas
  2015-07-01 14:18   ` Frans Klaver
  2015-07-01 14:29   ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Sohny Thomas @ 2015-07-01 13:46 UTC (permalink / raw)
  To: gregkh, arve, riandrews, sumit.semwal, carlos
  Cc: kernel-janitors, linux-kernel@vger.kernel.org


- Fixed 80 char limit exceeding line
  and a newline after declarations as per checkpatch.pl

Signed-of-by: Sohny Thomas <sohnythomas@zoho.com>
---
 drivers/staging/android/ion/ion.c            | 1 +
 drivers/staging/android/ion/ion_chunk_heap.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 6f48112..e44f5e6 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1106,6 +1106,7 @@ struct dma_buf *ion_share_dma_buf(struct ion_client *client,
 	struct ion_buffer *buffer;
 	struct dma_buf *dmabuf;
 	bool valid_handle;
+
 	DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
 
 	mutex_lock(&client->lock);
diff --git a/drivers/staging/android/ion/ion_chunk_heap.c b/drivers/staging/android/ion/ion_chunk_heap.c
index 5474615..0813163 100644
--- a/drivers/staging/android/ion/ion_chunk_heap.c
+++ b/drivers/staging/android/ion/ion_chunk_heap.c
@@ -173,8 +173,8 @@ struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data)
 	chunk_heap->heap.ops = &chunk_heap_ops;
 	chunk_heap->heap.type = ION_HEAP_TYPE_CHUNK;
 	chunk_heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE;
-	pr_debug("%s: base %lu size %zu align %ld\n", __func__, chunk_heap->base,
-		heap_data->size, heap_data->align);
+	pr_debug("%s: base %lu size %zu align %ld\n", __func__,
+		chunk_heap->base, heap_data->size, heap_data->align);
 
 	return &chunk_heap->heap;
 
-- 




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

* Re: [PATCH v2 2/3] Staging: android: ion: fix coding style
  2015-07-01 13:46 ` [PATCH v2 2/3] Staging: android: ion: fix coding style Sohny Thomas
@ 2015-07-01 14:18   ` Frans Klaver
  2015-07-01 14:29   ` Dan Carpenter
  1 sibling, 0 replies; 4+ messages in thread
From: Frans Klaver @ 2015-07-01 14:18 UTC (permalink / raw)
  To: Sohny Thomas
  Cc: Greg KH, arve, riandrews, Sumit Semwal, carlos, kernel-janitors,
	linux-kernel@vger.kernel.org

On Wed, Jul 1, 2015 at 3:46 PM, Sohny Thomas <sohnythomas@zoho.com> wrote:
>
> - Fixed 80 char limit exceeding line
>   and a newline after declarations as per checkpatch.pl
>
> Signed-of-by: Sohny Thomas <sohnythomas@zoho.com>

You can remove the dash, and fix the -off- typo (hint: use 'git commit
-s' for automating it). Maybe hint towards what coding style is fixed
in the summary:

staging: android: ion: fix line over 80 characters

> ---
>  drivers/staging/android/ion/ion.c            | 1 +
>  drivers/staging/android/ion/ion_chunk_heap.c | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
> index 6f48112..e44f5e6 100644
> --- a/drivers/staging/android/ion/ion.c
> +++ b/drivers/staging/android/ion/ion.c
> @@ -1106,6 +1106,7 @@ struct dma_buf *ion_share_dma_buf(struct ion_client *client,
>         struct ion_buffer *buffer;
>         struct dma_buf *dmabuf;
>         bool valid_handle;
> +
>         DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
>
>         mutex_lock(&client->lock);
> diff --git a/drivers/staging/android/ion/ion_chunk_heap.c b/drivers/staging/android/ion/ion_chunk_heap.c
> index 5474615..0813163 100644
> --- a/drivers/staging/android/ion/ion_chunk_heap.c
> +++ b/drivers/staging/android/ion/ion_chunk_heap.c
> @@ -173,8 +173,8 @@ struct ion_heap *ion_chunk_heap_create(struct ion_platform_heap *heap_data)
>         chunk_heap->heap.ops = &chunk_heap_ops;
>         chunk_heap->heap.type = ION_HEAP_TYPE_CHUNK;
>         chunk_heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE;
> -       pr_debug("%s: base %lu size %zu align %ld\n", __func__, chunk_heap->base,
> -               heap_data->size, heap_data->align);
> +       pr_debug("%s: base %lu size %zu align %ld\n", __func__,
> +               chunk_heap->base, heap_data->size, heap_data->align);
>
>         return &chunk_heap->heap;
>
> --
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/3] Staging: android: ion: fix coding style
  2015-07-01 13:46 ` [PATCH v2 2/3] Staging: android: ion: fix coding style Sohny Thomas
  2015-07-01 14:18   ` Frans Klaver
@ 2015-07-01 14:29   ` Dan Carpenter
  2015-07-01 15:25     ` [PATCH] checkpatch: Allow longer declaration macros Joe Perches
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2015-07-01 14:29 UTC (permalink / raw)
  To: Sohny Thomas
  Cc: gregkh, arve, riandrews, sumit.semwal, carlos, kernel-janitors,
	linux-kernel@vger.kernel.org

On Wed, Jul 01, 2015 at 07:16:44PM +0530, Sohny Thomas wrote:
> 
> - Fixed 80 char limit exceeding line
>   and a newline after declarations as per checkpatch.pl
> 
> Signed-of-by: Sohny Thomas <sohnythomas@zoho.com>
> ---
>  drivers/staging/android/ion/ion.c            | 1 +
>  drivers/staging/android/ion/ion_chunk_heap.c | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
> index 6f48112..e44f5e6 100644
> --- a/drivers/staging/android/ion/ion.c
> +++ b/drivers/staging/android/ion/ion.c
> @@ -1106,6 +1106,7 @@ struct dma_buf *ion_share_dma_buf(struct ion_client *client,
>  	struct ion_buffer *buffer;
>  	struct dma_buf *dmabuf;
>  	bool valid_handle;
> +
>  	DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
>  
>  	mutex_lock(&client->lock);


This is a false positive in checkpatch.pl.  Just leave it as is.

regards,
dan carpenter


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

* [PATCH] checkpatch: Allow longer declaration macros
  2015-07-01 14:29   ` Dan Carpenter
@ 2015-07-01 15:25     ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2015-07-01 15:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Dan Carpenter, Sohny Thomas, gregkh, arve, riandrews,
	sumit.semwal, carlos, linux-kernel

Some really long declaration macros exist.

For instance;
  	DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
and
	DECLARE_DM_KCOPYD_THROTTLE_WITH_MODULE_PARM(name, description)

Increase the limit from 2 words to 6 after DECLARE/DEFINE uses.

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 90e1edc..75737a7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -584,7 +584,7 @@ our $LvalOrFunc	= qr{((?:[\&\*]\s*)?$Lval)\s*($balanced_parens{0,1})\s*};
 our $FuncArg = qr{$Typecast{0,1}($LvalOrFunc|$Constant|$String)};
 
 our $declaration_macros = qr{(?x:
-	(?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,2}\s*\(|
+	(?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(|
 	(?:$Storage\s+)?LIST_HEAD\s*\(|
 	(?:$Storage\s+)?${Type}\s+uninitialized_var\s*\(
 )};



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

end of thread, other threads:[~2015-07-01 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5593EA18.8060109@zoho.com>
2015-07-01 13:46 ` [PATCH v2 2/3] Staging: android: ion: fix coding style Sohny Thomas
2015-07-01 14:18   ` Frans Klaver
2015-07-01 14:29   ` Dan Carpenter
2015-07-01 15:25     ` [PATCH] checkpatch: Allow longer declaration macros Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox