From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754780AbcESLtt (ORCPT ); Thu, 19 May 2016 07:49:49 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:34840 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751942AbcESLtr (ORCPT ); Thu, 19 May 2016 07:49:47 -0400 Date: Thu, 19 May 2016 17:19:21 +0530 From: Muhammad Falak R Wani To: Christian =?iso-8859-1?Q?K=F6nig?= Cc: David Airlie , Alex Deucher , Chunming Zhou , Jammy Zhou , Leo Liu , Sonny Jiang , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] amdgpu/uvd: use kmemdup Message-ID: <20160519114921.GA14314@kp> References: <1463656317-13828-1-git-send-email-falakreyaz@gmail.com> <573DA0F2.2020503@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <573DA0F2.2020503@amd.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 19, 2016 at 01:18:10PM +0200, Christian König wrote: > Am 19.05.2016 um 13:11 schrieb Muhammad Falak R Wani: > >Use kmemdup when some other buffer is immediately copied into allocated > >region. It replaces call to allocation followed by memcpy, by a single > >call to kmemdup. > > > >Signed-off-by: Muhammad Falak R Wani > > NAK, actually using memcpy() is wrong in the first place. > > The UVD BO is in VRAM so the pointer is pointing to IO memory here, > so this should be memcpy_fromio() instead of memcpy(). > > Christian. > Should I send V2 with the required changes, and I had a query, If memcpy was wrong, did it still work or it just got un-noticed ?