linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: tony@atomide.com, jmkrzyszt@gmail.com, aaro.koskinen@iki.fi,
	vireshk@kernel.org, shiraz.linux.kernel@gmail.com,
	nsekhar@ti.com, brgl@bgdev.pl, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>, kernel test robot <lkp@intel.com>
Subject: [PATCH 4/6] ARM: omap: fix address space warnings from sparse
Date: Thu, 28 Apr 2022 15:31:56 +0200	[thread overview]
Message-ID: <20220428133210.990808-5-arnd@kernel.org> (raw)
In-Reply-To: <20220428133210.990808-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

Moving sram code from plat-omap got the attention of the kernel test robot.

I found a few more places with related warnings because the sram
references are a mix of kernel pointers and __iomem pointers:

mach-omap1/sram-init.c:56:17: warning: cast removes address space '__iomem' of expression
mach-omap1/board-ams-delta.c:667:9: warning: incorrect type in argument 1 (different base types)
mach-omap2/sram.c:78:17: warning: cast removes address space '__iomem' of expression
mach-omap2/omap4-common.c:142:27: warning: incorrect type in assignment (different address spaces)
mach-omap2/omap4-common.c:142:27:    expected void [noderef] __iomem *static [toplevel] sram_sync
mach-omap2/omap4-common.c:142:27:    got void *
mach-omap2/pm34xx.c:113:45: warning: incorrect type in argument 1 (different address spaces)
mach-omap2/pm34xx.c:113:45:    expected void [noderef] __iomem *save_regs
mach-omap2/pm34xx.c:113:45:    got void *extern [addressable] [toplevel] omap3_secure_ram_storage

There is no good solution here, as sram is a bit special in this
regard. Change the annotations to at least shut up the warnings.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap1/board-ams-delta.c | 2 +-
 arch/arm/mach-omap1/sram-init.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index cd97df48686e..651c28d81132 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -664,7 +664,7 @@ static void __init ams_delta_latch2_init(void)
 {
 	u16 latch2 = 1 << LATCH2_PIN_MODEM_NRESET | 1 << LATCH2_PIN_MODEM_CODEC;
 
-	__raw_writew(latch2, LATCH2_VIRT);
+	__raw_writew(latch2, IOMEM(LATCH2_VIRT));
 }
 
 static void __init ams_delta_init(void)
diff --git a/arch/arm/mach-omap1/sram-init.c b/arch/arm/mach-omap1/sram-init.c
index 0e3ec32a008e..27c42e2a21cc 100644
--- a/arch/arm/mach-omap1/sram-init.c
+++ b/arch/arm/mach-omap1/sram-init.c
@@ -53,7 +53,7 @@ static void *omap_sram_push_address(unsigned long size)
 	new_ceil = ROUND_DOWN(new_ceil, FNCPY_ALIGN);
 	omap_sram_ceil = IOMEM(new_ceil);
 
-	return (void *)omap_sram_ceil;
+	return (void __force *)omap_sram_ceil;
 }
 
 void *omap_sram_push(void *funcp, unsigned long size)
-- 
2.29.2


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

  parent reply	other threads:[~2022-04-28 13:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 13:31 [PATCH 0/6] ARM: omap/davinci/spear fixes for multiplatform Arnd Bergmann
2022-04-28 13:31 ` [PATCH 1/6] ARM: omap2: remove include/mach/ subdirectory Arnd Bergmann
2022-04-29  5:33   ` Tony Lindgren
2022-04-28 13:31 ` [PATCH 2/6] ARM: davinci: " Arnd Bergmann
2022-05-02 12:03   ` Bartosz Golaszewski
2022-04-28 13:31 ` [PATCH 3/6] ARM: spear: " Arnd Bergmann
2022-04-29  3:14   ` Viresh Kumar
2022-04-28 13:31 ` Arnd Bergmann [this message]
2022-04-29  5:27   ` [PATCH 4/6] ARM: omap: fix address space warnings from sparse Tony Lindgren
2022-04-28 13:31 ` [PATCH 5/6] ARM: omap2: fix missing declaration warnings Arnd Bergmann
2022-04-29  5:32   ` Tony Lindgren
2022-04-28 13:31 ` [PATCH 6/6] ARM: omap1: add back omap_set_dma_priority() stub Arnd Bergmann
2022-04-29  5:32   ` Tony Lindgren

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=20220428133210.990808-5-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=arnd@arndb.de \
    --cc=brgl@bgdev.pl \
    --cc=jmkrzyszt@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nsekhar@ti.com \
    --cc=shiraz.linux.kernel@gmail.com \
    --cc=tony@atomide.com \
    --cc=vireshk@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).