OSDN Git Service

treewide: Replace more open-coded allocation size multiplications
authorKees Cook <keescook@chromium.org>
Fri, 5 Oct 2018 23:21:46 +0000 (16:21 -0700)
committerKees Cook <keescook@chromium.org>
Sat, 6 Oct 2018 01:06:30 +0000 (18:06 -0700)
commit329e09893909d409039f6a79757d9b80b67efe39
treed83759b28dcc8760167ed7c082d5846f63a55d2d
parent57361846b52bc686112da6ca5368d11210796804
treewide: Replace more open-coded allocation size multiplications

As done treewide earlier, this catches several more open-coded
allocation size calculations that were added to the kernel during the
merge window. This performs the following mechanical transformations
using Coccinelle:

kvmalloc(a * b, ...) -> kvmalloc_array(a, b, ...)
kvzalloc(a * b, ...) -> kvcalloc(a, b, ...)
devm_kzalloc(..., a * b, ...) -> devm_kcalloc(..., a, b, ...)

Signed-off-by: Kees Cook <keescook@chromium.org>
drivers/bluetooth/hci_qca.c
drivers/crypto/inside-secure/safexcel.c
drivers/gpu/drm/mediatek/mtk_drm_crtc.c
drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c
drivers/hwmon/npcm750-pwm-fan.c
drivers/md/dm-integrity.c
drivers/net/wireless/mediatek/mt76/usb.c
drivers/pci/controller/pcie-cadence.c
drivers/tty/serial/qcom_geni_serial.c
net/sched/sch_cake.c