lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Oct 2012 08:59:17 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:	vinod.koul@...el.com, linux-kernel@...r.kernel.org,
	spear-devel@...t.st.com, linux-arm-kernel@...ts.infradead.org,
	devicetree-discuss@...ts.ozlabs.org
Subject: Re: [PATCH V2 2/3] dmaengine: dw_dmac: Enhance device tree support

On 12 October 2012 20:28, Andy Shevchenko
<andriy.shevchenko@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