Home
last modified time | relevance | path

Searched hist:d00cc2f16a41ee704113f9447f2d0a10ad4f0ec7 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/sound/soc/intel/skylake/
H A Dskl-topology.cdiff d00cc2f16a41ee704113f9447f2d0a10ad4f0ec7 Thu May 23 17:23:33 CDT 2019 Gustavo A. R. Silva <gustavo@embeddedor.com> ASoC: Intel: Skylake: Use struct_size() helper

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, replace the following form:

uuid_params->num_modules * sizeof(struct skl_mod_inst_map) + sizeof(uuid_params->num_modules)

with:

struct_size(params, u.map, uuid_params->num_modules)

and so on...

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>