Message ID | 20221028155703.318928-8-Frank.Li@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp910661wru; Fri, 28 Oct 2022 09:01:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76fp5mO/SWuJ2PO42LMkjLbfm6YeWNGJzPi9Ukf1eWFYPfp0FjtXL/nHmQfwdrYg2YJTkm X-Received: by 2002:a17:902:e891:b0:186:c544:8b1e with SMTP id w17-20020a170902e89100b00186c5448b1emr19122374plg.163.1666972902163; Fri, 28 Oct 2022 09:01:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666972902; cv=pass; d=google.com; s=arc-20160816; b=X71kX86YrV6HMRtKC289Qc878Fg62UhJ0fL62DbTrg6oLFVkDI7Zr7IWyM7TmGIW3I zPEgr5gvRxyLbqFKB+xM3YnGG3etCU3oMimW4yHl+fNaM6ge0D43xZTj9EB/2aArt81T /DGcSKZZXklGIPEbQm4eFhAqDBajGjLGKH1RCH6x9jI+FYITD0d2biimhrAbw1vB6ZL2 jMBqXJgZukmsUC4tgjqIfK3lkyrWecVkS+2Eg4SYWSeb54psjO8hQvOnAFd9I6cTYmQa t7/7fbvdKZFSXKwqKoBsEG5Mk6v+twsVP7vCvuwovQdUXaNuH4npaFHzRD81IQZvi1yV Ozrw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3qTLObPZYQoAp7sIAf7mRsGpATwWKqn/VhwZAPD//lQ=; b=JQlMAqetS96jBSgAum2B4D+RmIvUG6fgN7rAp/TAxU8ASKEj6N2TRjazgHWB9YR95b rnnbX8UFZGCOYDASE6umx/kNrZScS1OVyDWXQhr3DJLnK3qHNKvCMJx0WqZTLkOFNF5M v6Fx5lFyltXyK9bgYxwNTzq6WpuJi27FyAmTfw6Q+DssiEORB+vQIx/Zcj1yw8XuYK9w zH0dq5qHJmH3YZ/o7ChM8hQOh50ac+ORMq4hAWGQENN62p2rdOEERNHb98JTddgmO8x7 Io1eq5KWu2NukDE/g8WVltlenvH8Rco2A3RKJs2BvYTxMd6T/uxAODn7ClfqDxbQfObh uDWA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FJlwNHXk; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a16-20020a056a000c9000b00561a2341e81si6431643pfv.125.2022.10.28.09.01.28; Fri, 28 Oct 2022 09:01:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FJlwNHXk; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230368AbiJ1QAs (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 28 Oct 2022 12:00:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230460AbiJ1P7E (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Oct 2022 11:59:04 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2067.outbound.protection.outlook.com [40.107.249.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D22C21CD61; Fri, 28 Oct 2022 08:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b2JMW1zYqOhLEa0+aSSsy+DfHAiw5Gw0PiiScvMTpKIvchoTzZWxrwfx6qBaP9arna8rIaamMfdgZmogKl62bqn/Jq0tUN3x8b8Ehqf4w0O0evxAPRDR4SP903YoaoWLoLq+np+AePUFVtNI5od5kQWWsWirgOsS5hEAK1pnCusaYnFZLz5woalUzb5GES7mp22grkxaSeIV0maWJdB1ViTlnkHSfxrTW3a3zlvqZ3RgmJA009CZf3FSl0aXrIjX5I9dBdR0qpZ5Kd0frq0D7JiF3ECyNIb91G73+3jRcQ8BQ5EhJ6XN58tzIR5Qrqu38YyhrllJuVlyyEoIx8+vOg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3qTLObPZYQoAp7sIAf7mRsGpATwWKqn/VhwZAPD//lQ=; b=aBys9l/s21q/w6n+635kCi1+EXpBMXCNNvOqlB1v/BwNKAvUwSK/Hu6Op/Z2BC8po9gSet94dXqJv16HY0r2YiEuO/socklW51t8e5rIVjjT89Q1kgdBYDyikqgxO05gIVxu7DX7BtYoRFWn9HIJoEWFA1Ie9jzX229Tx07pD+WI1MGupxGD2IQHiwABbo7stdm3gRwPgKu9bxhr7VlFGAlNkfEydRItLHs0z+iVKNZYXTa2UFmfmHBSnpZhnebF5B4zGz+MeXIo0zPjmq6ViQeTyV9JqxVpO3ug4FQW5oJJXgO7WmpFG84jiZ/xie50I0Oio+54OrdOn4JrH1/Z+g== 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=3qTLObPZYQoAp7sIAf7mRsGpATwWKqn/VhwZAPD//lQ=; b=FJlwNHXkunkP6vqX14ElRx0lvfR+kgtpKdqsbttVo8lwIsKZgeKIYENCkVhFKP8NbYxGd+ayGHBbehpYA7AUIhJ9PGABmg1QW2L1I3+wHaZbswq6J1m1dFb3dtBfagt/wB6MT8wxln6IuK/7tQFvD2W0jAiDCGAM+6nOPf9ztis= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) by AM9PR04MB8323.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Fri, 28 Oct 2022 15:57:53 +0000 Received: from HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28]) by HE1PR0401MB2331.eurprd04.prod.outlook.com ([fe80::44bb:8387:8f4b:6a28%10]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 15:57:53 +0000 From: Frank Li <Frank.Li@nxp.com> To: frank.li@nxp.com Cc: allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev, jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, mani@kernel.org, ntb@lists.linux.dev Subject: [PATCH v14 7/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at ntb->reg Date: Fri, 28 Oct 2022 11:57:03 -0400 Message-Id: <20221028155703.318928-8-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028155703.318928-1-Frank.Li@nxp.com> References: <20221028155703.318928-1-Frank.Li@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR02CA0010.namprd02.prod.outlook.com (2603:10b6:a02:ee::23) To HE1PR0401MB2331.eurprd04.prod.outlook.com (2603:10a6:3:24::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0401MB2331:EE_|AM9PR04MB8323:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d0791b3-0e2b-4f8f-a9b9-08dab8fd2c17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eebcoRqqlVnPDNBfEx7u1pnb42pfrROLtrYYahkOaHVKrAYp2JHwXk5QCUnu43NZVDzpZoQTvHswcEppZ1nToJDr3durM3SeU6GfxpaOvnO7cVMTzKgVW6BWFsmJQFUBsLwfD/LIBGwNxgT5IKle5rjUfRa6bzbVwCRlkvzQTtpTdQ5fwtv2Kf8ADOFO2I+zRxbPjf/PxxKNLjQFTyAYmZVLFnr3DpoedcOE5/lJrIyLj4nBKRjzN4AP14GjjXuI8OHES7V1aaGhARksEZBMkfzbOsUGagV3yKyFiEneBJAGTXpX8yYyKdXfipYH5q+fiMh0m68IdkUgeMC1PIx88wOe2lVhWIBOuXByFsS2AixLlGFxJUt4Ga9/hCYG8m/IEZiA2TKyVhea3iIlqXp+3W1Upv6HHaL5JhugS8QQiAW+BINzvZq7JT2g1pjk8iKK9yHPwdOM3xS+7ChoF1A5HzThq5rnAhISvm6p7LbZL67NIHgtU66PaftsEHd4C1IjsW61C6/tymDaFcL3DTIAxMAqf7e9O+x8598M8esMZmSH6wN34UaJ1zRtNOzrXAGr4odrgvAgVy902RREnmwCDGB2LwTZa8nsgOJqMSJcUBtY2QGoyK/jobwKb9K36xH0KOrlUl4kbp7qlPRzE27ETdLvhTJhZFatE44n+CLo5eEIArWukPVzNb2dz6/RdvWFhpkBDKi5KN2m7NNdA3kp55tTBKvTqwW9Rat8DXnmY007AbHv+bU6RGovEF/CVLTbfP2JkBqzHUH8qTXTu62FJA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HE1PR0401MB2331.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(346002)(366004)(396003)(39860400002)(376002)(451199015)(6666004)(316002)(37006003)(34206002)(8936002)(5660300002)(4326008)(2616005)(186003)(1076003)(7416002)(8676002)(52116002)(36756003)(6506007)(66476007)(66946007)(66556008)(6512007)(26005)(41300700001)(83380400001)(86362001)(38100700002)(2906002)(38350700002)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: P5IoyyP20+CYLuBUFOoAA/EDGhRNs2ZwytDCKbi/lMvRvRgoU/1lg1GeohBcVpITiOZPRTJJb57Snu6x3hyuZjku/yOSimn1gku1X4qNQC1pw7Iq5lbdDMFTj9MDj1viXA+VfBmjSKLcI+NAEk0gfyge5S0AldiD5zxAwanhkEoek/nG8kHPMY0fIor+vzhkAviM/My1cQ2njrIFM17GQzktdFdLrlirae584YeNn2S5wW1qVBfQp3xOwXgtZLTrxoyC6rArhxZTIJwJUJZBbYo4jnewJfiWSbhxIqJ31HusgsVNQ0h8l5zMUVcWtaWP5XceJW+qIGohUqAFZnpRlzH6Rvdtu3gwnoSrTloY5tcOgOkhexT0EcRFP2p9R9ifFkWdJLQPzeXkPcjcIXgTQqFaA/aM4Zy5ZzRrnpYEEtKJ18vU1p6hiI0R1BB4b1N8UK1ShkkyrbvjmPjqHRWHjj37flZW5sNV8zLC63X+mHMvIe1XWUqA6ifWvlNOA3MFyMZlQMf0hzE4tYZX2dEymUQ/2DQIcBjBLNo0fYjuPixegqo1PFPE7bdqbQWO75bEb7XrnTqESyQpfVxobw30+db4MfoeRo/DDC/6eJaKB/Dd/w/kS6RtgQSkImAh3d09BzavPxboEnveSLwmEFH1fGKkTbDpjNpZZow2/ZiHEb/fJ5vqcs8Ird42uqif1cKFGU2EtJNGW5Qd0ZWMPW7xNTj/b8vETxTyCmz78S3VUM4yWdsoDineifdrWlzJpAMXOOXVVlJmQIKpEF3LxUYTrFH6uD8scYAMcz7Oy2H2t61z5WBEYxc8d9CGJOeG55xveHFrowZp6Q43xZV1alV5bqYUjAxx28lmYhNu/0q1EwOEl4qkXXIodXwykW2EYX9d89voXalWDXaCkZRATm6UGPog444hGYUJqBrzgd1doCt72uUmbkz4yMMe8tibtgrSLhzP03odJQvsGfMQkJETYPveRkhDZrOA9eRvEFfTpY5JzbqnKNrYTH3+27USkJUiE6NUJZv4YRcJd5xPiMPIHGa1u66eyHJW6fwglSQ8Yefm2/wGVzc4KU7SxhKfsi9KpN9jw5FU72KkIol0US5EA7/ih9VxNEOSfFyJLKMr2lJDABmQqgNjdnXaRRF1KI9Do7BqeV/ReAo8q47xJ4JzjE4CPt5Fg8H4sIQlV4E2v4iDZGHCS8kgqU2cAosP0Nk4a8P74h1gxHHiXBp9JEizPL43gROP3nbDTMefYfWlanPuXUKqNA5KYA15rlOx2Z9Y2r+UkGzn4dLMYLJLnOFghvWxhMs4p1Pty1D+ADX45ffon44FYlaHUuX081enBRVnvE6+AIGd9L0E6rF9Ik09fMaNjvwYu5kB/6qfXzMt4R/Q9ODahdUIDGeBS5IwSU7/LMjZREs8hYAdDhAsZBSRqQDcaSAut7Us3mKh6xCeYjztnGRtyUIe7Wr3CU9/CruUUrYOQcayu4Ak5vjvtAtOR6TQXJpZqq/X/KoYBho1Jc/8JyCw1s6q2epcjVSREJu1mBgomEr6GXTuvsOKCgDV5zk97qZUePSTqLMXWD6Mnv8= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d0791b3-0e2b-4f8f-a9b9-08dab8fd2c17 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0401MB2331.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 15:57:53.4206 (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: Bp8/kq5a2D0TA8Jf/12e48ZKHasLuvAVv9v6/vvN+71gJxPVvmplBrXtDK/JyXBx7yhcGX4wyaAuVpHiuxbT7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8323 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747947777589324721?= X-GMAIL-MSGID: =?utf-8?q?1747947777589324721?= |
Series |
pci-epf-vntb clean up
|
|
Commit Message
Frank Li
Oct. 28, 2022, 3:57 p.m. UTC
From: Frank Li <frank.li@nxp.com> pci-epf-vntb.c:1128:33: sparse: expected void [noderef] __iomem *base pci-epf-vntb.c:1128:33: sparse: got struct epf_ntb_ctrl *reg Add __iomem type convert in vntb_epf_peer_spad_read() and vntb_epf_peer_spad_write(). Signed-off-by: Frank Li <frank.li@nxp.com> --- drivers/pci/endpoint/functions/pci-epf-vntb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On Fri, Oct 28, 2022 at 11:57:03AM -0400, Frank Li wrote: > From: Frank Li <frank.li@nxp.com> > > pci-epf-vntb.c:1128:33: sparse: expected void [noderef] __iomem *base > pci-epf-vntb.c:1128:33: sparse: got struct epf_ntb_ctrl *reg > > Add __iomem type convert in vntb_epf_peer_spad_read() and > vntb_epf_peer_spad_write(). > > Signed-off-by: Frank Li <frank.li@nxp.com> Acked-by: Manivannan Sadhasivam <mani@kernel.org> Thanks, Mani > --- > drivers/pci/endpoint/functions/pci-epf-vntb.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c > index db3455c1589b..55b7599345c6 100644 > --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c > +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c > @@ -1120,7 +1120,7 @@ static u32 vntb_epf_spad_read(struct ntb_dev *ndev, int idx) > struct epf_ntb *ntb = ntb_ndev(ndev); > int off = ntb->reg->spad_offset, ct = ntb->reg->spad_count * sizeof(u32); > u32 val; > - void __iomem *base = ntb->reg; > + void __iomem *base = (void __iomem *)ntb->reg; > > val = readl(base + off + ct + idx * sizeof(u32)); > return val; > @@ -1131,7 +1131,7 @@ static int vntb_epf_spad_write(struct ntb_dev *ndev, int idx, u32 val) > struct epf_ntb *ntb = ntb_ndev(ndev); > struct epf_ntb_ctrl *ctrl = ntb->reg; > int off = ctrl->spad_offset, ct = ctrl->spad_count * sizeof(u32); > - void __iomem *base = ntb->reg; > + void __iomem *base = (void __iomem *)ntb->reg; > > writel(val, base + off + ct + idx * sizeof(u32)); > return 0; > @@ -1142,7 +1142,7 @@ static u32 vntb_epf_peer_spad_read(struct ntb_dev *ndev, int pidx, int idx) > struct epf_ntb *ntb = ntb_ndev(ndev); > struct epf_ntb_ctrl *ctrl = ntb->reg; > int off = ctrl->spad_offset; > - void __iomem *base = ntb->reg; > + void __iomem *base = (void __iomem *)ntb->reg; > u32 val; > > val = readl(base + off + idx * sizeof(u32)); > @@ -1154,7 +1154,7 @@ static int vntb_epf_peer_spad_write(struct ntb_dev *ndev, int pidx, int idx, u32 > struct epf_ntb *ntb = ntb_ndev(ndev); > struct epf_ntb_ctrl *ctrl = ntb->reg; > int off = ctrl->spad_offset; > - void __iomem *base = ntb->reg; > + void __iomem *base = (void __iomem *)ntb->reg; > > writel(val, base + off + idx * sizeof(u32)); > return 0; > -- > 2.34.1 >
diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index db3455c1589b..55b7599345c6 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -1120,7 +1120,7 @@ static u32 vntb_epf_spad_read(struct ntb_dev *ndev, int idx) struct epf_ntb *ntb = ntb_ndev(ndev); int off = ntb->reg->spad_offset, ct = ntb->reg->spad_count * sizeof(u32); u32 val; - void __iomem *base = ntb->reg; + void __iomem *base = (void __iomem *)ntb->reg; val = readl(base + off + ct + idx * sizeof(u32)); return val; @@ -1131,7 +1131,7 @@ static int vntb_epf_spad_write(struct ntb_dev *ndev, int idx, u32 val) struct epf_ntb *ntb = ntb_ndev(ndev); struct epf_ntb_ctrl *ctrl = ntb->reg; int off = ctrl->spad_offset, ct = ctrl->spad_count * sizeof(u32); - void __iomem *base = ntb->reg; + void __iomem *base = (void __iomem *)ntb->reg; writel(val, base + off + ct + idx * sizeof(u32)); return 0; @@ -1142,7 +1142,7 @@ static u32 vntb_epf_peer_spad_read(struct ntb_dev *ndev, int pidx, int idx) struct epf_ntb *ntb = ntb_ndev(ndev); struct epf_ntb_ctrl *ctrl = ntb->reg; int off = ctrl->spad_offset; - void __iomem *base = ntb->reg; + void __iomem *base = (void __iomem *)ntb->reg; u32 val; val = readl(base + off + idx * sizeof(u32)); @@ -1154,7 +1154,7 @@ static int vntb_epf_peer_spad_write(struct ntb_dev *ndev, int pidx, int idx, u32 struct epf_ntb *ntb = ntb_ndev(ndev); struct epf_ntb_ctrl *ctrl = ntb->reg; int off = ctrl->spad_offset; - void __iomem *base = ntb->reg; + void __iomem *base = (void __iomem *)ntb->reg; writel(val, base + off + idx * sizeof(u32)); return 0;