arm: mediatek: force type of mtk_smp_base
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
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_basearch/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
@@ -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
PATCH 4/11 ARM: meson: use NULL instead of 0 for pointer
In reply to a message not in the archiveFix 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
@@ -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
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_nodewhich 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 pointerSigned-off-by Ben Dooks <[email protected]>
Martin
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic