Skip to contentSkip to conversation

staging:android:io: Fix multiple styling issues

PATCH In review Yannis Damigos 3 participants 23 messages Sep 22, 2016 – Sep 27, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging:android:io: Fix multiple styling issues

This patch fixes 1 error, 1 warning and 14 checks found by checkpatch.

---
 drivers/staging/android/ion/ion_of.c | 49 ++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 25 deletions(-)
drivers/staging/android/ion/ion_of.c +24 -25
index de0899a..c930416 100644
@@ -26,17 +26,17 @@
 #include "ion_of.h"
 
 int ion_parse_dt_heap_common(struct device_node *heap_node,
-			struct ion_platform_heap *heap,
-			struct ion_of_heap *compatible)
+			     struct ion_platform_heap *heap,
+			     struct ion_of_heap *compatible)
 {
 	int i;
 
-	for (i = 0; compatible[i].name != NULL; i++) {
+	for (i = 0; compatible[i].name; i++) {
 		if (of_device_is_compatible(heap_node, compatible[i].compat))
 			break;
 	}
 
-	if (compatible[i].name == NULL)
+	if (!compatible[i].name)
 		return -ENODEV;
 
 	heap->id = compatible[i].heap_id;
@@ -47,33 +47,33 @@ int ion_parse_dt_heap_common(struct device_node *heap_node,
 	/* Some kind of callback function pointer? */
 
 	pr_info("%s: id %d type %d name %s align %lx\n", __func__,
-			heap->id, heap->type, heap->name, heap->align);
+		heap->id, heap->type, heap->name, heap->align);
 	return 0;
 }
 
 int ion_setup_heap_common(struct platform_device *parent,
-			struct device_node *heap_node,
-			struct ion_platform_heap *heap)
+			  struct device_node *heap_node,
+			  struct ion_platform_heap *heap)
 {
 	int ret = 0;
 
 	switch (heap->type) {
-		case ION_HEAP_TYPE_CARVEOUT:
-		case ION_HEAP_TYPE_CHUNK:
-			if (heap->base && heap->size)
-				return 0;
-
-			ret = of_reserved_mem_device_init(heap->priv);
-			break;
-		default:
-			break;
+	case ION_HEAP_TYPE_CARVEOUT:
+	case ION_HEAP_TYPE_CHUNK:
+		if (heap->base && heap->size)
+			return 0;
+
+		ret = of_reserved_mem_device_init(heap->priv);
+		break;
+	default:
+		break;
 	}
 
 	return ret;
 }
 
 struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
-					struct ion_of_heap *compatible)
+				       struct ion_of_heap *compatible)
 {
 	int num_heaps, ret;
 	const struct device_node *dt_node = pdev->dev.of_node;
@@ -88,13 +88,13 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 		return ERR_PTR(-EINVAL);
 
 	heaps = devm_kzalloc(&pdev->dev,
-				sizeof(struct ion_platform_heap)*num_heaps,
-				GFP_KERNEL);
+			     sizeof(struct ion_platform_heap) * num_heaps,
+			     GFP_KERNEL);
 	if (!heaps)
 		return ERR_PTR(-ENOMEM);
 
 	data = devm_kzalloc(&pdev->dev, sizeof(struct ion_platform_data),
-				GFP_KERNEL);
+			    GFP_KERNEL);
 	if (!data)
 		return ERR_PTR(-ENOMEM);
 
@@ -106,7 +106,7 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 			return ERR_PTR(ret);
 
 		heap_pdev = of_platform_device_create(node, heaps[i].name,
-							&pdev->dev);
+						      &pdev->dev);
 		if (!pdev)
 			return ERR_PTR(-ENOMEM);
 		heap_pdev->dev.platform_data = &heaps[i];
@@ -119,7 +119,6 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 		i++;
 	}
 
-
 	data->heaps = heaps;
 	data->nr = num_heaps;
 	return data;
