ASoC: rsnd: tidyup original for_each_rsnd_xxx macro
Current for_each_rsnd_xxx macro will read out-of-array's memory after last loop operation. It was not good C language operation, and the binary which was compiled by (at least) gcc 4.8.1 is broken This patch tidyup these issues Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:

committed by
Mark Brown

parent
8691d0748e
commit
00463c113b
@@ -25,9 +25,10 @@ struct rsnd_adg {
|
||||
};
|
||||
|
||||
#define for_each_rsnd_clk(pos, adg, i) \
|
||||
for (i = 0, (pos) = adg->clk[i]; \
|
||||
i < CLKMAX; \
|
||||
i++, (pos) = adg->clk[i])
|
||||
for (i = 0; \
|
||||
(i < CLKMAX) && \
|
||||
((pos) = adg->clk[i]); \
|
||||
i++)
|
||||
#define rsnd_priv_to_adg(priv) ((struct rsnd_adg *)(priv)->adg)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user