2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00
linux-next/sound/soc/qcom/qdsp6
Gustavo A. R. Silva e718a3eb09
ASoC: qdsp6: q6core: Use struct_size() in kmemdup()
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 code of the following form:

sizeof(*fwk) + fwk->num_services * sizeof(fwk->svc_api_info[0]);

with:

struct_size(fwk, svc_api_info, fwk->num_services)

and so on...

Notice that variables bytes and len are unnecessary, hence they are
removed.

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>
2019-05-24 13:01:57 +01:00
..
Makefile ASoC: qdsp6: q6asm: Add q6asm dai driver 2018-05-21 16:43:02 +01:00
q6adm.c ASoC: qcom: qdsp6: remove duplicated include from q6adm.c 2018-09-21 09:22:10 -07:00
q6adm.h ASoC: qdsp6: q6adm: Add q6adm driver 2018-05-21 16:40:24 +01:00
q6afe-dai.c ASoC: qdsp6: q6afe-dai: add support to Display port RX dais 2018-12-14 12:48:55 +00:00
q6afe.c ASoC: qdsp6: qdafe: add support for display_port_rx 2018-12-14 12:48:51 +00:00
q6afe.h ASoC: qdsp6: qdafe: add support to tdm ports 2018-05-29 15:34:23 +01:00
q6asm-dai.c ASoC: qdsp6: q6asm-dai: Fix a small memory leak 2019-01-03 16:32:56 +00:00
q6asm.c ASoC: qdsp6: q6asm: add support to MP3 format 2018-12-14 12:43:54 +00:00
q6asm.h ASoC: qdsp6: q6asm: Add support to audio stream apis 2018-05-21 16:41:24 +01:00
q6core.c ASoC: qdsp6: q6core: Use struct_size() in kmemdup() 2019-05-24 13:01:57 +01:00
q6core.h ASoC: qdsp6: q6core: Add q6core driver 2018-05-17 15:49:38 +09:00
q6dsp-common.c
q6dsp-common.h
q6dsp-errno.h
q6routing.c ASoC: qdsp6: q6routing: add display_port_rx port routing 2018-12-14 12:48:59 +00:00
q6routing.h ASoC: qdsp6: q6routing: Add q6routing driver 2018-05-21 16:41:48 +01:00