[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpok=wSHMNA_ZvjfXxFQxxe4iLS=Jov+3T0N8i18wbfDA2w@mail.gmail.com>
Date: Fri, 12 Oct 2012 16:18:36 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
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 12 October 2012 16:10, Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> 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;
I was just not looking at this place.
>>>> + }
>>>> + }
>>>> +
>>>> + if (!found) {
>>>> + last_dw = dw;
>>>> + last_bus_id = param;
>>>> + return false;
>>> Because of return here you could eliminate 'found' flag at all.
>> how?
And was looking here only.
> 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;
will be done.
--
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