Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3915893ybh; Tue, 17 Mar 2020 08:51:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuEwtBf6aNRYFcPzkLEH3ez7E5xrLeH/ugcDSySsctbv/6Ar/3URx3RsXR2ORyysHgsx9zu X-Received: by 2002:aca:df45:: with SMTP id w66mr4026267oig.76.1584460267469; Tue, 17 Mar 2020 08:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584460267; cv=none; d=google.com; s=arc-20160816; b=a9qHwvnmUuIKFqMeGLfkT3LFYjmfDnzThkzc711HLHGTCDfI8z1fJ9pyw8anI8wjXw vkdL7df6IWPElqtS1OeWZMkDnGsrH/U97aRGaXusY4mWAv4Pw/D/Ld+AOUCXE6Sp4BG3 yZ3pETdAO8vJABc4mYv9ezsPfpUkNsajqJjQaYOzh+TFE9N/KxppCnz3lL72c71wPMqi dzwgItVY2Jk0sxbx0+/RpbTSVnu4a5x+bGBndEGd91XkoR3vQDJslqsHafCgKmLek5Pg SSOzYDmKSX2p1AN4PF56n6U7p9TeVMpJPQAmt5OcmbthVOIwl9kck1yl3VXryx8itdfH I0dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=C+IrIKTiYxL2ynM3V0zyyTS+9ARLkpdirFeDGR/ysPk=; b=TPIMEpoZJHFNTV5op5b5hq6M1HEoilLhNNYy/2Xj/uJx7aAlsFP/w312f9Hq+KNo1y fUXL9nqoP5QjosBJ016Xu0aQhZkp/su1D1pg9JmaZNrDmbip6wGolE7wSNWnTgfcdGAc O2tKhGgRUjZ1d07wbTPFY/Un/LZ953OSJB49qzbS5QeeBbLwPTCzOpIM4uGCKSZ8gG9E 73Sfv9MIOCsscnTTXXdO+ngY9yrCfTLi/kNOOIrnbQGlJ4gwn+mTe2J7+OLUXXiflJp2 B/GYsXRuzRYvcxFU43EoGZWn9mx0XxPxH/caPmrgT53eC2vy9q6ZCDEBNZ/qO1GGHB99 6LvA== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q15si1882816otn.168.2020.03.17.08.50.54; Tue, 17 Mar 2020 08:51:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726682AbgCQPuf (ORCPT + 99 others); Tue, 17 Mar 2020 11:50:35 -0400 Received: from foss.arm.com ([217.140.110.172]:39862 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbgCQPue (ORCPT ); Tue, 17 Mar 2020 11:50:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6A67830E; Tue, 17 Mar 2020 08:50:34 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9AE3F3F52E; Tue, 17 Mar 2020 08:50:33 -0700 (PDT) Date: Tue, 17 Mar 2020 15:50:23 +0000 From: Lorenzo Pieralisi To: Zhiqiang Hou Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, amurray@thegoodpenguin.co.uk, bhelgaas@google.com Subject: Re: [PATCH] PCI: mobiveil: fix different address space warnings of sparse Message-ID: <20200317155015.GA30120@e121166-lin.cambridge.arm.com> References: <20200317145125.3682-1-Zhiqiang.Hou@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200317145125.3682-1-Zhiqiang.Hou@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2020 at 10:51:25PM +0800, Zhiqiang Hou wrote: > 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(-) Applied, thanks. Lorenzo > 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 >