mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org,
	Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Subject: Re: [PATCH 4/5] sh: stylistic improvements for the DMA driver
Date: Tue, 8 Dec 2009 09:20:44 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0912080916300.4948@axis700.grange> (raw)
In-Reply-To: <e9c3a7c20912071654y19313fd5j6d9ff5a62cde028e@mail.gmail.com>

On Mon, 7 Dec 2009, Dan Williams wrote:

> On Fri, Dec 4, 2009 at 11:45 AM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >  drivers/dma/shdma.c |   34 +++++++++++++++++-----------------
> >  drivers/dma/shdma.h |   14 +++++++-------
> >  2 files changed, 24 insertions(+), 24 deletions(-)
> >
> [..]
> > -static int dmae_is_idle(struct sh_dmae_chan *sh_chan)
> > +static int dmae_is_busy(struct sh_dmae_chan *sh_chan)
> 
> This one isn't purely style, I agree with it, but think it would be a
> bit cleaner to return a bool rather than an error code.

Yes, I also thought about it, but I wasn't sure whether the author had 
some special considerations, why he has chosen to return an error code. 
Besides, that return code is also used in functions dmae_set_chcr() and 
dmae_set_dmars() as their return value. So, you'd have to change those two 
to something like

	if (dmae_is_busy(sh_chan))
		return -EBUSY;

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

  reply	other threads:[~2009-12-08  8:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 18:44 [PATCH 0/5] sh: fix the shdma driver, improve dmatest, support sh7724 Guennadi Liakhovetski
2009-12-04 18:44 ` [PATCH 1/5] sh: DMA driver has to specify its alignment requirements Guennadi Liakhovetski
2009-12-04 18:44 ` [PATCH 2/5] dmaengine: fix dmatest to verify minimum transfer length and test buffer size Guennadi Liakhovetski
2009-12-04 18:44 ` [PATCH 3/5] sh: fix DMA driver's descriptor chaining and cookie assignment Guennadi Liakhovetski
2009-12-08  0:58   ` Dan Williams
2009-12-12  2:11     ` Nobuhiro Iwamatsu
2009-12-04 18:45 ` [PATCH 4/5] sh: stylistic improvements for the DMA driver Guennadi Liakhovetski
2009-12-08  0:54   ` Dan Williams
2009-12-08  8:20     ` Guennadi Liakhovetski [this message]
2009-12-04 18:45 ` [PATCH 5/5] sh: dmaengine support for sh7724 Guennadi Liakhovetski
2009-12-08  1:02   ` Dan Williams
2009-12-08  7:13     ` Paul Mundt
2009-12-17  3:14       ` Nobuhiro Iwamatsu
2009-12-17  5:15         ` Paul Mundt
2009-12-17  7:42         ` Guennadi Liakhovetski
2009-12-17  7:47           ` Paul Mundt
2009-12-17  8:02             ` Guennadi Liakhovetski
2009-12-17  8:09               ` Paul Mundt
2009-12-08  1:09 ` [PATCH 0/5] sh: fix the shdma driver, improve dmatest, support sh7724 Dan Williams

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=Pine.LNX.4.64.0912080916300.4948@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=dan.j.williams@intel.com \
    --cc=iwamatsu.nobuhiro@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®