Skip to contentSkip to conversation

ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device()

PATCH In review Wei Yongjun 4 participants 6 messages Feb 5, 2017 – Feb 6, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device()

From: Wei Yongjun <[email protected]>

The error return code PTR_ERR(pdev) is always 0 since pdev is equal to 0 in this error handling case.

---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/iort.c +1 -1
index e0d2e6e..655407a 100644
@@ -828,7 +828,7 @@ static int __init iort_add_smmu_platform_device(struct acpi_iort_node *node)
 
 	pdev = platform_device_alloc(ops->name, PLATFORM_DEVID_AUTO);
 	if (!pdev)
-		return PTR_ERR(pdev);
+		return -ENOMEM;
 
 	count = ops->iommu_count_resources(node);
 
#1 lore raw
Quoted 9 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

The error return code PTR_ERR(pdev) is always 0 since pdev is equal to 0 in this error handling case.

---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

It has been reported twice already:

https://patchwork.kernel.org/patch/9521003/

Rafael, do you expect me to send you a pull request with IORT fixes ?

I can't see Dan's patch in linux-acpi patchwork anymore, and there is another fix pending:

https://patchwork.kernel.org/patch/9507041/

Please let me know how you want to handle them.

Thanks !
Lorenzo

Quoted 13 lines
drivers/acpi/arm64/iort.c +1 -1
index e0d2e6e..655407a 100644
@@ -828,7 +828,7 @@ static int __init iort_add_smmu_platform_device(struct acpi_iort_node *node)
 
 	pdev = platform_device_alloc(ops->name, PLATFORM_DEVID_AUTO);
 	if (!pdev)
-		return PTR_ERR(pdev);
+		return -ENOMEM;
 
 	count = ops->iommu_count_resources(node);
#2 lore raw
Quoted 15 lines · Lorenzo Pieralisi
Quoted 9 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

The error return code PTR_ERR(pdev) is always 0 since pdev is equal to 0 in this error handling case.

---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

It has been reported twice already:

https://patchwork.kernel.org/patch/9521003/

Quoted 8 lines

Rafael, do you expect me to send you a pull request with IORT fixes ?

I can't see Dan's patch in linux-acpi patchwork anymore, and there is another fix pending:

https://patchwork.kernel.org/patch/9507041/

Please let me know how you want to handle them.

I wasn't sure about who was the target maintainer to be honest.

I'd prefer ARM64-specific material to go in via the ARM64 tree, if that's possible.

Thanks,
Rafael

#3 lore raw

[+ Catalin, Will]

Quoted 21 lines · Rafael J. Wysocki
Quoted 20 lines · Lorenzo Pieralisi
Quoted 9 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

The error return code PTR_ERR(pdev) is always 0 since pdev is equal to 0 in this error handling case.

---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

It has been reported twice already:

https://patchwork.kernel.org/patch/9521003/

Rafael, do you expect me to send you a pull request with IORT fixes ?

I can't see Dan's patch in linux-acpi patchwork anymore, and there is another fix pending:

Quoted 8 lines
Quoted 3 lines

https://patchwork.kernel.org/patch/9507041/

Please let me know how you want to handle them.

I wasn't sure about who was the target maintainer to be honest.

I'd prefer ARM64-specific material to go in via the ARM64 tree, if that's possible.

I CC'ed Catalin and Will so that we can sort this out, I took for granted that ACPI changes would go via the ACPI tree even if they are ARM64 specific, I am not sure it makes much sense for them to go via the arm64 arch tree, anyway it is something to be decided because the two fixes above have already missed -rc* and I have to know which way patches should go from now onwards.

Thanks,
Lorenzo

#4 lore raw
Quoted 31 lines · Lorenzo Pieralisi
Quoted 21 lines · Rafael J. Wysocki
Quoted 20 lines · Lorenzo Pieralisi
Quoted 9 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

The error return code PTR_ERR(pdev) is always 0 since pdev is equal to 0 in this error handling case.

---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

It has been reported twice already:

https://patchwork.kernel.org/patch/9521003/

Rafael, do you expect me to send you a pull request with IORT fixes ?

I can't see Dan's patch in linux-acpi patchwork anymore, and there is another fix pending:

Quoted 8 lines
Quoted 3 lines

https://patchwork.kernel.org/patch/9507041/

Please let me know how you want to handle them.

I wasn't sure about who was the target maintainer to be honest.

I'd prefer ARM64-specific material to go in via the ARM64 tree, if that's possible.

Quoted 6 lines

I CC'ed Catalin and Will so that we can sort this out, I took for granted that ACPI changes would go via the ACPI tree even if they are ARM64 specific, I am not sure it makes much sense for them to go via the arm64 arch tree, anyway it is something to be decided because the two fixes above have already missed -rc* and I have to know which way patches should go from now onwards.

I have no problem taking arm64 ACPI patches via arm64 if that's what Rafael prefers. However, I won't proactively pick them up like I do for other arm64 patches, so please send me a pull request when you have stuff that you want merged.

Will

#5 lore raw
In reply to Lorenzo Pieralisi
Quoted 33 lines · Lorenzo Pieralisi

[+ Catalin, Will]

Quoted 21 lines · Rafael J. Wysocki
Quoted 20 lines · Lorenzo Pieralisi
Quoted 9 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

The error return code PTR_ERR(pdev) is always 0 since pdev is equal to 0 in this error handling case.

---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

It has been reported twice already:

https://patchwork.kernel.org/patch/9521003/

Rafael, do you expect me to send you a pull request with IORT fixes ?

I can't see Dan's patch in linux-acpi patchwork anymore, and there is another fix pending:

Quoted 8 lines
Quoted 3 lines

https://patchwork.kernel.org/patch/9507041/

Please let me know how you want to handle them.

I wasn't sure about who was the target maintainer to be honest.

I'd prefer ARM64-specific material to go in via the ARM64 tree, if that's possible.

Quoted 6 lines

I CC'ed Catalin and Will so that we can sort this out, I took for granted that ACPI changes would go via the ACPI tree even if they are ARM64 specific, I am not sure it makes much sense for them to go via the arm64 arch tree, anyway it is something to be decided because the two fixes above have already missed -rc* and I have to know which way patches should go from now onwards.

On x86 the arch-specific ACPI changes go in via the arch tree as a rule, FWIW, but also I'm sufficiently familiar with x86 (I think) to route them via the ACPI tree with enough confidence.

Quite honestly, my ARM64 knowledge is not sufficient to decide whether or not the changes actually make sense, so I would request an ACK from the ARM64 maintainers before taking those changes anyway.

Thanks,
Rafael