@@ -155,14 +154,13 @@ static int rmem_ion_device_init(struct reserved_mem *rmem, struct device *dev)
 	heap->base = rmem->base;
 	heap->base = rmem->size;
 	pr_debug("%s: heap %s base %pa size %pa dev %p\n", __func__,
-			heap->name, &rmem->base, &rmem->size, dev);
+		 heap->name, &rmem->base, &rmem->size, dev);
 	return 0;
 }
 
 static void rmem_ion_device_release(struct reserved_mem *rmem,
-					struct device *dev)
+				    struct device *dev)
 {
-	return;
 }
 
 static const struct reserved_mem_ops rmem_dma_ops = {
@@ -181,5 +179,6 @@ static int __init rmem_ion_setup(struct reserved_mem *rmem)
 	rmem->ops = &rmem_dma_ops;
 	return 0;
 }
+
 RESERVEDMEM_OF_DECLARE(ion, "ion-region", rmem_ion_setup);
 #endif
Signature · 1 line
2.10.0
#1 lore raw

Hello Yannis!

There is a typo in your one-line description/subject ("ion").

Quoted 2 lines · Yannis Damigos

This patch fixes 1 error, 1 warning and 14 checks found by checkpatch.

Please be more specific in your commit message and mention what exactly you are doing to the code and why.

Quoted 11 lines
---
 drivers/staging/android/ion/ion_of.c | 49 ++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 25 deletions(-)
drivers/staging/android/ion/ion_of.c +0 -0
index de0899a..c930416 100644

drivers/staging/android/ion/ion_of.c line 30

Quoted 7 lines
drivers/staging/android/ion/ion_of.c +2 -2
@@ -26,17 +26,17 @@
 #include "ion_of.h"
 
 int ion_parse_dt_heap_common(struct device_node *heap_node,
-			struct ion_platform_heap *heap,
-			struct ion_of_heap *compatible)
+			     struct ion_platform_heap *heap,
+			     struct ion_of_heap *compatible)

You are changing whitespace here, ...

drivers/staging/android/ion/ion_of.c line 34

