All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chee, Tien Fong <tien.fong.chee@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/5] include: dma: Update the function description for dma_memcpy
Date: Mon, 11 Jun 2018 05:05:52 +0000	[thread overview]
Message-ID: <1528693550.9950.6.camel@intel.com> (raw)
In-Reply-To: <CAPnjgZ1dRg4dqnd=JRBmyxODTEWjGqq3tXqcXPytqx-_+OJQ5Q@mail.gmail.com>

On Fri, 2018-06-08 at 13:59 -0800, Simon Glass wrote:
> Hi,
> 
> On 3 June 2018 at 23:14, Chee, Tien Fong <tien.fong.chee@intel.com>
> wrote:
> > 
> > On Fri, 2018-06-01 at 08:25 -0600, Simon Glass wrote:
> > > 
> > > Hi,
> > > 
> > > On 31 May 2018 at 02:08,  <tien.fong.chee@intel.com> wrote:
> > > > 
> > > > 
> > > > From: Tien Fong Chee <tien.fong.chee@intel.com>
> > > > 
> > > > Update the dma_memcpy description on return argument for DMA330
> > > > driver.
> > > > 
> > > > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> > > > ---
> > > >  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.
> OK. My concern is that you have a comment saying that the function
> does something different for one device versus others. This is not
> the
> place for such a comment. Here you can just document that it can
> return two possible meanings. You should add comments explaining what
> 0 means too (e.g. completed, but length unknown?).
> 
> For something in progress, you should use -EINPROGRESS / -EAGAIN
> 
Okay.
> Regards,
> Simon

  reply	other threads:[~2018-06-11  5:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31  8:08 [U-Boot] [PATCH 0/5] Add DMA driver for DMA330 controller tien.fong.chee at intel.com
2018-05-31  8:08 ` [U-Boot] [PATCH 1/5] drivers: dma: Enable DMA-330 driver support tien.fong.chee at intel.com
2018-06-01 14:24   ` Simon Glass
2018-06-06  5:22     ` Chee, Tien Fong
2018-05-31  8:08 ` [U-Boot] [PATCH 2/5] drivers: dma: Add function to zeroes a range of destination such as memory tien.fong.chee at intel.com
2018-06-01 14:24   ` Simon Glass
2018-06-04  7:34     ` Chee, Tien Fong
2018-05-31  8:08 ` [U-Boot] [PATCH 3/5] drivers: dma: Factor out dma_get_device from DMA class function tien.fong.chee at intel.com
2018-06-01 14:25   ` Simon Glass
2018-05-31  8:08 ` [U-Boot] [PATCH 4/5] include: dma: Update the function description for dma_memcpy tien.fong.chee at intel.com
2018-06-01 14:25   ` Simon Glass
2018-06-04  7:14     ` Chee, Tien Fong
2018-06-08 21:59       ` Simon Glass
2018-06-11  5:05         ` Chee, Tien Fong [this message]
2018-05-31  8:08 ` [U-Boot] [PATCH 5/5] arm: dts: socfpga: stratix10: update pdma tien.fong.chee at intel.com
2018-06-01 14:25   ` Simon Glass
2018-06-04  7:01     ` Chee, Tien Fong
2018-07-09 18:03   ` Dinh Nguyen
2018-07-09 20:28     ` Marek Vasut
2018-07-10 13:11       ` Chee, Tien Fong
2018-07-10 13:37         ` Dinh Nguyen
2018-07-11  2:55           ` Chee, Tien Fong
2018-07-10 16:13         ` Marek Vasut
2018-05-31  9:24 ` [U-Boot] [PATCH 0/5] Add DMA driver for DMA330 controller Marek Vasut
2018-05-31  9:50   ` See, Chin Liang
2018-05-31  9:58     ` Marek Vasut
2018-06-04  6:47       ` Chee, Tien Fong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1528693550.9950.6.camel@intel.com \
    --to=tien.fong.chee@intel.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.