Convert 'alloc_obj' family to use the new default GFP_KERNEL argumentThis was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs
Convert 'alloc_obj' family to use the new default GFP_KERNEL argumentThis was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'to convert the new alloc_obj() users that had a simple GFP_KERNELargument to just drop that argument.Note that due to the extreme simplicity of the scripting, any slightlymore complex cases spread over multiple lines would not be triggered:they definitely exist, but this covers the vast bulk of the cases, andthe resulting diff is also then easier to check automatically.For the same reason the 'flex' versions will be done as a separateconversion.Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
treewide: Replace kmalloc with kmalloc_obj for non-scalar typesThis is the result of running the Coccinelle script fromscripts/coccinelle/api/kmalloc_objs.cocci. The script is designed toavoid sc
treewide: Replace kmalloc with kmalloc_obj for non-scalar typesThis is the result of running the Coccinelle script fromscripts/coccinelle/api/kmalloc_objs.cocci. The script is designed toavoid scalar types (which need careful case-by-case checking), andinstead replace kmalloc-family calls that allocate struct or unionobject instances:Single allocations: kmalloc(sizeof(TYPE), ...)are replaced with: kmalloc_obj(TYPE, ...)Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)are replaced with: kmalloc_objs(TYPE, COUNT, ...)Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)(where TYPE may also be *VAR)The resulting allocations no longer return "void *", instead returning"TYPE *".Signed-off-by: Kees Cook <kees@kernel.org>
soc: nuvoton: Add SoC info driver for WPCM450Add a SoC information driver for Nuvoton WPCM450 SoCs. It providesinformation such as the SoC revision.Usage example: # grep . /sys/devices/soc0/*
soc: nuvoton: Add SoC info driver for WPCM450Add a SoC information driver for Nuvoton WPCM450 SoCs. It providesinformation such as the SoC revision.Usage example: # grep . /sys/devices/soc0/* /sys/devices/soc0/family:Nuvoton NPCM /sys/devices/soc0/revision:A3 /sys/devices/soc0/soc_id:WPCM450Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>Reviewed-by: Joel Stanley <joel@jms.id.au>Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>Link: https://lore.kernel.org/r/20221031223926.241641-1-j.neuschaefer@gmx.netSigned-off-by: Joel Stanley <joel@jms.id.au>Link: https://lore.kernel.org/r/20230201051717.1005938-1-joel@jms.id.auSigned-off-by: Arnd Bergmann <arnd@arndb.de>