Quoted 5 lines
drivers/staging/android/ion/ion_of.c +1 -1
 {
 	int i;
 
-	for (i = 0; compatible[i].name != NULL; i++) {
+	for (i = 0; compatible[i].name; i++) {

... and are making a different kind of change here.

drivers/staging/android/ion/ion_of.c line 35

Quoted 1 line
drivers/staging/android/ion/ion_of.c +0 -0
 (Rest of patch with yet other types of changes snipped.)

It would be nice to have each kind of change in a separate patch with a more precise commit message.

Thanks,
Markus

#2 lore raw

PATCH v2 1/5 staging:android:ion: Fix comparison with NULL

From: Yannis Damigos <[email protected]>

This patch fixes the following comparison with NULL issues:

CHECK: Comparison to NULL could be written "compatible[i].name"
+ for (i = 0; compatible[i].name != NULL; i++) {

CHECK: Comparison to NULL could be written "!compatible[i].name"
+ if (compatible[i].name == NULL)

---
 drivers/staging/android/ion/ion_of.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion_of.c +2 -2
index de0899a..b3da8d8 100644
@@ -31,12 +31,12 @@ int ion_parse_dt_heap_common(struct device_node *heap_node,
 {
 	int i;
 
-	for (i = 0; compatible[i].name != NULL; i++) {
+	for (i = 0; compatible[i].name; i++) {
 		if (of_device_is_compatible(heap_node, compatible[i].compat))
 			break;
 	}
 
-	if (compatible[i].name == NULL)
+	if (!compatible[i].name)
 		return -ENODEV;
 
 	heap->id = compatible[i].heap_id;
Signature · 1 line
2.10.0
#3 lore raw

PATCH v2 2/5 staging:android:ion: Fix whitespace issues

From: Yannis Damigos <[email protected]>

This patch fixes the following whitespace issues:

CHECK: Alignment should match open parenthesis +int ion_parse_dt_heap_common(struct device_node *heap_node,
+ struct ion_platform_heap *heap,

CHECK: Alignment should match open parenthesis
+ pr_info("%s: id %d type %d name %s align %lx\n", __func__,
+ heap->id, heap->type, heap->name, heap->align);

CHECK: Alignment should match open parenthesis +int ion_setup_heap_common(struct platform_device *parent,
+ struct device_node *heap_node,

CHECK: Alignment should match open parenthesis
+struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
+ struct ion_of_heap *compatible)

CHECK: Alignment should match open parenthesis
+ heaps = devm_kzalloc(&pdev->dev,
+ sizeof(struct
ion_platform_heap)*num_heaps,

CHECK: spaces preferred around that '*' (ctx:VxV)
+ sizeof(struct
ion_platform_heap)*num_heaps,

CHECK: Alignment should match open parenthesis
+ data = devm_kzalloc(&pdev->dev, sizeof(struct
ion_platform_data),
+ GFP_KERNEL);

CHECK: Alignment should match open parenthesis
+ heap_pdev = of_platform_device_create(node,
heaps[i].name,
+ &pdev->dev);

CHECK: Alignment should match open parenthesis
+ pr_debug("%s: heap %s base %pa size %pa dev %p\n", __func__,
+ heap->name, &rmem->base, &rmem->size, dev);

CHECK: Alignment should match open parenthesis +static void rmem_ion_device_release(struct reserved_mem *rmem,
+ struct device *dev)

---
 drivers/staging/android/ion/ion_of.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/staging/android/ion/ion_of.c +12 -12
index b3da8d8..b7babc7 100644
@@ -26,8 +26,8 @@
 #include "ion_of.h"
 
 int ion_parse_dt_heap_common(struct device_node *heap_node,
-			struct ion_platform_heap *heap,
-			struct ion_of_heap *compatible)
+			     struct ion_platform_heap *heap,
+			     struct ion_of_heap *compatible)
 {
 	int i;
 
@@ -47,13 +47,13 @@ int ion_parse_dt_heap_common(struct device_node *heap_node,
 	/* Some kind of callback function pointer? */
 
 	pr_info("%s: id %d type %d name %s align %lx\n", __func__,
-			heap->id, heap->type, heap->name, heap->align);
+		heap->id, heap->type, heap->name, heap->align);
 	return 0;
 }
 
 int ion_setup_heap_common(struct platform_device *parent,
-			struct device_node *heap_node,
-			struct ion_platform_heap *heap)
+			  struct device_node *heap_node,
+			  struct ion_platform_heap *heap)
 {
 	int ret = 0;
 
@@ -73,7 +73,7 @@ int ion_setup_heap_common(struct platform_device *parent,
 }
 
 struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
-					struct ion_of_heap *compatible)
+				       struct ion_of_heap *compatible)
 {
 	int num_heaps, ret;
 	const struct device_node *dt_node = pdev->dev.of_node;
@@ -88,13 +88,13 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 		return ERR_PTR(-EINVAL);
 
 	heaps = devm_kzalloc(&pdev->dev,
-				sizeof(struct ion_platform_heap)*num_heaps,
-				GFP_KERNEL);
+			     sizeof(struct ion_platform_heap) * num_heaps,
+			     GFP_KERNEL);
 	if (!heaps)
 		return ERR_PTR(-ENOMEM);
 
 	data = devm_kzalloc(&pdev->dev, sizeof(struct ion_platform_data),
-				GFP_KERNEL);
+			    GFP_KERNEL);
 	if (!data)
 		return ERR_PTR(-ENOMEM);
 
@@ -106,7 +106,7 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 			return ERR_PTR(ret);
 
 		heap_pdev = of_platform_device_create(node, heaps[i].name,
-							&pdev->dev);
+						      &pdev->dev);
 		if (!pdev)
 			return ERR_PTR(-ENOMEM);
 		heap_pdev->dev.platform_data = &heaps[i];
@@ -155,12 +155,12 @@ static int rmem_ion_device_init(struct reserved_mem *rmem, struct device *dev)
 	heap->base = rmem->base;
 	heap->base = rmem->size;
 	pr_debug("%s: heap %s base %pa size %pa dev %p\n", __func__,
-			heap->name, &rmem->base, &rmem->size, dev);
+		 heap->name, &rmem->base, &rmem->size, dev);
 	return 0;
 }
 
 static void rmem_ion_device_release(struct reserved_mem *rmem,
-					struct device *dev)
+				    struct device *dev)
 {
 	return;
 }
Signature · 1 line
2.10.0
maintainer
#4 lore raw

Re: [PATCHv2 2/5] staging:android:ion: Fix whitespace issues

Quoted 23 lines · On Fri, Sep 23, 2016 at 11:05:14AM +0300, [email protected] wrote:

From: Yannis Damigos <[email protected]>

This patch fixes the following whitespace issues:

CHECK: Alignment should match open parenthesis

(quoted diff) +2 -0
+int ion_parse_dt_heap_common(struct device_node *heap_node,
+			struct ion_platform_heap *heap,

CHECK: Alignment should match open parenthesis

(quoted diff) +2 -0
+	pr_info("%s: id %d type %d name %s align %lx\n", __func__,
+			heap->id, heap->type, heap->name, heap->align);

CHECK: Alignment should match open parenthesis

(quoted diff) +2 -0
+int ion_setup_heap_common(struct platform_device *parent,
+			struct device_node *heap_node,

CHECK: Alignment should match open parenthesis

(quoted diff) +2 -0
+struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
+					struct ion_of_heap *compatible)

CHECK: Alignment should match open parenthesis

(quoted diff) +2 -0
+	heaps = devm_kzalloc(&pdev->dev,
+				sizeof(struct
Quoted 1 line

ion_platform_heap)*num_heaps,

Why is your changelog text line-wrapped?

Quoted 4 lines

CHECK: spaces preferred around that '*' (ctx:VxV)

(quoted diff) +1 -0
+				sizeof(struct

ion_platform_heap)*num_heaps,

Same here.

And don't mix different types of whitespace cleanup in the same patch please.

thanks,

greg k-h

#5 lore raw

PATCH v2 3/5 staging:android:ion: Fix blank line issues

In reply to [email protected]

From: Yannis Damigos <[email protected]>

This patch fixes the following blank line issues:

CHECK: Please don't use multiple blank lines
+
+

CHECK: Please use a blank line after function/struct/union/enum declarations
+}
+RESERVEDMEM_OF_DECLARE(ion, "ion-region", rmem_ion_setup);

---
 drivers/staging/android/ion/ion_of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/ion_of.c +1 -1
index b7babc7..23f51a3 100644
@@ -119,7 +119,6 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 		i++;
 	}
 
-
 	data->heaps = heaps;
 	data->nr = num_heaps;
 	return data;
@@ -181,5 +180,6 @@ static int __init rmem_ion_setup(struct reserved_mem *rmem)
 	rmem->ops = &rmem_dma_ops;
 	return 0;
 }
