Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2780224imj; Mon, 11 Feb 2019 08:21:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IafTw0IJnarKmjmt5iLxX6D8bQfqs1HGeyxXIcRfGTd3zAlLEtdsX6G8Hj+PpTlGIDraWBm X-Received: by 2002:a62:e04b:: with SMTP id f72mr11656335pfh.41.1549902070784; Mon, 11 Feb 2019 08:21:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549902070; cv=none; d=google.com; s=arc-20160816; b=NlexS372aRHYB7lJdRxeDiBIX/t1Rouuz6N5ZdWz7jLcjSyKkhtKTvbV050ICbpI6d MT73MybJCRGEiNIbXZhITirU7KrIg3nSVnuSwtWEsuicFIhNFoK/GoJb+hykF5s6qyNu P5lHGzBOh3mdjCFb+OtXoVbxeq2TEItsnnYSfKE/pOXKkMslkUu5k20FsWJy62MFU5Mv /FKhGZJEItKN+JmGG0FJTOl6aeeuGJg9Q9cgGFsqsCsYLN0589ApDtxGlR49LG7wAQg7 xRrj9m+fq9/c057oQczdwGsNeIvZD7M0N/V31McNvjllw52QLmWDLt6whrnJ4fJUUUTE pnYA== 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=vwTobV2cA8SkmV5jBRVnL811C9fIzlGmUh56fSKLaPs=; b=IIqoMPVhIeodIBod8wuwHhm/o8us0IIX98QLFx1jc2NOLD0i3F7iuzoxbFp1h5SE+g GG/5ikXaeakq3bNHUxAWelzmyh1bzzaIMLhwUDHYx9erF4//mH/9Sn/TSqmYXUA9wW52 8LFxHzgII7JK2yNCVoz9QKz4GPwBODPajCwMgmYYTgYpBCZ0C5iorWg7FFmd8y/cu+ND lcr1CPU7ITzmLhB9KOLxkM9P8izmj/otPynAQ8DGKm/epREVBOonJ2jP2MQD4V1XL3lQ spSKoVRHF9uVGMh0d0HII8xCM5YVcquJyE9jAZiAS8JbyI1DAVcyOWDITuzm2/RBlycW CE7Q== 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 e4si9048186pgs.492.2019.02.11.08.20.53; Mon, 11 Feb 2019 08:21:10 -0800 (PST) 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 S1728645AbfBKQUG (ORCPT + 99 others); Mon, 11 Feb 2019 11:20:06 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53554 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727224AbfBKQUF (ORCPT ); Mon, 11 Feb 2019 11:20:05 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 237D380D; Mon, 11 Feb 2019 08:20:05 -0800 (PST) Received: from e107981-ln.cambridge.arm.com (e107981-ln.cambridge.arm.com [10.1.197.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1064D3F675; Mon, 11 Feb 2019 08:20:02 -0800 (PST) Date: Mon, 11 Feb 2019 16:19:57 +0000 From: Lorenzo Pieralisi To: Wen Yang Cc: kishon@ti.com, bhelgaas@google.com, gustavo.pimentel@synopsys.com, niklas.cassel@axis.com, baijiaju1990@gmail.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, wang.yi59@zte.com.cn, Greg Kroah-Hartman , Cyrille Pitchen Subject: Re: [PATCH] PCI: endpoint: functions: use memcpy_fromio()/memcpy_toio() Message-ID: <20190211161957.GA27797@e107981-ln.cambridge.arm.com> References: <1549875840-10582-1-git-send-email-wen.yang99@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1549875840-10582-1-git-send-email-wen.yang99@zte.com.cn> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 11, 2019 at 05:04:00PM +0800, Wen Yang wrote: > Use the IO memcpy() functions when copying from/to IO memory. > These locations were found via sparse. > > Signed-off-by: Wen Yang > Suggested-by: Kishon Vijay Abraham I > CC: Lorenzo Pieralisi > CC: Bjorn Helgaas > CC: Gustavo Pimentel > CC: Niklas Cassel > CC: Greg Kroah-Hartman > CC: Cyrille Pitchen > CC: linux-pci@vger.kernel.org > CC: linux-kernel@vger.kernel.org > --- > drivers/pci/endpoint/functions/pci-epf-test.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, with updated tags to pci/endpoint for v5.1, thanks. Lorenzo > diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c > index 3e86fa3..4bbd26e 100644 > --- a/drivers/pci/endpoint/functions/pci-epf-test.c > +++ b/drivers/pci/endpoint/functions/pci-epf-test.c > @@ -175,7 +175,7 @@ static int pci_epf_test_read(struct pci_epf_test *epf_test) > goto err_map_addr; > } > > - memcpy(buf, src_addr, reg->size); > + memcpy_fromio(buf, src_addr, reg->size); > > crc32 = crc32_le(~0, buf, reg->size); > if (crc32 != reg->checksum) > @@ -230,7 +230,7 @@ static int pci_epf_test_write(struct pci_epf_test *epf_test) > get_random_bytes(buf, reg->size); > reg->checksum = crc32_le(~0, buf, reg->size); > > - memcpy(dst_addr, buf, reg->size); > + memcpy_toio(dst_addr, buf, reg->size); > > /* > * wait 1ms inorder for the write to complete. Without this delay L3 > -- > 2.9.5 >