linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] staging: ion: Fix a coding style issue
       [not found] <20160922151758.GB3565@kroah.com>
@ 2016-09-22 15:59 ` Antti Keränen
  2016-09-22 20:15   ` Laura Abbott
  2016-09-22 15:59 ` [PATCH v3 2/2] " Antti Keränen
  1 sibling, 1 reply; 6+ messages in thread
From: Antti Keränen @ 2016-09-22 15:59 UTC (permalink / raw)
  To: labbott
  Cc: Antti Keränen, sumit.semwal, gregkh, arve, riandrews,
	bhaktipriya96, yudongbin, puck.chen, weiyongjun1, devel,
	linux-kernel

Remove unnecessary braces surrounding a single statement block

Signed-off-by: Antti Keränen <detegr@gmail.com>
---
 drivers/staging/android/ion/hisilicon/hi6220_ion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/ion/hisilicon/hi6220_ion.c b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
index 659aa71..bd45151 100644
--- a/drivers/staging/android/ion/hisilicon/hi6220_ion.c
+++ b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
@@ -82,9 +82,9 @@ static int hi6220_ion_remove(struct platform_device *pdev)
 
 	ipdev = platform_get_drvdata(pdev);
 
-	for (i = 0; i < ipdev->data->nr; i++) {
+	for (i = 0; i < ipdev->data->nr; i++)
 		ion_heap_destroy(ipdev->heaps[i]);
-	}
+
 	ion_destroy_platform_data(ipdev->data);
 	ion_device_destroy(ipdev->idev);
 
-- 
2.9.3

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

* [PATCH v3 2/2] staging: ion: Fix a coding style issue
       [not found] <20160922151758.GB3565@kroah.com>
  2016-09-22 15:59 ` [PATCH v3 1/2] staging: ion: Fix a coding style issue Antti Keränen
@ 2016-09-22 15:59 ` Antti Keränen
  2016-09-22 20:24   ` Laura Abbott
  1 sibling, 1 reply; 6+ messages in thread
From: Antti Keränen @ 2016-09-22 15:59 UTC (permalink / raw)
  To: labbott
  Cc: Antti Keränen, sumit.semwal, gregkh, arve, riandrews, devel,
	linux-kernel

Correctly align an unaligned block comment

Signed-off-by: Antti Keränen <detegr@gmail.com>
---
 drivers/staging/android/uapi/ion.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