+
 RESERVEDMEM_OF_DECLARE(ion, "ion-region", rmem_ion_setup);
 #endif
Signature · 1 line
2.10.0
maintainer
#6 lore raw

Re: [PATCHv2 3/5] staging:android:ion: Fix blank line issues

Review

Quoted 7 lines · On Fri, Sep 23, 2016 at 11:05:15AM +0300, [email protected] wrote:

From: Yannis Damigos <[email protected]>

This patch fixes the following blank line issues:

CHECK: Please don't use multiple blank lines

(quoted diff) +2 -0
+
+

What does that mean with the + + lines?

Review

Quoted 5 lines

CHECK: Please use a blank line after function/struct/union/enum declarations

(quoted diff) +2 -0
+}
+RESERVEDMEM_OF_DECLARE(ion, "ion-region", rmem_ion_setup);

Linewrap :(

thanks,

greg k-h

#7 lore raw

Re: [PATCHv2 3/5] staging:android:ion: Fix blank line issues

Quoted 12 lines · Greg KH

Review

Quoted 7 lines · On Fri, Sep 23, 2016 at 11:05:15AM +0300, [email protected] wrote:

From: Yannis Damigos <[email protected]>

This patch fixes the following blank line issues:

CHECK: Please don't use multiple blank lines

(quoted diff) +2 -0
+
+

What does that mean with the + + lines?

Quoted 1 line
Quoted 7 lines

Review

Quoted 4 lines

CHECK: Please use a blank line after function/struct/union/enum declarations

(quoted diff) +2 -0
+}
+RESERVEDMEM_OF_DECLARE(ion, "ion-region", rmem_ion_setup);

