Siva Reddy Kallam
3d2e5d12a2
RDMA/bng_re: Unwind bng_re_dev_init properly
...
Fix below smatch warning:
drivers/infiniband/hw/bng_re/bng_dev.c:270
bng_re_dev_init() warn: missing unwind goto?
Current bng_re_dev_init function is not having clear unwinding code.
So, added proper unwinding with ladder.
Fixes: 4f830cd8d7 ("RDMA/bng_re: Add infrastructure for enabling Firmware channel")
Reported-by: Simon Horman <horms@kernel.org >
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <error27@gmail.com >
Closes: https://lore.kernel.org/r/202601010413.sWadrQel-lkp@intel.com/
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com >
Link: https://patch.msgid.link/20260218091246.1764808-3-siva.kallam@broadcom.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
2026-02-24 03:56:28 -05:00
Siva Reddy Kallam
7a23af417d
RDMA/bng_re: Remove unnessary validity checks
...
Fix below smatch warning:
drivers/infiniband/hw/bng_re/bng_dev.c:113
bng_re_net_ring_free() warn: variable dereferenced before check 'rdev'
(see line 107)
current driver has unnessary validity checks. So, removing these
unnessary validity checks.
Fixes: 4f830cd8d7 ("RDMA/bng_re: Add infrastructure for enabling Firmware channel")
Fixes: 745065770c ("RDMA/bng_re: Register and get the resources from bnge driver")
Fixes: 04e031ff6e ("RDMA/bng_re: Initialize the Firmware and Hardware")
Fixes: d0da769c19 ("RDMA/bng_re: Add Auxiliary interface")
Reported-by: Simon Horman <horms@kernel.org >
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <error27@gmail.com >
Closes: https://lore.kernel.org/r/202601010413.sWadrQel-lkp@intel.com/
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com >
Link: https://patch.msgid.link/20260218091246.1764808-2-siva.kallam@broadcom.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com >
2026-02-24 03:53:24 -05:00
Linus Torvalds
bf4afc53b7
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
...
This 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_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2026-02-21 17:09:51 -08:00
Kees Cook
69050f8d6d
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
...
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object 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 >
2026-02-21 01:02:28 -08:00
Siva Reddy Kallam
04e031ff6e
RDMA/bng_re: Initialize the Firmware and Hardware
...
Initialize the firmware and hardware with HWRM command.
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com >
Link: https://patch.msgid.link/20251117171136.128193-9-siva.kallam@broadcom.com
Reviewed-by: Usman Ansari <usman.ansari@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-11-24 02:58:29 -05:00
Siva Reddy Kallam
99e4e10283
RDMA/bng_re: Add basic debugfs infrastructure
...
Add basic debugfs infrastructure for Broadcom next generation
controller.
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com >
Link: https://patch.msgid.link/20251117171136.128193-8-siva.kallam@broadcom.com
Reviewed-by: Usman Ansari <usman.ansari@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-11-24 02:58:29 -05:00
Siva Reddy Kallam
53c6ee7d7f
RDMA/bng_re: Enable Firmware channel and query device attributes
...
Enable Firmware channel and query device attributes
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com >
Link: https://patch.msgid.link/20251117171136.128193-7-siva.kallam@broadcom.com
Reviewed-by: Usman Ansari <usman.ansari@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-11-24 02:58:29 -05:00
Siva Reddy Kallam
4f830cd8d7
RDMA/bng_re: Add infrastructure for enabling Firmware channel
...
Add infrastructure for enabling Firmware channel.
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com >
Link: https://patch.msgid.link/20251117171136.128193-6-siva.kallam@broadcom.com
Reviewed-by: Usman Ansari <usman.ansari@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-11-24 02:58:29 -05:00
Siva Reddy Kallam
53310b698f
RDMA/bng_re: Allocate required memory resources for Firmware channel
...
Allocate required memory resources for Firmware channel.
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com >
Link: https://patch.msgid.link/20251117171136.128193-5-siva.kallam@broadcom.com
Reviewed-by: Usman Ansari <usman.ansari@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-11-24 02:58:29 -05:00
Siva Reddy Kallam
745065770c
RDMA/bng_re: Register and get the resources from bnge driver
...
Register and get the basic required resources from bnge driver.
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com >
Link: https://patch.msgid.link/20251117171136.128193-4-siva.kallam@broadcom.com
Reviewed-by: Usman Ansari <usman.ansari@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-11-24 02:58:29 -05:00
Siva Reddy Kallam
d0da769c19
RDMA/bng_re: Add Auxiliary interface
...
Add basic Auxiliary interface to the driver which supports
the BCM5770X NIC family.
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com >
Link: https://patch.msgid.link/20251117171136.128193-3-siva.kallam@broadcom.com
Reviewed-by: Usman Ansari <usman.ansari@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-11-24 02:58:29 -05:00