From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Joe Perches <joe@perches.com>
Cc: devicetree <devicetree@vger.kernel.org>,
alsa-devel@alsa-project.org,
Stephen Warren <swarren@wwwdotorg.org>,
Vinod Koul <vinod.koul@intel.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
Florian Meier <florian.meier@koalo.de>,
linux-rpi-kernel <linux-rpi-kernel@lists.infradead.org>,
dmaengine <dmaengine@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv5] dmaengine: Add support for BCM2835
Date: Fri, 15 Nov 2013 17:43:37 +0000 [thread overview]
Message-ID: <20131115174337.GP16735@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1384535016.18739.23.camel@joe-AO722>
On Fri, Nov 15, 2013 at 09:03:36AM -0800, Joe Perches wrote:
> On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote:
> > +static size_t bcm2835_dma_desc_size_pos(struct bcm2835_desc *d, dma_addr_t addr)
> > +{
> > + unsigned i;
> > + size_t size;
>
> Please set size to 0 here and not in the for loop
> > +
> > + for (size = i = 0; i < d->frames; i++) {
I disagree with that comment; I think the above is not only cleaner, but
also more obvious that _this_ loop is calculating _this_ size.
WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv5] dmaengine: Add support for BCM2835
Date: Fri, 15 Nov 2013 17:43:37 +0000 [thread overview]
Message-ID: <20131115174337.GP16735@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1384535016.18739.23.camel@joe-AO722>
On Fri, Nov 15, 2013 at 09:03:36AM -0800, Joe Perches wrote:
> On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote:
> > +static size_t bcm2835_dma_desc_size_pos(struct bcm2835_desc *d, dma_addr_t addr)
> > +{
> > + unsigned i;
> > + size_t size;
>
> Please set size to 0 here and not in the for loop
> > +
> > + for (size = i = 0; i < d->frames; i++) {
I disagree with that comment; I think the above is not only cleaner, but
also more obvious that _this_ loop is calculating _this_ size.
WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Joe Perches <joe@perches.com>
Cc: Florian Meier <florian.meier@koalo.de>,
Stephen Warren <swarren@wwwdotorg.org>,
Vinod Koul <vinod.koul@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
devicetree <devicetree@vger.kernel.org>,
alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
linux-rpi-kernel <linux-rpi-kernel@lists.infradead.org>,
dmaengine <dmaengine@vger.kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv5] dmaengine: Add support for BCM2835
Date: Fri, 15 Nov 2013 17:43:37 +0000 [thread overview]
Message-ID: <20131115174337.GP16735@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1384535016.18739.23.camel@joe-AO722>
On Fri, Nov 15, 2013 at 09:03:36AM -0800, Joe Perches wrote:
> On Fri, 2013-11-15 at 17:28 +0100, Florian Meier wrote:
> > +static size_t bcm2835_dma_desc_size_pos(struct bcm2835_desc *d, dma_addr_t addr)
> > +{
> > + unsigned i;
> > + size_t size;
>
> Please set size to 0 here and not in the for loop
> > +
> > + for (size = i = 0; i < d->frames; i++) {
I disagree with that comment; I think the above is not only cleaner, but
also more obvious that _this_ loop is calculating _this_ size.
next prev parent reply other threads:[~2013-11-15 17:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 16:28 [PATCHv5] dmaengine: Add support for BCM2835 Florian Meier
2013-11-15 16:28 ` Florian Meier
2013-11-15 16:28 ` Florian Meier
[not found] ` <52864BBC.7000506-oZ8rN/sblLk@public.gmane.org>
2013-11-15 17:03 ` Joe Perches
2013-11-15 17:03 ` Joe Perches
2013-11-15 17:03 ` Joe Perches
2013-11-15 17:43 ` Russell King - ARM Linux [this message]
2013-11-15 17:43 ` Russell King - ARM Linux
2013-11-15 17:43 ` Russell King - ARM Linux
2013-11-15 18:20 ` Joe Perches
2013-11-15 18:20 ` Joe Perches
2013-11-15 18:20 ` Joe Perches
2013-11-15 17:43 ` Shevchenko, Andriy
2013-11-15 17:43 ` Shevchenko, Andriy
2013-11-15 17:51 ` Russell King - ARM Linux
2013-11-15 17:51 ` Russell King - ARM Linux
[not found] ` <CAHp75Vf3CJNgSiSjoZ6dYjRRHWN4bTpMxRTLG37+wwtEsQbq4g@mail.gmail.com>
2013-11-16 9:39 ` Andy Shevchenko
2013-11-16 9:39 ` Andy Shevchenko
2013-11-16 11:27 ` Mark Brown
2013-11-16 11:27 ` Mark Brown
2013-11-16 11:41 ` Russell King - ARM Linux
2013-11-16 11:41 ` Russell King - ARM Linux
2013-11-16 12:22 ` Mark Brown
2013-11-16 12:22 ` Mark Brown
2013-12-24 14:31 ` Gene Anderson
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=20131115174337.GP16735@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=florian.meier@koalo.de \
--cc=joe@perches.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=swarren@wwwdotorg.org \
--cc=vinod.koul@intel.com \
/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.