Linewrap :(

If the line is not wrapped, I get the following warning:
Possible unwrapped commit description (prefer a maximum 75 chars per line)

Should I ignore it?

Best regards,
Yannis

maintainer
#8 lore raw

Re: [PATCHv2 3/5] staging:android:ion: Fix blank line issues

Quoted 20 lines · Yannis Damigos
Quoted 12 lines · Greg KH

Review

Quoted 7 lines · On Fri, Sep 23, 2016 at 11:05:15AM +0300, [email protected] wrote:

From: Yannis Damigos <[email protected]>

This patch fixes the following blank line issues:

CHECK: Please don't use multiple blank lines

(quoted diff) +2 -0
+
+

What does that mean with the + + lines?

Quoted 1 line
Quoted 7 lines

Review

Quoted 4 lines

CHECK: Please use a blank line after function/struct/union/enum declarations

(quoted diff) +2 -0
+}
+RESERVEDMEM_OF_DECLARE(ion, "ion-region", rmem_ion_setup);

Linewrap :(

Quoted 4 lines

If the line is not wrapped, I get the following warning:
Possible unwrapped commit description (prefer a maximum 75 chars per line)

Should I ignore it?

Don't you think it makes sense to do so? :)

#9 lore raw

PATCH v2 4/5 staging:android:ion: Fix switch case indentation

In reply to [email protected]

From: Yannis Damigos <[email protected]>

This patch fixes the following switch statement indentation issue:

ERROR: switch and case should be at the same indent
+ switch (heap->type) {
+ case ION_HEAP_TYPE_CARVEOUT:
+ case ION_HEAP_TYPE_CHUNK:
[...]
+ default:

---
 drivers/staging/android/ion/ion_of.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/staging/android/ion/ion_of.c +9 -9
index 23f51a3..49f052c 100644
@@ -58,15 +58,15 @@ int ion_setup_heap_common(struct platform_device *parent,
 	int ret = 0;
 
 	switch (heap->type) {
-		case ION_HEAP_TYPE_CARVEOUT:
-		case ION_HEAP_TYPE_CHUNK:
-			if (heap->base && heap->size)
-				return 0;
-
-			ret = of_reserved_mem_device_init(heap->priv);
-			break;
-		default:
-			break;
+	case ION_HEAP_TYPE_CARVEOUT:
+	case ION_HEAP_TYPE_CHUNK:
+		if (heap->base && heap->size)
+			return 0;
+
+		ret = of_reserved_mem_device_init(heap->priv);
+		break;
+	default:
+		break;
 	}
 
 	return ret;
Signature · 1 line
2.10.0
#10 lore raw

PATCH v2 5/5 staging:android:ion: Fix void function return

In reply to [email protected]

From: Yannis Damigos <[email protected]>

This patch removes the return statement of void function

WARNING: void function return statements are not generally useful
+ return;
+}

---
 drivers/staging/android/ion/ion_of.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/android/ion/ion_of.c +0 -1
index 49f052c..c930416 100644
@@ -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 = {
Signature · 1 line
2.10.0
maintainer
#11 lore raw

Re: [PATCHv2 5/5] staging:android:ion: Fix void function return

Quoted 18 lines · On Fri, Sep 23, 2016 at 11:05:17AM +0300, [email protected] wrote:

From: Yannis Damigos <[email protected]>

This patch removes the return statement of void function

WARNING: void function return statements are not generally useful

(quoted diff) +2 -0
+	return;
+}
---
 drivers/staging/android/ion/ion_of.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/android/ion/ion_of.c +0 -0
index 49f052c..c930416 100644

drivers/staging/android/ion/ion_of.c static int rmem_ion_device_init(struct reserved_mem *rmem, struct device *dev) · line 164

Quoted 5 lines
drivers/staging/android/ion/ion_of.c +0 -1
@@ -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;
 }

Why have an empty release function at all? If it can be empty, you should be able to drop the function entirely, right?

thanks,

greg k-h

#12 lore raw

PATCH v3 5/5 staging:android:ion: Remove empty release function

This patch removes the empty function rmem_ion_device_release

---
 drivers/staging/android/ion/ion_of.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/staging/android/ion/ion_of.c +0 -7
index 49f052c..91c0642 100644
@@ -158,15 +158,8 @@ static int rmem_ion_device_init(struct reserved_mem *rmem, struct device *dev)
 	return 0;
 }
 
