staging: ion: Fix a coding style issue
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/2 staging: ion: Fix a coding style issue
Remove unnecessary braces surrounding a single statement block
--- drivers/staging/android/ion/hisilicon/hi6220_ion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/hisilicon/hi6220_ion.c +2 -2
@@ -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);
Signature · 1 line
2.9.3
PATCH v3 2/2 staging: ion: Fix a coding style issue
Correctly align an unaligned block comment
--- drivers/staging/android/uapi/ion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/uapi/ion.h +1 -1
@@ -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
Signature · 1 line
2.9.3
Quoted 13 lines · Antti Keränen
Correctly align an unaligned block comment
Signed-off-by Antti Keränen <[email protected]>--- drivers/staging/android/uapi/ion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/android/uapi/ion.h +0
-0
drivers/staging/android/uapi/ion.h enum ion_heap_type { · line 63
Quoted 8 lines
drivers/staging/android/uapi/ion.h +1
-1@@ -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
PATCH v4 1/1 staging: ion: Fix a coding style issue
This patch fixes the alignment of an allocation flag block comment and moves the comments before each #define.
---
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(-)
drivers/staging/android/uapi/ion.h +12 -12
@@ -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
Signature · 1 line
2.9.3
Quoted 3 lines · Antti Keränen
This patch fixes the alignment of an allocation flag block comment and moves the comments before each #define.
Quoted 44 lines
Signed-off-by Antti Keränen <[email protected]>---
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(-)drivers/staging/android/uapi/ion.h +12
-12@@ -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
Quoted 2 lines · Antti Keränen
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.
Quoted 2 lines
Signed-off-by Antti Keränen <[email protected]>---
You can put your summary right here between the --- and the diffstat.
Quoted 10 lines
drivers/staging/android/ion/hisilicon/hi6220_ion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/android/ion/hisilicon/hi6220_ion.c +0
-0@@ -82,9 +82,9 @@ static int hi6220_ion_remove(struct platform_device *pdev)
drivers/staging/android/ion/hisilicon/hi6220_ion.c static int hi6220_ion_remove(struct platform_device *pdev) · line 90
Quoted 10 lines
drivers/staging/android/ion/hisilicon/hi6220_ion.c +2
-2ipdev =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