index 647f130..e629394 100644
--- a/drivers/staging/android/uapi/ion.h
+++ b/drivers/staging/android/uapi/ion.h
@@ -57,7 +57,7 @@ enum ion_heap_type {
 					 * cached, ion will do cache
 					 * maintenance when the buffer is
 					 * mapped for dma
-					*/
+					 */
 #define ION_FLAG_CACHED_NEEDS_SYNC 2	/*
 					 * mappings of this buffer will created
 					 * at mmap time, if this is set
-- 
2.9.3

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

* Re: [PATCH v3 1/2] staging: ion: Fix a coding style issue
  2016-09-22 15:59 ` [PATCH v3 1/2] staging: ion: Fix a coding style issue Antti Keränen
@ 2016-09-22 20:15   ` Laura Abbott
  0 siblings, 0 replies; 6+ messages in thread
From: Laura Abbott @ 2016-09-22 20:15 UTC (permalink / raw)
  To: Antti Keränen
  Cc: sumit.semwal, gregkh, arve, riandrews, bhaktipriya96, yudongbin,
	puck.chen, weiyongjun1, devel, linux-kernel

On 09/22/2016 08:59 AM, Antti Keränen wrote:
> Remove unnecessary braces surrounding a single statement block
>

In the future, when sending different versions of a patch please
give a short summary of what's changed. I think this is just
a resend from v2 with more reviewers added but I'm not 100%
sure.

> Signed-off-by: Antti Keränen <detegr@gmail.com>
> ---

You can put your summary right here between the --- and the
diffstat.

>  drivers/staging/android/ion/hisilicon/hi6220_ion.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/android/ion/hisilicon/hi6220_ion.c b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
> index 659aa71..bd45151 100644
> --- a/drivers/staging/android/ion/hisilicon/hi6220_ion.c
> +++ b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
> @@ -82,9 +82,9 @@ static int hi6220_ion_remove(struct platform_device *pdev)
>
>  	ipdev = platform_get_drvdata(pdev);
>
> -	for (i = 0; i < ipdev->data->nr; i++) {
> +	for (i = 0; i < ipdev->data->nr; i++)
>  		ion_heap_destroy(ipdev->heaps[i]);
> -	}
> +
>  	ion_destroy_platform_data(ipdev->data);
>  	ion_device_destroy(ipdev->idev);
>
>

The patch looks fine though so assuming nothing else has
changed

Acked-by: Laura Abbott <labbott@redhat.com>

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

* Re: [PATCH v3 2/2] staging: ion: Fix a coding style issue
  2016-09-22 15:59 ` [PATCH v3 2/2] " Antti Keränen
@ 2016-09-22 20:24   ` Laura Abbott
  2016-09-23 18:03     ` [PATCH v4] " Antti Keränen
  0 siblings, 1 reply; 6+ messages in thread
From: Laura Abbott @ 2016-09-22 20:24 UTC (permalink / raw)
  To: Antti Keränen
  Cc: sumit.semwal, gregkh, arve, riandrews, devel, linux-kernel

On 09/22/2016 08:59 AM, Antti Keränen wrote:
> Correctly align an unaligned block comment
>
> Signed-off-by: Antti Keränen <detegr@gmail.com>
> ---
>  drivers/staging/android/uapi/ion.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
> index 647f130..e629394 100644
> --- a/drivers/staging/android/uapi/ion.h
> +++ b/drivers/staging/android/uapi/ion.h
> @@ -57,7 +57,7 @@ enum ion_heap_type {
>  					 * cached, ion will do cache
>  					 * maintenance when the buffer is
>  					 * mapped for dma
> -					*/
> +					 */
>  #define ION_FLAG_CACHED_NEEDS_SYNC 2	/*
>  					 * mappings of this buffer will created
>  					 * at mmap time, if this is set
>

I've always hated these comments. Can you fix them to be regular
looking right above each #define?

Thanks,
Laura

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

* [PATCH v4] staging: ion: Fix a coding style issue
  2016-09-22 20:24   ` Laura Abbott
@ 2016-09-23 18:03     ` Antti Keränen
  2016-09-23 20:36       ` Laura Abbott
  0 siblings, 1 reply; 6+ messages in thread
From: Antti Keränen @ 2016-09-23 18:03 UTC (permalink / raw)
  To: labbott
  Cc: Antti Keränen, sumit.semwal, gregkh, arve, riandrews, devel,
	linux-kernel

This patch fixes the alignment of an allocation flag block comment
and moves the comments before each #define.

Signed-off-by: Antti Keränen <detegr@gmail.com>
---
In addition to fixing the alignment issue, this version of the patch moves
the comments from after the define lines to before the define lines.

 drivers/staging/android/uapi/ion.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
index 647f130..14cd873 100644
--- a/drivers/staging/android/uapi/ion.h
+++ b/drivers/staging/android/uapi/ion.h
@@ -52,18 +52,18 @@ enum ion_heap_type {
  * allocation flags - the lower 16 bits are used by core ion, the upper 16
  * bits are reserved for use by the heaps themselves.
  */
-#define ION_FLAG_CACHED 1		/*
-					 * mappings of this buffer should be
-					 * cached, ion will do cache
-					 * maintenance when the buffer is
-					 * mapped for dma
-					*/
-#define ION_FLAG_CACHED_NEEDS_SYNC 2	/*
-					 * mappings of this buffer will created
-					 * at mmap time, if this is set
-					 * caches must be managed
-					 * manually
-					 */
+
+/*
+ * mappings of this buffer should be cached, ion will do cache maintenance
+ * when the buffer is mapped for dma
+ */
+#define ION_FLAG_CACHED 1
+
+/*
+ * mappings of this buffer will created at mmap time, if this is set
+ * caches must be managed manually
+ */
+#define ION_FLAG_CACHED_NEEDS_SYNC 2
 
 /**
  * DOC: Ion Userspace API
-- 
2.9.3

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

* Re: [PATCH v4] staging: ion: Fix a coding style issue
  2016-09-23 18:03     ` [PATCH v4] " Antti Keränen
@ 2016-09-23 20:36       ` Laura Abbott
  0 siblings, 0 replies; 6+ messages in thread
From: Laura Abbott @ 2016-09-23 20:36 UTC (permalink / raw)
  To: Antti Keränen
  Cc: sumit.semwal, gregkh, arve, riandrews, devel, linux-kernel

On 09/23/2016 11:03 AM, Antti Keränen wrote:
> This patch fixes the alignment of an allocation flag block comment
> and moves the comments before each #define.
>

Acked-by: Laura Abbott <labbott@redhat.com>

> Signed-off-by: Antti Keränen <detegr@gmail.com>
> ---
> In addition to fixing the alignment issue, this version of the patch moves
> the comments from after the define lines to before the define lines.
>
>  drivers/staging/android/uapi/ion.h | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
> index 647f130..14cd873 100644
> --- a/drivers/staging/android/uapi/ion.h
> +++ b/drivers/staging/android/uapi/ion.h
> @@ -52,18 +52,18 @@ enum ion_heap_type {
>   * allocation flags - the lower 16 bits are used by core ion, the upper 16
>   * bits are reserved for use by the heaps themselves.
>   */
> -#define ION_FLAG_CACHED 1		/*
> -					 * mappings of this buffer should be
> -					 * cached, ion will do cache
> -					 * maintenance when the buffer is
> -					 * mapped for dma
> -					*/
> -#define ION_FLAG_CACHED_NEEDS_SYNC 2	/*
> -					 * mappings of this buffer will created
> -					 * at mmap time, if this is set
> -					 * caches must be managed
> -					 * manually
> -					 */
> +
> +/*
> + * mappings of this buffer should be cached, ion will do cache maintenance
> + * when the buffer is mapped for dma
> + */
> +#define ION_FLAG_CACHED 1
> +
> +/*
> + * mappings of this buffer will created at mmap time, if this is set
> + * caches must be managed manually
> + */
> +#define ION_FLAG_CACHED_NEEDS_SYNC 2
>
>  /**
>   * DOC: Ion Userspace API
>

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

end of thread, other threads:[~2016-09-23 20:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20160922151758.GB3565@kroah.com>
2016-09-22 15:59 ` [PATCH v3 1/2] staging: ion: Fix a coding style issue Antti Keränen
2016-09-22 20:15   ` Laura Abbott
2016-09-22 15:59 ` [PATCH v3 2/2] " Antti Keränen
2016-09-22 20:24   ` Laura Abbott
2016-09-23 18:03     ` [PATCH v4] " Antti Keränen
2016-09-23 20:36       ` Laura Abbott

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