-static void rmem_ion_device_release(struct reserved_mem *rmem,
-				    struct device *dev)
-{
-	return;
-}
-
 static const struct reserved_mem_ops rmem_dma_ops = {
 	.device_init	= rmem_ion_device_init,
-	.device_release	= rmem_ion_device_release,
 };
 
 static int __init rmem_ion_setup(struct reserved_mem *rmem)
Signature · 1 line
2.10.0
maintainer
#13 lore raw

Re: [PATCHv3 5/5] staging:android:ion: Remove empty release function

Quoted 29 lines · Yannis Damigos

This patch removes the empty function rmem_ion_device_release

---
 drivers/staging/android/ion/ion_of.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/staging/android/ion/ion_of.c +0 -7
index 49f052c..91c0642 100644
@@ -158,15 +158,8 @@ static int rmem_ion_device_init(struct reserved_mem *rmem, struct device *dev)
 	return 0;
 }
 
-static void rmem_ion_device_release(struct reserved_mem *rmem,
-				    struct device *dev)
-{
-	return;
-}
-
 static const struct reserved_mem_ops rmem_dma_ops = {
 	.device_init	= rmem_ion_device_init,
-	.device_release	= rmem_ion_device_release,
 };
 
 static int __init rmem_ion_setup(struct reserved_mem *rmem)
Signature · 1 line
2.10.0

Have you tested that this works?

thanks,

greg k-h

#14 lore raw

Re: [PATCHv3 5/5] staging:android:ion: Remove empty release function

I believed I tested it but I found out that the CONFIG_OF_RESERVED_MEM was not enabled in my config.
So it was not properly tested.
I will try to test it again.

Sorry,
Yannis

Quoted 36 lines · Greg KH
Quoted 28 lines · Yannis Damigos

This patch removes the empty function rmem_ion_device_release

---
 drivers/staging/android/ion/ion_of.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/staging/android/ion/ion_of.c +0 -8
index 49f052c..91c0642 100644
@@ -158,15 +158,8 @@ static int rmem_ion_device_init(struct reserved_mem *rmem, struct device *dev)
      return 0;
 }
 
-static void rmem_ion_device_release(struct reserved_mem *rmem,
-                                 struct device *dev)
-{
-     return;
-}
-
 static const struct reserved_mem_ops rmem_dma_ops = {
      .device_init    = rmem_ion_device_init,
-     .device_release = rmem_ion_device_release,
 };
 
 static int __init rmem_ion_setup(struct reserved_mem *rmem)
--
Quoted 1 line

2.10.0

Have you tested that this works?

thanks,

greg k-h

#15 lore raw

Re: [PATCHv3 5/5] staging:android:ion: Remove empty release function

In reply to Greg KH

Hi Greg,

Quoted 3 lines · Greg KH

Have you tested that this works?

In order to test the change I need a board with Hi6220 SoC. If I do not own the hardware to test the change, how should I proceed?

thanks,
Yannis

maintainer
#16 lore raw

Re: [PATCHv3 5/5] staging:android:ion: Remove empty release function

Quoted 9 lines · Yannis Damigos

Hi Greg,

Quoted 3 lines · Greg KH

