From nobody Mon Apr 6 23:10:25 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A99BAECAAD1 for ; Thu, 1 Sep 2022 08:59:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234245AbiIAI7E (ORCPT ); Thu, 1 Sep 2022 04:59:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234366AbiIAI63 (ORCPT ); Thu, 1 Sep 2022 04:58:29 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE52212FDE1 for ; Thu, 1 Sep 2022 01:57:44 -0700 (PDT) Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MJFHQ2hD6znTxJ; Thu, 1 Sep 2022 16:55:14 +0800 (CST) Received: from huawei.com (10.67.175.83) by kwepemi500008.china.huawei.com (7.221.188.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 1 Sep 2022 16:57:41 +0800 From: ruanjinjie To: , , , , , , CC: Subject: [PATCH -next] powerpc/mpic_msgr: fix cast removes address space of expression warnings Date: Thu, 1 Sep 2022 16:54:16 +0800 Message-ID: <20220901085416.204378-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.67.175.83] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When build Linux kernel, encounter the following warnings: ./arch/powerpc/sysdev/mpic_msgr.c:230:38: warning: cast removes address spa= ce '__iomem' of expression ./arch/powerpc/sysdev/mpic_msgr.c:230:27: warning: incorrect type in assign= ment (different address spaces) The data type of msgr->mer and msgr->base are 'u32 __iomem *', but converted to 'u32 *' and 'u8 *' directly and cause above warnings, now recover their data types to fix these warnings. Signed-off-by: ruanjinjie --- arch/powerpc/sysdev/mpic_msgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/mpic_msgr.c b/arch/powerpc/sysdev/mpic_msg= r.c index 698fefaaa6dd..cbb0d24f15ba 100644 --- a/arch/powerpc/sysdev/mpic_msgr.c +++ b/arch/powerpc/sysdev/mpic_msgr.c @@ -227,7 +227,7 @@ static int mpic_msgr_probe(struct platform_device *dev) =20 reg_number =3D block_number * MPIC_MSGR_REGISTERS_PER_BLOCK + i; msgr->base =3D msgr_block_addr + i * MPIC_MSGR_STRIDE; - msgr->mer =3D (u32 *)((u8 *)msgr->base + MPIC_MSGR_MER_OFFSET); + msgr->mer =3D (u32 __iomem *)((u8 __iomem *)msgr->base + MPIC_MSGR_MER_O= FFSET); msgr->in_use =3D MSGR_FREE; msgr->num =3D i; raw_spin_lock_init(&msgr->lock); --=20 2.25.1