Convert more 'alloc_obj' cases to default GFP_KERNEL argumentsThis converts some of the visually simpler cases that have been splitover multiple lines. I only did the ones that are easy to verify
Convert more 'alloc_obj' cases to default GFP_KERNEL argumentsThis converts some of the visually simpler cases that have been splitover multiple lines. I only did the ones that are easy to verify theresulting diff by having just that final GFP_KERNEL argument on the nextline.Somebody should probably do a proper coccinelle script for this, but forme the trivial script actually resulted in an assertion failure in themiddle of the script. I probably had made it a bit _too_ trivial.So after fighting that far a while I decided to just do some of thesyntactically simpler cases with variations of the previous 'sed'scripts.The more syntactically complex multi-line cases would mostly really wantwhitespace cleanup anyway.Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
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>
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>
gpib: Fix error code in ibonline()This accidentally returns 1 on error, but it should return negativeerror codes.Fixes: 9dde4559e939 ("staging: gpib: Add GPIB common core driver")Signed-off-by:
gpib: Fix error code in ibonline()This accidentally returns 1 on error, but it should return negativeerror codes.Fixes: 9dde4559e939 ("staging: gpib: Add GPIB common core driver")Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>Link: https://patch.msgid.link/aSlMnaT1M104NJb2@stanley.mountainSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: gpib: Destage gpibMove the gpib drivers out of staging and into the "real" part of thekernel. This entails: - Remove the gpib Kconfig menu and Makefile build rule from staging. - Remo
staging: gpib: Destage gpibMove the gpib drivers out of staging and into the "real" part of thekernel. This entails: - Remove the gpib Kconfig menu and Makefile build rule from staging. - Remove gpib/uapi from the header file search path in subdir-ccflags of the gpib Makefile - move the gpib/uapi files to include/uapi/linux - Move the gpib tree out of staging to drivers. - Remove the word "Linux" from the gpib Kconfig file. - Add the gpib Kconfig menu and Makefile build rule to driversSigned-off-by: Dave Penkler <dpenkler@gmail.com>Link: https://patch.msgid.link/20251117144021.23569-5-dpenkler@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>