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>
pldmfw: Don't require send_package_data or send_component_table to be definedNot all drivers require send_package_data or send_component_table whenupdating firmware. Instead of forcing drivers to
pldmfw: Don't require send_package_data or send_component_table to be definedNot all drivers require send_package_data or send_component_table whenupdating firmware. Instead of forcing drivers to implement a stub allowthese functions to go undefined.Signed-off-by: Lee Trager <lee@trager.us>Signed-off-by: Jakub Kicinski <kuba@kernel.org>Reviewed-by: Simon Horman <horms@kernel.org>Acked-by: Jacob Keller <jacob.e.keller@intel.com>Link: https://patch.msgid.link/20250512190109.2475614-2-lee@trager.usSigned-off-by: Paolo Abeni <pabeni@redhat.com>
pldmfw: enable selected component updateThis patch enables to update a selected component from PLDM imagecontaining multiple components.Example usage:struct pldmfw;data.mode = PLDMFW_UPDATE_M
pldmfw: enable selected component updateThis patch enables to update a selected component from PLDM imagecontaining multiple components.Example usage:struct pldmfw;data.mode = PLDMFW_UPDATE_MODE_SINGLE_COMPONENT;data.compontent_identifier = DRIVER_FW_MGMT_COMPONENT_ID;Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>Signed-off-by: Konrad Knitter <konrad.knitter@intel.com>Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
move asm/unaligned.h to linux/unaligned.hasm/unaligned.h is always an include of asm-generic/unaligned.h;might as well move that thing to linux/unaligned.h and includethat - there's nothing arch-
move asm/unaligned.h to linux/unaligned.hasm/unaligned.h is always an include of asm-generic/unaligned.h;might as well move that thing to linux/unaligned.h and includethat - there's nothing arch-specific in that header.auto-generated by the following:for i in `git grep -l -w asm/unaligned.h`; do sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $idonefor i in `git grep -l -w asm-generic/unaligned.h`; do sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $idonegit mv include/asm-generic/unaligned.h include/linux/unaligned.hgit mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.hsed -i -e "/unaligned.h/d" include/asm-generic/Kbuildsed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
lib: remove MODULE_LICENSE in non-modulesSince commit 8b41fc4454e ("kbuild: create modules.builtin withoutMakefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarationsare used to identify m
lib: remove MODULE_LICENSE in non-modulesSince commit 8b41fc4454e ("kbuild: create modules.builtin withoutMakefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarationsare used to identify modules. As a consequence, uses of the macroin non-modules will cause modprobe to misidentify their containingobject file as a module when it is not (false positives), and modprobemight succeed rather than failing with a suitable error message.So remove it in the files in this commit, none of which can be built asmodules.Signed-off-by: Nick Alcock <nick.alcock@oracle.com>Suggested-by: Luis Chamberlain <mcgrof@kernel.org>Acked-by: Jacob Keller <jacob.e.keller@intel.com>Cc: Luis Chamberlain <mcgrof@kernel.org>Cc: linux-modules@vger.kernel.orgCc: linux-kernel@vger.kernel.orgCc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>Cc: Jacob Keller <jacob.e.keller@intel.com>Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
lib: fix spelling mistakesFix some spelling mistakes in comments:permanentely ==> permanentlywont ==> won'tremaning ==> remainingsucced ==> succeedshouldnt ==> shouldn'talpha-numeric ==> alph
lib: fix spelling mistakesFix some spelling mistakes in comments:permanentely ==> permanentlywont ==> won'tremaning ==> remainingsucced ==> succeedshouldnt ==> shouldn'talpha-numeric ==> alphanumericstoreing ==> storingfuntion ==> functiondocumenation ==> documentationDetermin ==> Determineintepreted ==> interpretedammount ==> amountobious ==> obviousinterupts ==> interruptsoccured ==> occurredasssociated ==> associatedtaking into acount ==> taking into accountsquence ==> sequencestil ==> stillcontiguos ==> contiguousmatchs ==> matchesLink: https://lkml.kernel.org/r/20210607072555.12416-1-thunder.leizhen@huawei.comSigned-off-by: Zhen Lei <thunder.leizhen@huawei.com>Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add pldmfw library for PLDM firmware updateThe pldmfw library is used to implement common logic needed to flashdevices based on firmware files using the format described by the PLDMfor Firmware U
Add pldmfw library for PLDM firmware updateThe pldmfw library is used to implement common logic needed to flashdevices based on firmware files using the format described by the PLDMfor Firmware Update standard.This library consists of logic to parse the PLDM file format froma firmware file object, as well as common logic for sending the relevantPLDM header data to the device firmware.A simple ops table is provided so that device drivers can implementdevice specific hardware interactions while keeping the common logic tothe pldmfw library.This library will be used by the Intel ice networking driver as part ofimplementing device flash update via devlink. The library aims to bevendor and device agnostic. For this reason, it has been placed inlib/pldmfw, in the hopes that other devices which use the PLDM firmwarefile format may benefit from it in the future. However, do note that notall features defined in the PLDM standard have been implemented.Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>Signed-off-by: David S. Miller <davem@davemloft.net>