From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 105DAC433F5 for ; Thu, 28 Apr 2022 13:45:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EBi5ONuOX1QcdGwa5Rki31Mi82Ebi9Vex47i0u/F97E=; b=h+S2fhR35Aa6iD EP8gF8GYEUINkh9ZfrHbricFtpETpLl9wb2XFAdfyXrWl/Ax6j1S2FppHz62M/JmKVzbCKbl5n+CT +EcDSvalqNlWjxq6a/feIPLIxk240ZRCqI4RUm53fd8tDNjMM8x4jqVFz7ux2S9K/ubC15iVcsPFS 8NZ6IwocVnu23nVJ5tIGy/nEp/uTtNyCZeqRNPzxNvZSx2DFh0qx1JQ1316iCSO8JOxr5nIUYcCRI 3sEcZ8nPnvvZ3PVvmBg1zVhUFPMN0EbCughVpYIq9NfueQELb81uVYHFPhfcI0Mi+DbgsusN1yAeG IDtm6VZ0/Q1XAg9Focmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk4Qu-0079mP-KO; Thu, 28 Apr 2022 13:43:48 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk4Il-00761P-MY for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2022 13:35:25 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 50769B82D08; Thu, 28 Apr 2022 13:35:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7ED2AC385AA; Thu, 28 Apr 2022 13:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651152921; bh=eRESxdZdW2NvpGzb01TfQEFR4FhwuOlS8/l4GHlSOFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rt+QKL1BqYM26+KugcnmLw09URlLnzAmM8qXYt40z3sBMONaZ84qe3yfcXJ8Y53k6 Azs2fEwA1c0s99IA1V1p7SfpHy8Ia2XwpXdle2qwKFBXoiUZXXVNUlGP8J2Ak2UuZX LQkUlCDG4qacLuEeudTBwOj6ONrTr0MJB2j6gqAsRTLfkTFD9xkoJzYlNIbUrlWOAb 6Y8cn3DHJ0cXh2YGSsYc3iyjQpk6iZ2LT6sWBBubVOs52UfEswyQdR7aAgSNsganrR 0z4v9BJ1zfVx1HSoTaSmWavz4v7JWCawIv/BLJl+UMuwk7QP7NDBbZa6XnZwZF4bkC Kcshuoeja6llQ== From: Arnd Bergmann 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 , kernel test robot Subject: [PATCH 4/6] ARM: omap: fix address space warnings from sparse Date: Thu, 28 Apr 2022 15:31:56 +0200 Message-Id: <20220428133210.990808-5-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220428133210.990808-1-arnd@kernel.org> References: <20220428133210.990808-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_063524_063386_47D02E52 X-CRM114-Status: GOOD ( 16.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann 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 Signed-off-by: Arnd Bergmann --- 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