Have you tested that this works?

In order to test the change I need a board with Hi6220 SoC. If I do not own the hardware to test the change, how should I proceed?

For something like this, that isn't really a trivial patch, I'd like to have someone that has the hardware be able to test it before accepting the patch, sorry.

greg k-h

#17 lore raw

Re: [PATCHv3 5/5] staging:android:ion: Remove empty release function

Quoted 8 lines · Greg KH
Quoted 7 lines · Yannis Damigos

Hi Greg,

Quoted 3 lines · Greg KH

Have you tested that this works?

Quoted 6 lines
Quoted 2 lines

In order to test the change I need a board with Hi6220 SoC. If I do not own the hardware to test the change, how should I proceed?

For something like this, that isn't really a trivial patch, I'd like to have someone that has the hardware be able to test it before accepting the patch, sorry.

Should I resend the other patches and exclude this one?

thanks,
Yannis

maintainer
#18 lore raw

Re: [PATCHv3 5/5] staging:android:ion: Remove empty release function

In reply to Yannis Damigos
Quoted 6 lines · Yannis Damigos

This patch removes the empty function rmem_ion_device_release

---
 drivers/staging/android/ion/ion_of.c | 7 -------
 1 file changed, 7 deletions(-)

Please just resend the whole series for the next time you update these, it makes it easier to review, and apply.

thanks,

greg k-h

#19 lore raw

PATCH v4 1/4 staging:android:ion: Fix comparison with NULL

This patch fixes the following comparison with NULL issues:

CHECK: Comparison to NULL could be written "compatible[i].name"
+ for (i = 0; compatible[i].name != NULL; i++) {

CHECK: Comparison to NULL could be written "!compatible[i].name"
+ if (compatible[i].name == NULL)

---
 drivers/staging/android/ion/ion_of.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion_of.c +2 -2
index 826e756..a8050c6 100644
@@ -31,12 +31,12 @@ static int ion_parse_dt_heap_common(struct device_node *heap_node,
 {
 	int i;
 
-	for (i = 0; compatible[i].name != NULL; i++) {
+	for (i = 0; compatible[i].name; i++) {
 		if (of_device_is_compatible(heap_node, compatible[i].compat))
 			break;
 	}
 
-	if (compatible[i].name == NULL)
+	if (!compatible[i].name)
 		return -ENODEV;
 
 	heap->id = compatible[i].heap_id;
Signature · 1 line
2.10.0
#20 lore raw

PATCH v4 2/4 staging:android:ion: Fix alignment issues

This patch fixes the following whitespace issues:

CHECK: Alignment should match open parenthesis
+ pr_info("%s: id %d type %d name %s align %lx\n", __func__,
+ heap->id, heap->type, heap->name, heap->align);

CHECK: Alignment should match open parenthesis
+struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
+ struct ion_of_heap *compatible)

CHECK: Alignment should match open parenthesis
+ heaps = devm_kzalloc(&pdev->dev,
+ sizeof(struct ion_platform_heap)*num_heaps,

CHECK: Alignment should match open parenthesis
+ data = devm_kzalloc(&pdev->dev, sizeof(struct ion_platform_data),
+ GFP_KERNEL);

CHECK: Alignment should match open parenthesis
+ heap_pdev = of_platform_device_create(node, heaps[i].name,
+ &pdev->dev);

CHECK: Alignment should match open parenthesis
+ pr_debug("%s: heap %s base %pa size %pa dev %p\n", __func__,
+ heap->name, &rmem->base, &rmem->size, dev);

CHECK: Alignment should match open parenthesis +static void rmem_ion_device_release(struct reserved_mem *rmem,
+ struct device *dev)

---
 drivers/staging/android/ion/ion_of.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/android/ion/ion_of.c +8 -8
index a8050c6..d090c3a 100644
@@ -47,7 +47,7 @@ static int ion_parse_dt_heap_common(struct device_node *heap_node,
 	/* Some kind of callback function pointer? */
 
 	pr_info("%s: id %d type %d name %s align %lx\n", __func__,
-			heap->id, heap->type, heap->name, heap->align);
+		heap->id, heap->type, heap->name, heap->align);
 	return 0;
 }
 
@@ -73,7 +73,7 @@ static int ion_setup_heap_common(struct platform_device *parent,
 }
 
 struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
-					struct ion_of_heap *compatible)
+				       struct ion_of_heap *compatible)
 {
 	int num_heaps, ret;
 	const struct device_node *dt_node = pdev->dev.of_node;
@@ -88,13 +88,13 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 		return ERR_PTR(-EINVAL);
 
 	heaps = devm_kzalloc(&pdev->dev,
-				sizeof(struct ion_platform_heap)*num_heaps,
-				GFP_KERNEL);
+			     sizeof(struct ion_platform_heap)*num_heaps,
+			     GFP_KERNEL);
 	if (!heaps)
 		return ERR_PTR(-ENOMEM);
 
 	data = devm_kzalloc(&pdev->dev, sizeof(struct ion_platform_data),
-				GFP_KERNEL);
+			    GFP_KERNEL);
 	if (!data)
 		return ERR_PTR(-ENOMEM);
 
