From 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Wed, 2 Sep 2026 15:31:14 -0700 Subject: treewide: refresh kmalloc_obj() conversions This is another run of the Coccinelle script for converting kmalloc() family of allocations to kmalloc_obj() via the existing rules in scripts/coccinelle/api/kmalloc_objs.cocci This catches both the set of kmalloc() uses added since the first kmalloc_obj() conversions in v7.0 and adds a large group missed in the first pass due to Coccinelle not interacting well with the cleanup.h scoped_...() family of macros[1]. I worked around this with spatch's "--macro-file" argument to a file with all the scoped_...() macros mapped to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control flow indicator I could find. Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc, riscv, and s390 with no new warnings. Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1] Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2] Signed-off-by: Kees Cook --- arch/arc/plat-tb10x/Kconfig | 20 ++++++++++++++++++++ arch/arc/plat-tb10x/Makefile | 10 ++++++++++ arch/arc/plat-tb10x/tb10x.c | 20 ++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 arch/arc/plat-tb10x/Kconfig create mode 100644 arch/arc/plat-tb10x/Makefile create mode 100644 arch/arc/plat-tb10x/tb10x.c (limited to 'arch/arc/plat-tb10x') diff --git a/arch/arc/plat-tb10x/Kconfig b/arch/arc/plat-tb10x/Kconfig new file mode 100644 index 000000000..158d53aad --- /dev/null +++ b/arch/arc/plat-tb10x/Kconfig @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0-only +# Abilis Systems TB10x platform kernel configuration file +# +# Author: Christian Ruppert +# + + +menuconfig ARC_PLAT_TB10X + bool "Abilis TB10x" + select PINCTRL + select PINCTRL_TB10X + select PINMUX + select GPIOLIB + select GPIO_TB10X + select TB10X_IRQC + help + Support for platforms based on the TB10x home media gateway SOC by + Abilis Systems. TB10x is based on the ARC700 CPU architecture. + Say Y if you are building a kernel for one of the SOCs in this + series (e.g. TB100 or TB101). If in doubt say N. diff --git a/arch/arc/plat-tb10x/Makefile b/arch/arc/plat-tb10x/Makefile new file mode 100644 index 000000000..8e97d454e --- /dev/null +++ b/arch/arc/plat-tb10x/Makefile @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0-only +# Abilis Systems TB10x platform Makefile +# +# Author: Christian Ruppert +# + + +KBUILD_CFLAGS += -Iarch/arc/plat-tb10x/include + +obj-y += tb10x.o diff --git a/arch/arc/plat-tb10x/tb10x.c b/arch/arc/plat-tb10x/tb10x.c new file mode 100644 index 000000000..11d23420f --- /dev/null +++ b/arch/arc/plat-tb10x/tb10x.c @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Abilis Systems TB10x platform initialisation + * + * Copyright (C) Abilis Systems 2012 + * + * Author: Christian Ruppert + */ + +#include +#include + +static const char *tb10x_compat[] __initdata = { + "abilis,arc-tb10x", + NULL, +}; + +MACHINE_START(TB10x, "tb10x") + .dt_compat = tb10x_compat, +MACHINE_END -- cgit v1.3.1