Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2478135imj; Mon, 11 Feb 2019 03:37:51 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia4svP7H81Wgtd4L1R6qeKj9S85+LMl1MzHmiERZfMixxUjltdPHMO6ywY88XSfh0hutlq9 X-Received: by 2002:a17:902:7608:: with SMTP id k8mr31053447pll.245.1549885071120; Mon, 11 Feb 2019 03:37:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549885071; cv=none; d=google.com; s=arc-20160816; b=FpHJCW+q8MKUBaDzhqoBBYGE5HMwB3B8lldDXBhkKqk7vJPIDyrxV13+1Abhrgaz7f g4yJnnUuDCL93ZciW558bCwBKWi4NtXnbD30C7SWuUgHmX0pl+rRpjHpmM4yRmHYqLmv ccCMi/3NSKRarVPuHs1dskijv4avl48JyEMHgq4HtoQhAYARyR65Hg/h0dDagLJOjS0E mkfYOkuC0BW8zonF+OF81T4qcOV7ZoOxJ9qy9TifObnHRX/4Jaa2t0krn3rBdoBVhfoR ejIEKDoXN5vGxJuCkhQJN8oSduN8JuEPe/yUpJ6ryfJ1oHdXnjWHiYAmCs8qLcWl8kfL UVBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=tCHzzOSMDaTrvQTpSBKLxiA7Z7YMPY+MtGlA/N2RQMM=; b=tSjtFSNviYAcci1ZoaIMXKXMf/CNImKVr4JHJnXPyCDU2e3hgLdyetCf/8sITExtqr Lzq9TCHYMQdpMAx1FgvlnihRKcR5w0hi8klGns79IkBOStQhAZRQwf6cdutxz3VfNHPw rzUfMtwYnC/7Uk1+9PtSCfZTCHzsRLX2Sj8Owq+hE5wG4qmluqIpJ1L9lwGE8KeNskUa BYsUm6UsS4y26WOG/VSyGNDdMUhAYv+HTcyw+ApliueFPhSpAiDqaNHpfLlOSTBFLGAE 40VGP7d1NH5ITQHIryWOfY1bPmx5Pj/mRWEek2u5seNVOtk7d4RdtlwqdoBNwOTcCA4f 13QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LbYKvz8N; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o13si7758939pgv.433.2019.02.11.03.37.34; Mon, 11 Feb 2019 03:37:51 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LbYKvz8N; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727006AbfBKLgB (ORCPT + 99 others); Mon, 11 Feb 2019 06:36:01 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:43434 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfBKLgA (ORCPT ); Mon, 11 Feb 2019 06:36:00 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x1BBZkTn055107; Mon, 11 Feb 2019 05:35:46 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1549884946; bh=tCHzzOSMDaTrvQTpSBKLxiA7Z7YMPY+MtGlA/N2RQMM=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=LbYKvz8Nmj4HGG5Pq2pTtgQE1ndWS15FrXMhWOj3Pkpf/3ngRMps4Bl5lZ5i5UTGM L3sq8hGSP2/fLYxdjWBPdAdzFx7ZwSOVi1r2SQw9fhbn2HwbLo+GkoYtiJX29nASVs vRVYa+1V49HzHWck3NamQlesP78l6LIYkygrShOQ= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x1BBZkEo091551 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 11 Feb 2019 05:35:46 -0600 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 11 Feb 2019 05:35:45 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 11 Feb 2019 05:35:45 -0600 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x1BBZfjJ022066; Mon, 11 Feb 2019 05:35:42 -0600 Subject: Re: [PATCH] PCI: endpoint: functions: use memcpy_fromio()/memcpy_toio() To: Wen Yang CC: , , , , , , , , , Greg Kroah-Hartman , Cyrille Pitchen References: <1549875840-10582-1-git-send-email-wen.yang99@zte.com.cn> From: Kishon Vijay Abraham I Message-ID: <2c8762eb-ea8e-7de4-cfd8-f3db2cec5d91@ti.com> Date: Mon, 11 Feb 2019 17:05:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <1549875840-10582-1-git-send-email-wen.yang99@zte.com.cn> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/02/19 2:34 PM, 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 Acked-by: Kishon Vijay Abraham I > --- > drivers/pci/endpoint/functions/pci-epf-test.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > 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 >