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]
Message-ID: <CAHp75VffAwZjfQLf=wS+nBhiRoMFOoyPeUCfrzF1G=+Kh7HHTA@mail.gmail.com>
Date:	Fri, 12 Oct 2012 13:40:30 +0300
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	viresh kumar <viresh.kumar@...aro.org>
Cc:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	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 2/3] dmaengine: dw_dmac: Enhance device tree support

On Fri, Oct 12, 2012 at 1:36 PM, viresh kumar <viresh.kumar@...aro.org> wrote:
> On Fri, Oct 12, 2012 at 1:53 PM, Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
>> On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote:
>
>>> +     while (++i < dw->sd_count) {
>>> +             if (!strcmp(dw->sd[i].bus_id, param)) {
>>> +                     found = 1;
>>> +                     break;
>>> +             }
>>> +     }
>>> +
>>> +     if (!found) {
>>> +             last_dw = dw;
>>> +             last_bus_id = param;
>>> +             return false;
>> Because of return here you could eliminate 'found' flag at all.
> how?

while (++i < dw->sd_count) {
               if (!strcmp(dw->sd[i].bus_id, param)) {
       chan->private = &dw->sd[i];
       last_dw = NULL;
       last_bus_id = NULL;

       return true;
               }
       }

               last_dw = dw;
               last_bus_id = param;
               return false;

-- 
With Best Regards,
Andy Shevchenko
--
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