Re: [alsa-devel] [PATCH] ASoC: pcm512x: Add PCM512x driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 02/06/2014 02:12 PM, Takashi Iwai wrote:
At Thu, 6 Feb 2014 13:07:35 +0000,
Mark Brown wrote:
[...]
Hrm, it is but this points out an error in the control helpers which has
been there since forever - they call that parameter max but it's not a
maximum, it's the number of elements in the enumeration.  I bet we have
a bunch of other enumerations which miss the last element as a result.

Yeah, the argument name is really confusing.  I had to double-check
the code when I reviewed your patch, too :)

Also it'd be better to have a practice to use either ARRAY_SIZE() or a
constant there, too.

There is also SOC_ENUM_SINGLE_DECL(...) which takes care of the common case where you want as many items as your array contains.

- Lars

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux