All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: vinod.koul@intel.com, linux-kernel@vger.kernel.org,
	spear-devel@list.st.com, linux-arm-kernel@lists.infradead.org,
	devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH V2 2/3] dmaengine: dw_dmac: Enhance device tree support
Date: Mon, 15 Oct 2012 08:59:17 +0530	[thread overview]
Message-ID: <CAKohpo=20mwje+9AVgs7b-_DshyRO2DZ=Nacjm7vFAhed=Wkqg@mail.gmail.com> (raw)
In-Reply-To: <1350053897.10584.172.camel@smile>

On 12 October 2012 20:28, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>> +     if (last_dw) {
>> +             if ((last_bus_id == param) && (last_dw == dw))
>> +                     return false;
>> +     }
> Just came to my mind.
> dw can't be NULL, can't it?
> Then
> if (last_dw) {
> ...
> }
> is unneeded.

Fixup for this:

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index d72c26f..764c159 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1196,11 +1196,8 @@ bool dw_dma_generic_filter(struct dma_chan
*chan, void *param)
         * failure. If dw and param are same, i.e. trying on same dw with
         * different channel, return false.
         */
-       if (last_dw) {
-               if ((last_bus_id == param) && (last_dw == dw))
-                       return false;
-       }
-
+       if ((last_dw == dw) && (last_bus_id == param))
+               return false;
        /*
         * Return true:
         * - If dw_dma's platform data is not filled with slave info, then all

WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 2/3] dmaengine: dw_dmac: Enhance device tree support
Date: Mon, 15 Oct 2012 08:59:17 +0530	[thread overview]
Message-ID: <CAKohpo=20mwje+9AVgs7b-_DshyRO2DZ=Nacjm7vFAhed=Wkqg@mail.gmail.com> (raw)
In-Reply-To: <1350053897.10584.172.camel@smile>

On 12 October 2012 20:28, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>> +     if (last_dw) {
>> +             if ((last_bus_id == param) && (last_dw == dw))
>> +                     return false;
>> +     }
> Just came to my mind.
> dw can't be NULL, can't it?
> Then
> if (last_dw) {
> ...
> }
> is unneeded.

Fixup for this:

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index d72c26f..764c159 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1196,11 +1196,8 @@ bool dw_dma_generic_filter(struct dma_chan
*chan, void *param)
         * failure. If dw and param are same, i.e. trying on same dw with
         * different channel, return false.
         */
-       if (last_dw) {
-               if ((last_bus_id == param) && (last_dw == dw))
-                       return false;
-       }
-
+       if ((last_dw == dw) && (last_bus_id == param))
+               return false;
        /*
         * Return true:
         * - If dw_dma's platform data is not filled with slave info, then all

  parent reply	other threads:[~2012-10-15  3:29 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12 14:31 [PATCH V2 1/3] dmaengine: dw_dmac: Update documentation style comments for dw_dma_platform_data Viresh Kumar
2012-10-12 14:31 ` Viresh Kumar
2012-10-12 14:31 ` [PATCH V2 2/3] dmaengine: dw_dmac: Enhance device tree support Viresh Kumar
2012-10-12 14:31   ` Viresh Kumar
2012-10-12 14:50   ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-12 14:50     ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-12 14:55     ` Viresh Kumar
2012-10-12 14:55       ` Viresh Kumar
2012-10-12 16:20       ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-12 16:20         ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-12 17:14         ` Viresh Kumar
2012-10-12 17:14           ` Viresh Kumar
2012-10-12 14:58   ` Andy Shevchenko
2012-10-12 14:58     ` Andy Shevchenko
2012-10-12 15:18     ` Viresh Kumar
2012-10-12 15:18       ` Viresh Kumar
2012-10-12 15:53       ` Andy Shevchenko
2012-10-12 15:53         ` Andy Shevchenko
2012-10-12 15:55         ` Viresh Kumar
2012-10-12 15:55           ` Viresh Kumar
2012-10-15  3:29     ` Viresh Kumar [this message]
2012-10-15  3:29       ` Viresh Kumar
2012-10-15  7:35       ` Andy Shevchenko
2012-10-15  7:35         ` Andy Shevchenko
2012-10-12 14:31 ` [PATCH V2 3/3] ARM: SPEAr13xx: Pass DW DMAC platform data from DT Viresh Kumar
2012-10-12 14:31   ` Viresh Kumar
2012-10-12 14:48   ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-12 14:48     ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-12 14:48     ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-12 14:52     ` Viresh Kumar
2012-10-12 14:52       ` Viresh Kumar
2012-10-12 16:21       ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-12 16:21         ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-12 17:12         ` Viresh Kumar
2012-10-12 17:12           ` Viresh Kumar
2012-10-13  6:44           ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-13  6:44             ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-13  8:48             ` Viresh Kumar
2012-10-13  8:48               ` Viresh Kumar
2012-10-13 12:22               ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-13 12:22                 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-13 12:22                 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-13 14:08                 ` Viresh Kumar
2012-10-13 14:08                   ` Viresh Kumar
2012-10-13 14:10                   ` Viresh Kumar
2012-10-13 14:10                     ` Viresh Kumar
2012-10-14 10:01                     ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 10:01                       ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 10:01                       ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-15  3:21                       ` Viresh Kumar
2012-10-15  3:21                         ` Viresh Kumar

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='CAKohpo=20mwje+9AVgs7b-_DshyRO2DZ=Nacjm7vFAhed=Wkqg@mail.gmail.com' \
    --to=viresh.kumar@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spear-devel@list.st.com \
    --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.