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

From: viresh kumar
Date: Fri Oct 12 2012 - 06:36:49 EST


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;
>> + }
>> + }
>> +
>> + if (!found) {
>> + last_dw = dw;
>> + last_bus_id = param;
>> + return false;
> Because of return here you could eliminate 'found' flag at all.

how?

Fixed the other issue as:

Author: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
Date: Fri Oct 12 16:06:32 2012 +0530

fixup! dmaengine: dw_dmac: Enhance device tree support
---
drivers/dma/dw_dmac.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 9a7d084..a4ff04c 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1598,9 +1598,10 @@ __devinit dw_dma_parse_dt(struct platform_device *pdev)
return pdata;
}
#else
-static inline int dw_dma_parse_dt(struct platform_device *pdev)
+static inline struct dw_dma_platform_data *
+dw_dma_parse_dt(struct platform_device *pdev)
{
- return -ENOSYS;
+ return NULL;
}
#endif

--
viresh
--
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/