Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2262758rwi; Tue, 1 Nov 2022 05:56:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Dkb8GWUp4AK4cWVM/gbCDSrKV8hllPKZd0f39rUJnYz/TNZb46T4BqcIAmTKaA6gqo9PC X-Received: by 2002:a17:907:7e9a:b0:796:7a21:1520 with SMTP id qb26-20020a1709077e9a00b007967a211520mr18301673ejc.236.1667307365031; Tue, 01 Nov 2022 05:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667307365; cv=none; d=google.com; s=arc-20160816; b=BORBG65BIeYEU6bpXvxEi72/CDe6ZQg7YZLEGUyjCPJKqYJDszK7aNdEwXCbr5LIAg X7gshVW7X1fKYWIbS3u1y7xpoYOQz9Vcw0d3nNRhV640b0hNe7M5Ap3Yq2o5vDJb0ik2 J0YlvTYwjMrvWLJQKOO+AZyu0sZHAFC/f53r3iDkYbyuPg0IFtGiECyrx6VD6H7jJQ5n ij0ptCpNgmKwfIMpYcxZhaV+q+0mcasfJEI1fMXpAub8rW39FD1OyfCyVE6/BgvUswJm LXwMRBSshFgp6t9EdYse87YOW9Dz2RIEtvM6sGWS2PBNCguWni+C11E9G5YHjdFcHGFL dw8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oJ+jic/FGjmX5COEnYGL4dm3rU0ZILXxlASDY5RmJ1E=; b=D+CghjLuBw+8nasxT/1mRKpzX3O5gh0RMNs8StyhzkeknRqxusXy/y02Ww8GAwnUHV UliTEOBJ8BJfdPDpTTyF/lBwUWWZwzeEBJxtkRequGU9X0rsC6qcIcdFG7WPLzPSD5TP Nqc63uxxM7P3Z5bgN7cgoQomMHO/vF4GRe0v5lEwcUx4y2/uxK3epRx0cEjNZeeVMNHw mAVzeTeGjjpgyPT1OAHWih1Cy1TRz58s5KoidG+G0ZHI7gHR6IIcmcYJTlJ0f4Nkje4V k0bcBYs9Q1iEvP6xLrPmY1gyqWg61n5LsYKcuQlavgA1RGqgZTuu4ax6db+yB67DH+Gy fg5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N9ZRiJwu; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a1709065d1200b0078e27ef9501si13100956ejt.750.2022.11.01.05.55.39; Tue, 01 Nov 2022 05:56:05 -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=@kernel.org header.s=k20201202 header.b=N9ZRiJwu; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230189AbiKAM1b (ORCPT + 97 others); Tue, 1 Nov 2022 08:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbiKAM1a (ORCPT ); Tue, 1 Nov 2022 08:27:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61E6A17A90; Tue, 1 Nov 2022 05:27:29 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id F256360FC0; Tue, 1 Nov 2022 12:27:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2981EC433C1; Tue, 1 Nov 2022 12:27:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667305648; bh=SK4dyF0brKJtStfMTi8gUxZoC7HL5prGtib7M7fQaSQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=N9ZRiJwumBpfKyBy3NofyOY2BWpUBrYax/A5FBUEUCxMFHrHA8X9Gfx/UZEB9QS02 VCyYed3iEfcTXAOFIf7pnTZVdxKEsMpXZpJEngNj+e8GZC8qdudX0qJWYOpiWd+ZTX NhIdffY03DefK78I6948ALnWXBUYZUwsbdqQro+mrQRChWmilH2J5tRy+Uj/AvAlkv l166fdTItW7neijAWiXYR8Lc/8x1cAQig69cvq6H81nbomnC0NuAf+IaRqxaUsCuek 2HtvCJVTu9LgeOlhkywFuGjg5m2cKjouZetijh4kEDRKpHedguZ6DlCJVUOmTXXnj4 WLGNQL3b04TQA== Date: Tue, 1 Nov 2022 17:57:15 +0530 From: Manivannan Sadhasivam To: Frank Li 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, ntb@lists.linux.dev Subject: Re: [PATCH v14 7/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at ntb->reg Message-ID: <20221101122715.GK54667@thinkpad> References: <20221028155703.318928-1-Frank.Li@nxp.com> <20221028155703.318928-8-Frank.Li@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221028155703.318928-8-Frank.Li@nxp.com> X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SORTED_RECIPS,SPF_HELO_NONE,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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 28, 2022 at 11:57:03AM -0400, Frank Li wrote: > From: Frank Li > > 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 Acked-by: Manivannan Sadhasivam 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 > -- மணிவண்ணன் சதாசிவம்