All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@lists.codethink.co.uk,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	linux-mediatek@lists.infradead.org
Subject: [PATCH 05/11] arm: mediatek: force type of mtk_smp_base
Date: Tue,  8 Oct 2019 13:34:47 +0100	[thread overview]
Message-ID: <20191008123453.1651-5-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <20191008123453.1651-1-ben.dooks@codethink.co.uk>

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 *

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-mediatek@lists.infradead.org
---
 arch/arm/mach-mediatek/platsmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
index 16a4ee6c9590..3717b960618d 100644
--- a/arch/arm/mach-mediatek/platsmp.c
+++ b/arch/arm/mach-mediatek/platsmp.c
@@ -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) {
-- 
2.23.0

WARNING: multiple messages have this Message-ID (diff)
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@lists.codethink.co.uk,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	linux-mediatek@lists.infradead.org
Subject: [PATCH 05/11] arm: mediatek: force type of mtk_smp_base
Date: Tue,  8 Oct 2019 13:34:47 +0100	[thread overview]
Message-ID: <20191008123453.1651-5-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <20191008123453.1651-1-ben.dooks@codethink.co.uk>

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 *

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-mediatek@lists.infradead.org
---
 arch/arm/mach-mediatek/platsmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
index 16a4ee6c9590..3717b960618d 100644
--- a/arch/arm/mach-mediatek/platsmp.c
+++ b/arch/arm/mach-mediatek/platsmp.c
@@ -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) {
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-10-08 12:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 12:34 [PATCH 01/11] ARM: bcm2836: include local platsmp.h for bcm2836_smp_ops Ben Dooks
2019-10-08 12:34 ` [PATCH 02/11] ARM: bcm: fix missing __iomem in bcm_kona_smc.c Ben Dooks
2019-10-08 17:57   ` Scott Branden
2019-10-15 23:16   ` Florian Fainelli
2019-10-08 12:34 ` [PATCH 03/11] ARM: highbank: include local core.h for highbank_pm_init Ben Dooks
2019-10-08 12:34 ` [PATCH 04/11] ARM: meson: use NULL instead of 0 for pointer Ben Dooks
2019-10-08 12:34   ` Ben Dooks
2019-10-08 12:34 ` Ben Dooks [this message]
2019-10-08 12:34   ` [PATCH 05/11] arm: mediatek: force type of mtk_smp_base Ben Dooks
2019-10-08 12:34 ` [PATCH 06/11] ARM: OMAP2+: do not export am43xx_control functions Ben Dooks
2019-10-08 12:34   ` Ben Dooks
2019-10-08 12:34 ` [PATCH 07/11] ARM: OMAP2+: prm44xx: make prm_{save, restore}_context static Ben Dooks
2019-10-08 12:34   ` Ben Dooks
2019-10-08 12:34 ` [PATCH 08/11] ARM: mach-prima2: include common.h for sirfsoc_pm_init Ben Dooks
2019-10-08 12:34 ` [PATCH 09/11] ARM: mach-prima2: make sirfsoc_rtc_iobrg_wait_sync static Ben Dooks
2019-10-08 12:34 ` [PATCH 10/11] ARM: mach-prima2: include linux/rtc/sirfsoc_rtciobrg.h Ben Dooks
2019-10-08 12:34 ` [PATCH 11/11] ARM: ux500: make ux500_cpu_die static Ben Dooks
2019-10-08 17:56 ` [PATCH 01/11] ARM: bcm2836: include local platsmp.h for bcm2836_smp_ops Scott Branden
2019-10-15 23:16 ` Florian Fainelli
     [not found] <20191008123341.1551-1-ben.dooks@codethink.co.uk>
     [not found] ` <20191008123341.1551-1-ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2019-10-08 12:33   ` [PATCH 05/11] arm: mediatek: force type of mtk_smp_base Ben Dooks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191008123453.1651-5-ben.dooks@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.