Skip to contentSkip to conversation

arm: mediatek: force type of mtk_smp_base

PATCH New Ben Dooks 3 participants 3 messages Oct 8, 2019 2 messages not in the archive

Subsystems (4)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 20191008123341.1551-1-ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org

Ben Dooks

author
#2 lore raw

PATCH 5/11 arm: mediatek: force type of mtk_smp_base

In __mtk_smp_prepare_cpus force the return of phys_to_virt() to have __iomem on it to avoid the following sparse warning:

arch/arm/mach-mediatek/platsmp.c:105:30: warning: incorrect type in assignment (different address spaces)
arch/arm/mach-mediatek/platsmp.c:105:30: expected void [noderef] <asn:2> *static [toplevel] mtk_smp_base
arch/arm/mach-mediatek/platsmp.c:105:30: got void *

---
Cc: Matthias Brugger <[email protected]>
Cc: [email protected]

---
 arch/arm/mach-mediatek/platsmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mediatek/platsmp.c +1 -1
index 16a4ee6c9590..3717b960618d 100644
@@ -102,7 +102,7 @@ static void __init __mtk_smp_prepare_cpus(unsigned int max_cpus, int trustzone)
 
 	if (trustzone) {
 		/* smp_base(trustzone-bootinfo) is reserved by device tree */
-		mtk_smp_base = phys_to_virt(mtk_smp_info->smp_base);
+		mtk_smp_base = (void __force __iomem *)phys_to_virt(mtk_smp_info->smp_base);
 	} else {
 		mtk_smp_base = ioremap(mtk_smp_info->smp_base, MTK_SMP_REG_SIZE);
 		if (!mtk_smp_base) {
Signature · 1 line
2.23.0
#3 lore raw

PATCH 4/11 ARM: meson: use NULL instead of 0 for pointer

In reply to a message not in the archive

Fix the second argument of of_get_cpu_node which is a pointer being passed a plain 0 by using NULL instead. Fixes the following warning:

arch/arm/mach-meson/platsmp.c:40:55: warning: Using plain integer as NULL pointer

---
CC: Kevin Hilman <[email protected]>
CC: [email protected]

---
 arch/arm/mach-meson/platsmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-meson/platsmp.c +1 -1
index 4b8ad728bb42..f992c436d3ed 100644
@@ -37,7 +37,7 @@ static struct regmap *pmu;
 
 static struct reset_control *meson_smp_get_core_reset(int cpu)
 {
-	struct device_node *np = of_get_cpu_node(cpu, 0);
+	struct device_node *np = of_get_cpu_node(cpu, NULL);
 
 	return of_reset_control_get_exclusive(np, NULL);
 }
Signature · 7 lines
2.23.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
reviewer Reviewed-by on v1 4/11
#4 lore raw

Re: [PATCH 04/11] ARM: meson: use NULL instead of 0 for pointer

Hi Ben,

thank you for this fix!

Quoted 8 lines · Ben Dooks

Fix the second argument of of_get_cpu_node which is a pointer being passed a plain 0 by using NULL instead. Fixes the following warning:

arch/arm/mach-meson/platsmp.c:40:55: warning: Using plain integer as NULL pointer

Martin

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic