Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

From: Viresh Kumar
Date: Fri Oct 12 2012 - 06:48:28 EST


On 12 October 2012 16:10, Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
> On Fri, Oct 12, 2012 at 1:36 PM, viresh kumar <viresh.kumar@xxxxxxxxxx> wrote:
>> On Fri, Oct 12, 2012 at 1:53 PM, Andy Shevchenko
>> <andriy.shevchenko@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/