From: Andrzej Pietrasiewicz Date: Tue, 3 Dec 2013 14:15:30 +0000 (+0100) Subject: usb: gadget: FunctionFS: Remove VLAIS usage from gadget code X-Git-Tag: v3.14-rc1~148^2~90^2~54 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6f3862fa1ecea6579dd1727869655e88be7a5ef;p=pandora-kernel.git usb: gadget: FunctionFS: Remove VLAIS usage from gadget code The use of variable length arrays in structs (VLAIS) in the Linux Kernel code precludes the use of compilers which don't implement VLAIS (for instance the Clang compiler). This alternate patch calculates offsets into the kmalloc-ed memory buffer using macros. The previous patch required multiple kmalloc and kfree calls. This version uses "group" vs "struct" since it really is not a struct and is essentially a group of VLA in a common allocated block. This version also fixes the issues pointed out by Andrzej Pietrasiewicz and Michal Nazarewicz. Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster [elimination of miexed declaration and code, checkpatch cleanup] [fixes after Michal's review] Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park Acked-by: Michal Nazarewicz Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed