Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754138AbcJRVg3 (ORCPT ); Tue, 18 Oct 2016 17:36:29 -0400 Received: from mout.gmx.net ([212.227.15.19]:57217 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753535AbcJRVgU (ORCPT ); Tue, 18 Oct 2016 17:36:20 -0400 Subject: Re: [PATCH] staging: slicoss: replace memcpy_fromio with memcpy To: Ryan Swan , devel@driverdev.osuosl.org References: <1476826003-1202-1-git-send-email-ryan@ryanswan.com> Cc: liodot@gmail.com, charrer@alacritech.com, gregkh@linuxfoundation.org, bmarsh94@gmail.com, amarjargal.gundjalam@gmail.com, aquannie@gmail.com, janani.rvchndrn@gmail.com, kevin.m.wern@gmail.com, linux-kernel@vger.kernel.org From: Lino Sanfilippo Message-ID: <746956d6-97d4-004d-74dd-92c19699dce7@gmx.de> Date: Tue, 18 Oct 2016 23:36:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1476826003-1202-1-git-send-email-ryan@ryanswan.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:69XPEVGJVyio2F60DL1ETzVlVnJn783f6HHhiVt0wgTi0+zdjES AvAw7lVHkNlFqQaoVCL+ez11UsS+cNC5h2Gom00iks2ppjScf2zCwIwBa1Yc4NX2cHIkh4g z0X+rQd3PHFBw0NtbFTdr3UTtY/9OQQM2wyeE2W+8chjbRHXpcuQSEFO0F11ryhwbgvItAa uW8vBKDMuwLG5tzqg5pHg== X-UI-Out-Filterresults: notjunk:1;V01:K0:nN9ckMqfn7E=:luCcHNmDcGG+Cdfq7h4rlG uNNDHy4mo95uF/Wlq0k3S+KZ2+VlRL79LMyoa7i9nNuop4HBH1usWQCObs6eoJgBRO+CoVW46 ZyXHJkzPdyzwbRElSAzTroR/1RqiCj/masVaIDaBzKC3EtTds2E0mO2xoFdauKrhq00x1CPmr kY5HXfTz3TG452lR3AvVWOrHy9wi2K71lMfUwHFw39zqeqd0Ssvt29fKSnK6m+xbjUiKtg+8h OU36sdCOUcOoQ5L9QTf/gi0l3+3TRTYherck/k/aYdlobRxkfI1StOxKb5cg7Xd7KJM4komzX CD1oLS0pbdWrWes50wMrUe8HpLxZ4g/mXj4ti52I8rC7pjQ/QjzGiqKQHdeU+kfu14dRWOBu7 dWA5Y4ktP3PsBjhfgIJAmglH2HXMoggzRbae8zLk1OPU78bonLzqwtue125Upx2DEo8CwjExL B44h2CSQXCJ1/+041RAozi7S+OxTwfy6iLPpmot9AOLBcH5ILMWmfT5phmh/KQ7oBC2n3GTc3 my+S9WSecHvjiBRcaVU299xqlBNROG2KYsAqm3dN0UKPEfE6ZmiPdR3meHou5J4ddBIQMxj44 fxbHuoDUJ8DbgKPI7GR9LtxJfZ58cIg5mKg7dnhPTF5C8z/8YOFpaM2Ws12ycKUHhyCNpXZ/A Mp8LEwAcH2//YWH/jqa5GwhPmbjEKhgN1T/xvTdIfDLsPhsfu8or9olfvtH/jylx7pwCoG3sZ it3yubEjAW9nSA2Rprd7UoXumPzS/KRZpPTgduopeW8q1vQ1aimicq0mjML1TMaaYpmYJQ5BU mtp0uOl Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 954 Lines: 26 On 18.10.2016 23:26, Ryan Swan wrote: > As per discusion with Lino Sanfilippo, memcpy is the proper way to copy > across dma memory, which also removes sparse warning that triggered > inquiry. > > Signed-off-by: Ryan Swan > --- > drivers/staging/slicoss/slicoss.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c > index 2802b90..9a1dc72 100644 > --- a/drivers/staging/slicoss/slicoss.c > +++ b/drivers/staging/slicoss/slicoss.c > @@ -1057,7 +1057,7 @@ static void slic_upr_request_complete(struct adapter *adapter, u32 isr) > if (stats->rcv_drops > old->rcv_drops) > adapter->rcv_drops += (stats->rcv_drops - > old->rcv_drops); > - memcpy_fromio(old, stats, sizeof(*stats)); > + memcpy(old, stats, sizeof(*stats)); > break; > } > case SLIC_UPR_RLSR: > Reviewed-by: Lino Sanfilippo