@@ -106,7 +106,7 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 			return ERR_PTR(ret);
 
 		heap_pdev = of_platform_device_create(node, heaps[i].name,
-							&pdev->dev);
+						      &pdev->dev);
 		if (!pdev)
 			return ERR_PTR(-ENOMEM);
 		heap_pdev->dev.platform_data = &heaps[i];
@@ -155,12 +155,12 @@ static int rmem_ion_device_init(struct reserved_mem *rmem, struct device *dev)
 	heap->base = rmem->base;
 	heap->base = rmem->size;
 	pr_debug("%s: heap %s base %pa size %pa dev %p\n", __func__,
-			heap->name, &rmem->base, &rmem->size, dev);
+		 heap->name, &rmem->base, &rmem->size, dev);
 	return 0;
 }
 
 static void rmem_ion_device_release(struct reserved_mem *rmem,
-					struct device *dev)
+				    struct device *dev)
 {
 	return;
 }
Signature · 1 line
2.10.0
#21 lore raw

PATCH v4 3/4 staging:android:ion: Fix blank line issues

In reply to Yannis Damigos

This patch fixes the following blank line issues:

CHECK: Please don't use multiple blank lines

CHECK: Please use a blank line after function/struct/union/enum declarations +}
+RESERVEDMEM_OF_DECLARE(ion, "ion-region", rmem_ion_setup);

---
 drivers/staging/android/ion/ion_of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/ion_of.c +1 -1
index d090c3a..25f688c 100644
@@ -119,7 +119,6 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 		i++;
 	}
 
-
 	data->heaps = heaps;
 	data->nr = num_heaps;
 	return data;
@@ -181,5 +180,6 @@ static int __init rmem_ion_setup(struct reserved_mem *rmem)
 	rmem->ops = &rmem_dma_ops;
 	return 0;
 }
+
 RESERVEDMEM_OF_DECLARE(ion, "ion-region", rmem_ion_setup);
 #endif
Signature · 1 line
2.10.0
#22 lore raw

PATCH v4 4/4 staging:android:ion: Fix whitespace issue

In reply to Yannis Damigos

This patch fixes the following whitespace issue:

CHECK: spaces preferred around that '*' (ctx:VxV)
FILE: drivers/staging/android/ion/ion_of.c:91:
+ sizeof(struct ion_platform_heap)*num_heaps,

---
 drivers/staging/android/ion/ion_of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/ion_of.c +1 -1
index 25f688c..15bac92 100644
@@ -88,7 +88,7 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 		return ERR_PTR(-EINVAL);
 
 	heaps = devm_kzalloc(&pdev->dev,
-			     sizeof(struct ion_platform_heap)*num_heaps,
+			     sizeof(struct ion_platform_heap) * num_heaps,
 			     GFP_KERNEL);
 	if (!heaps)
 		return ERR_PTR(-ENOMEM);
Signature · 1 line
2.10.0