From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chee, Tien Fong Date: Mon, 4 Jun 2018 07:14:05 +0000 Subject: [U-Boot] [PATCH 4/5] include: dma: Update the function description for dma_memcpy In-Reply-To: References: <1527754134-164985-1-git-send-email-tien.fong.chee@intel.com> <1527754134-164985-5-git-send-email-tien.fong.chee@intel.com> Message-ID: <1528096445.67623.19.camel@intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de On Fri, 2018-06-01 at 08:25 -0600, Simon Glass wrote: > Hi, > > On 31 May 2018 at 02:08,   wrote: > > > > From: Tien Fong Chee > > > > Update the dma_memcpy description on return argument for DMA330 > > driver. > > > > Signed-off-by: Tien Fong Chee > > --- > >  include/dma.h | 4 ++-- > >  1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/include/dma.h b/include/dma.h > > index 0a0c9dd..b825c1e 100644 > > --- a/include/dma.h > > +++ b/include/dma.h > > @@ -79,8 +79,8 @@ int dma_get_device(u32 transfer_type, struct > > udevice **devp); > >   * @dst - destination pointer > >   * @src - souce pointer > >   * @len - data length to be copied > > - * @return - on successful transfer returns no of bytes > > -            transferred and on failure return error code. > > + * @return - on successful transfer returns no of bytes or > > zero(for DMA330) > > + *          transferred and on failure return error code. > This is a public API so you cannot change it just for one device. You > can change the API for everyone if you like. > > But why would it want to return 0? > Because we only able to check the DMA tranferring status, full transfer or failed. I can return the len argument user set if full tranfer is finished. > > > >   */ > >  int dma_memcpy(struct udevice *dev, void *dst, void *src, size_t > > len); > > > > -- > > 2.2.0 > > > Regards, > Simon