Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3860760ybh; Tue, 17 Mar 2020 07:56:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt84F3BOnn7J+JJ9+Ozta7vfHt9QC3D8fHBVKlTjM9CLss9QUSpUX750kynpw1xYT5ntW35 X-Received: by 2002:aca:de07:: with SMTP id v7mr3916851oig.22.1584456964581; Tue, 17 Mar 2020 07:56:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1584456964; cv=pass; d=google.com; s=arc-20160816; b=Vwht20MdWt6ILF6vsM7j6GmXZSthgvddrpzua+KqUkb39Fqhly3sR468hfHX73FX4E RXyCnbXTQXlahDHmpHdqwUMDSYnSy7IedEp0c/VY2CUTkBWW0HAdlDletIlcmTVAo/kt 0z3oyQECWbm09E8kl3eVotjqvi4gp4TnDedrnZNDzMc2YmG5i9LfdxdtN3msxzaIF2eB m526cqCXDIwWFNztkylvBY/MHNZkWGKuwOaLFrnGUE8lAk6qEF7jxhQVNwxQsRCBOVtJ CcceswJD0xK07UfReTDTbmA/1rPYTccButzTSvLsiR6E/rlxQiBMeB1VZq7qho+RUo2Q ctJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=Qh7zFP7BOUuaYb1xjZcSU6NEYVfZZ6JyKWOYMVSoqiA=; b=fbsczo7FZb1vYGCNGy/qeDxmgexelvS8y84xFRD4VwFBOd1kXlt0F2mF8SJ21JvND/ 88ark99h0r62HPxWcXbpp/p4YoT+eumvorwN3U8K2BA15JpV/yse5t+UxM/NAOPO+XOr ypRV6aZj8X28gmpe0+HZpUa+DlDG1/OfyElrU/z0pF5hik7oemHVvW9nOhyOdqvJtvFt Ey/RPMlENewff6C8zSAutu6tSlOiZrAfQ1dCJIPtyLAM/U+p9yJHAddvq2m2AhvoRAUU 6bfV3Fvr3uponrLHfiSPuexhN1rvkGk++gjS5h0Wh6XDI59eeGKcA309PU9u+m93FEd2 m96w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=J48iYt2o; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si1894082otn.6.2020.03.17.07.55.51; Tue, 17 Mar 2020 07:56:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=J48iYt2o; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727235AbgCQOzJ (ORCPT + 99 others); Tue, 17 Mar 2020 10:55:09 -0400 Received: from mail-eopbgr140050.outbound.protection.outlook.com ([40.107.14.50]:52838 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727228AbgCQOzI (ORCPT ); Tue, 17 Mar 2020 10:55:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cIFsnR/oSAyllJQ52n1rMHH5zr7v0z7yP6h+UryNp11dIlM8ol7GY1HDTrj8LpeahKPZVX1XmP/73LnRYA1n+RftyWCvKHd0ktIExVL/ZusIEqdL4Gr2pSAkdRwKJVjZUQIoIE3B5vQOsEigRaDNtdjqMzVznTK28D58t/AnoJXdNAf5qsbW3Oj2hcBLLfmsux9erc33oXMhyj14VpmLe0OLY7/ooEf68MoZmgObplydgXQpYa3N9udoz5J7KTSLHO3Sm7msxVpx58Kkk1MUTbXk+O3ROIcyMcozBLtl1TpLyLRPfpeekVDRQUjytdMV39DQHmK2t1YCuwjt+8a0Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qh7zFP7BOUuaYb1xjZcSU6NEYVfZZ6JyKWOYMVSoqiA=; b=imywYZyj8gm4Rs2dXhO/O4EGcdJdWOYvuA7voQCIWiZSyQtddaTmD2mc+LV0lC1cSZd9t16GPxIeBOJH5bOW2WrHx/8G/nXtpOnIehEaJuHV/xgideufIY5A0RNZ1tKrqol9mICo+tESCxgtl/lpKnLYOa5/a0TCALQ2ud69RPvSq+zMfMfcisJ/AXcMbbvP4OUCDLvxA/1PvEJQ9sJid0rMrT6zN0KawJrRnuubUgiM9L5O9R6xzPn6UBxQc5LqX5sVXBs4T9W9eRIAeepmY0ZtFsayM5L5zDgBi0pa48ad2EHnDgbri+eOvC/cz/si+RWmuJibaHDx+uvET5Yu4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qh7zFP7BOUuaYb1xjZcSU6NEYVfZZ6JyKWOYMVSoqiA=; b=J48iYt2odxzrJHwbmV7zMiv3OGEOI55udYSHmX1dLANRxrXogDvc4fOcujnpC6LumRUd2w+u9OptqjFoQHdK5OkpNp9CP8IBYp25E2q17wYEmDGa84B6km1yy6bXDJQxHekRIP24/PFlMVlN8dZh373DtASRDwiktSXL6etLUtQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; Received: from DB8PR04MB6747.eurprd04.prod.outlook.com (20.179.250.159) by DB8PR04MB5931.eurprd04.prod.outlook.com (20.179.11.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.18; Tue, 17 Mar 2020 14:55:03 +0000 Received: from DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::4528:6120:94a4:ce1e]) by DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::4528:6120:94a4:ce1e%5]) with mapi id 15.20.2814.016; Tue, 17 Mar 2020 14:55:03 +0000 From: Zhiqiang Hou To: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, amurray@thegoodpenguin.co.uk, bhelgaas@google.com Cc: Hou Zhiqiang Subject: [PATCH] PCI: mobiveil: fix different address space warnings of sparse Date: Tue, 17 Mar 2020 22:51:25 +0800 Message-Id: <20200317145125.3682-1-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: SG2PR06CA0126.apcprd06.prod.outlook.com (2603:1096:1:1d::28) To DB8PR04MB6747.eurprd04.prod.outlook.com (2603:10a6:10:10b::31) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.73) by SG2PR06CA0126.apcprd06.prod.outlook.com (2603:1096:1:1d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.18 via Frontend Transport; Tue, 17 Mar 2020 14:55:00 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.73] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e152645a-cc0b-4654-6df4-08d7ca832c52 X-MS-TrafficTypeDiagnostic: DB8PR04MB5931:|DB8PR04MB5931: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:126; X-Forefront-PRVS: 0345CFD558 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(136003)(396003)(346002)(39860400002)(366004)(376002)(199004)(66556008)(66476007)(81166006)(66946007)(8676002)(2906002)(81156014)(36756003)(2616005)(6506007)(6512007)(16526019)(6486002)(5660300002)(69590400007)(478600001)(956004)(316002)(52116002)(6666004)(4326008)(86362001)(8936002)(186003)(26005)(1076003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR04MB5931;H:DB8PR04MB6747.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zzYTD064Hg6ZoMzsTD4CpOmoDlZZgbcV5znO0nYRZGTgQWrNV9OtHNfN9PQ9GTTH4sUP8E40PvFvUdOdKQXWAYxqmTpPgsrR+oEKHlsGUwVQN2R2ZsVAQyuQm34deQj5e68umkuuPEBYQ71PzuvScBNMQUYda0ByNzYdPUNkd9/jkS0iql1HVitreuLd7Gs4BfkqUGws2+1QBqY23B3Il8u0A2S62lRqNwQU7BehkYGY6ctHkzknpfsgfwac+yunAXcyRsidjRBe30MilvPpV2rkgFA1m7u6Y/WKXAt4lzVyzW3NZO1f36O01Pe9RSBkCF6etwfpDzenfu8TQiOkSTs4IKGKadaU2AZ3S/RYKp3LthBSPG+pLjfQYOpCHIl1RcFdgLu64M6RIprExajeDPIckgQl/c0RvB7vvzlEiuAspuisPAd9syQkgm30Ei/VPl0keBwtrxrrdfhdBR7Jj2wUzM3vgt/NfbXB6cIajhdEAFf0Eu7P1PkGlcCTD173 X-MS-Exchange-AntiSpam-MessageData: dVcodJ4XOYpecMKtwZE1Dbs+fGvqCldQeJH4/AXOF08K04YJY8pLPraRajoTDGCDyM6I7DADX5AvKWMQfKo88YjvGfJI130HiE7qtpoTUoHSoyfqjUlE1CnJJc4HQWK4t6VrlYl1ZWJCjC4AxlYTWA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e152645a-cc0b-4654-6df4-08d7ca832c52 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2020 14:55:03.2219 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /zHQuVI9JpDV/lRM6MBeJtyQ9KFOuimkZfbBfsyGdzCgNWlbkQkk2QVEAP2awhGybh6J4SnqeLh8hs8LoZR2Fg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5931 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hou Zhiqiang Fix the sparse warnings below: drivers/pci/controller/mobiveil/pcie-mobiveil.c:44:49: warning: incorrect type in return expression (different address spaces) drivers/pci/controller/mobiveil/pcie-mobiveil.c:44:49: expected void * drivers/pci/controller/mobiveil/pcie-mobiveil.c:44:49: got void [noderef] * drivers/pci/controller/mobiveil/pcie-mobiveil.c:48:41: warning: incorrect type in return expression (different address spaces) drivers/pci/controller/mobiveil/pcie-mobiveil.c:48:41: expected void * drivers/pci/controller/mobiveil/pcie-mobiveil.c:48:41: got void [noderef] * drivers/pci/controller/mobiveil/pcie-mobiveil.c:106:34: warning: incorrect type in argument 1 (different address spaces) drivers/pci/controller/mobiveil/pcie-mobiveil.c:106:34: expected void [noderef] *addr drivers/pci/controller/mobiveil/pcie-mobiveil.c:106:34: got void *[assigned] addr drivers/pci/controller/mobiveil/pcie-mobiveil.c:121:35: warning: incorrect type in argument 1 (different address spaces) drivers/pci/controller/mobiveil/pcie-mobiveil.c:121:35: expected void [noderef] *addr drivers/pci/controller/mobiveil/pcie-mobiveil.c:121:35: got void *[assigned] addr Signed-off-by: Hou Zhiqiang Reported-by: kbuild test robot --- drivers/pci/controller/mobiveil/pcie-mobiveil.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil.c b/drivers/pci/controller/mobiveil/pcie-mobiveil.c index 23ab904989ea..62ecbaeb0a60 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil.c +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil.c @@ -36,7 +36,8 @@ static void mobiveil_pcie_sel_page(struct mobiveil_pcie *pcie, u8 pg_idx) writel(val, pcie->csr_axi_slave_base + PAB_CTRL); } -static void *mobiveil_pcie_comp_addr(struct mobiveil_pcie *pcie, u32 off) +static void __iomem *mobiveil_pcie_comp_addr(struct mobiveil_pcie *pcie, + u32 off) { if (off < PAGED_ADDR_BNDRY) { /* For directly accessed registers, clear the pg_sel field */ @@ -97,7 +98,7 @@ static int mobiveil_pcie_write(void __iomem *addr, int size, u32 val) u32 mobiveil_csr_read(struct mobiveil_pcie *pcie, u32 off, size_t size) { - void *addr; + void __iomem *addr; u32 val; int ret; @@ -113,7 +114,7 @@ u32 mobiveil_csr_read(struct mobiveil_pcie *pcie, u32 off, size_t size) void mobiveil_csr_write(struct mobiveil_pcie *pcie, u32 val, u32 off, size_t size) { - void *addr; + void __iomem *addr; int ret; addr = mobiveil_pcie_comp_addr(pcie, off); -- 2.17.1