[alsa-devel] [PATCH] cleanup controllers in snd-usb-caiaq

Daniel Mack daniel at caiaq.org
Wed Nov 26 21:31:59 CET 2008


On 26.11.2008, at 21:28, Takashi Iwai wrote:

>> Ok, agreed and done. However, I considered it a good idea as it  
>> avoided
>> writing the array's name more than once.
>
> In that case, you can use a macro, such as,
>
> #define ADD_CTRLS(c, list) add_controls(c, ARRAY_SIZE(list), (list))
>
> But, don't make a too complex block as a macro.  A function often
> gives a better code (in this case it'll get smaller) in addition to a
> better readability than a big macro.

Ok. Do you want me to do this or are you fine with the code as-is?

Daniel



More information about the Alsa-devel mailing list