1
0
Fork 0
alistair23-linux/sound/soc
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
..
adi ASoC: axi-i2s: let both capture and playback be optional 2019-03-11 17:17:38 +00:00
amd ASoC: amd: Reporting accurate hw_ptr for acp3x dma 2019-05-13 12:41:42 +01:00
atmel ASoC: atmel: tse850: Make some functions static 2019-05-02 10:46:05 +09:00
au1x
bcm
cirrus ARM: ep93xx: move pinctrl interfaces into include/linux/soc 2019-04-28 23:08:40 -07:00
codecs ASoC: Add support for Conexant CX2072X CODEC 2019-05-22 13:18:51 +01:00
dwc ASoC: dwc: Drop superfluous PCM preallocation error checks 2019-02-06 18:28:59 +01:00
fsl ASoC: fsl_asrc: Unify the supported input and output rate 2019-05-21 22:02:39 +01:00
generic Merge branch 'for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.3 2019-05-21 22:00:33 +01:00
hisilicon
img
intel ASoC: Intel: Skylake: Use struct_size() helper 2019-05-24 13:01:38 +01:00
jz4740 ASoC: jz4740: Depend on MIPS instead of MACH_JZ4740 2019-03-20 17:05:40 +00:00
kirkwood
mediatek ASoC: mediatek: mt8183: move card registration to the end of probe 2019-05-23 14:34:43 +01:00
meson ASoC: meson: add g12a tohdmitx control 2019-05-16 12:13:35 +01:00
mxs clk: Remove io.h from clk-provider.h 2019-05-15 13:21:37 -07:00
nuc900
pxa ASoC: eliminate left-over from Raumfeld machine driver removal 2019-01-07 16:58:19 +00:00
qcom ASoC: qdsp6: q6core: Use struct_size() in kmemdup() 2019-05-24 13:01:57 +01:00
rockchip ASoC: rockchip: Fix an uninitialized variable compile warning 2019-05-07 11:24:19 +09:00
samsung ASoC: samsung: tobermory: Convert to SPDX License Identifier 2019-04-19 16:59:55 +01:00
sh ASoC: rsnd: move pcm_new from snd_soc_component_driver to snd_soc_dai_driver 2019-05-20 15:21:28 +01:00
sirf
sof Merge branch 'for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.3 2019-05-21 22:00:33 +01:00
spear
sprd ASoC: sprd: Add reserved DMA memory support 2019-05-06 22:48:03 +09:00
sti
stm Linux 5.2-rc1 2019-05-20 11:53:50 +01:00
sunxi ASoC: sunxi: sun50i-codec-analog: Rename hpvcc regulator supply to cpvdd 2019-02-19 15:36:02 +00:00
tegra
ti ASoC: ti: fix davinci_mcasp_probe dependencies 2019-03-11 16:34:05 +00:00
txx9 drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
uniphier ASoC: uniphier: Drop superfluous PCM preallocation error checks 2019-02-06 18:29:39 +01:00
ux500
xilinx ASoC: xlnx: fix up for snd_pcm_lib_preallocate_pages_for_all() API change 2019-02-08 14:23:54 +01:00
xtensa ASoC: xtensa: Drop superfluous PCM preallocation error checks 2019-02-06 18:29:44 +01:00
zte
Kconfig ASoC: SOF: Add Build support for SOF core and Intel drivers 2019-04-28 02:51:46 +09:00
Makefile ASoC: SOF: Add Build support for SOF core and Intel drivers 2019-04-28 02:51:46 +09:00
soc-ac97.c
soc-acpi.c ASoC: soc-acpi: fix implicit header use of module.h/export.h 2019-05-08 18:06:28 +09:00
soc-compress.c ASoC: compress: Add helper functions for component trigger/set_params 2019-02-06 15:51:04 +00:00
soc-core.c ASoC: soc-core: WARN() is not related to component->driver->probe 2019-05-20 15:21:42 +01:00
soc-dapm.c ASoC: dapm: Use struct_size() in krealloc() 2019-05-24 13:01:18 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: More changes for v5.1 2019-02-28 13:30:55 +01:00
soc-io.c
soc-jack.c
soc-ops.c
soc-pcm.c Merge branch 'for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.3 2019-05-21 22:00:33 +01:00
soc-topology.c Merge branch 'asoc-5.1' into asoc-5.2 2019-04-26 11:02:03 +01:00
soc-utils.c