linux/drivers/soc
Jean-Philippe Brucker 0ee1472547 mm/util: Swap kmemdup_array() arguments
GCC 14.1 complains about the argument usage of kmemdup_array():

  drivers/soc/tegra/fuse/fuse-tegra.c:130:65: error: 'kmemdup_array' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
    130 |         fuse->lookups = kmemdup_array(fuse->soc->lookups, sizeof(*fuse->lookups),
        |                                                                 ^
  drivers/soc/tegra/fuse/fuse-tegra.c:130:65: note: earlier argument should specify number of elements, later size of each element

The annotation introduced by commit 7d78a77733 ("string: Add
additional __realloc_size() annotations for "dup" helpers") lets the
compiler think that kmemdup_array() follows the same format as calloc(),
with the number of elements preceding the size of one element. So we
could simply swap the arguments to __realloc_size() to get rid of that
warning, but it seems cleaner to instead have kmemdup_array() follow the
same format as krealloc_array(), memdup_array_user(), calloc() etc.

Fixes: 7d78a77733 ("string: Add additional __realloc_size() annotations for "dup" helpers")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240606144608.97817-2-jean-philippe@linaro.org
Signed-off-by: Kees Cook <kees@kernel.org>
2024-06-06 08:55:20 -07:00
..
amlogic pmdomain: amlogic: Move Kconfig options to the pmdomain subsystem 2023-09-20 10:08:45 +02:00
apple soc: apple: mailbox: error pointers are negative integers 2024-01-30 11:34:49 -08:00
aspeed soc/aspeed: Convert to platform remove callback returning void 2023-10-13 15:04:12 +10:30
atmel soc: microchip: Explicitly include correct DT includes 2023-07-29 16:54:29 +03:00
bcm SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
canaan soc: canaan: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 for K210 2024-04-05 16:42:50 +01:00
dove soc: dove: add missing of_node_put 2023-09-20 11:28:02 +02:00
fsl Including fixes from CAN, netfilter, wireguard and IPsec. 2024-03-21 14:50:39 -07:00
fujitsu soc/fujitsu: a64fx-diag: Convert to platform remove callback returning void 2023-10-14 23:27:01 +02:00
gemini
hisilicon soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC 2024-04-25 02:09:46 +00:00
imx - Move Kconfig files into the pmdomain subsystem 2023-11-01 13:09:46 -10:00
ixp4xx soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void 2023-10-14 23:27:13 +02:00
lantiq
litex soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void 2023-10-14 23:27:17 +02:00
loongson Convert drivers/soc to struct platform_driver::remove_new() 2023-10-16 22:51:31 +02:00
mediatek soc: drivers for 6.10 2024-05-13 08:48:42 -07:00
microchip soc: microchip: Fix POLARFIRE_SOC_SYS_CTRL input prompt 2024-01-22 16:39:40 +00:00
nuvoton soc: nuvoton: Add SoC info driver for WPCM450 2023-02-01 17:11:36 +01:00
pxa spi: pxa2xx: Use proper SSP header in soc/pxa/ssp.c 2024-03-25 00:49:17 +00:00
qcom tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
renesas soc: renesas: Enable TMU support on R-Car Gen2 2024-03-26 09:25:06 +01:00
rockchip SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
samsung soc: samsung: exynos-asv: Update Energy Model after adjusting voltage 2024-04-08 16:05:15 +02:00
sunxi soc: sunxi: sram: export register 0 for THS on H616 2024-03-11 17:14:46 +01:00
tegra mm/util: Swap kmemdup_array() arguments 2024-06-06 08:55:20 -07:00
ti soc: ti: wkup_m3_ipc: Send NULL dummy message instead of pointer message 2024-04-09 11:11:59 -05:00
ux500 ARM: ux500: do not directly dereference __iomem 2022-11-08 21:13:56 +01:00
versatile
xilinx Char/Misc and other Driver changes for 6.8-rc1 2024-01-17 16:47:17 -08:00
Kconfig soc: sifive: shunt ccache driver to drivers/cache 2023-11-22 11:49:25 +00:00
Makefile soc: canaan: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 for K210 2024-04-05 16:42:50 +01:00