Sindhu Devale
312c5ce349
RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails
...
[ Upstream commit 783a11bf2400e5d5c42a943c3083dc0330751842 ]
When i40iw_hmc_sd_one fails, chunk is freed without the deletion of chunk
entry in the PBLE info list.
Fix it by adding the chunk entry to the PBLE info list only after
successful addition of SD in i40iw_hmc_sd_one.
This fixes a static checker warning reported here:
https://lore.kernel.org/linux-rdma/YHV4CFXzqTm23AOZ@mwanda/
Fixes: 9715830157
("i40iw: add pble resource files")
Link: https://lore.kernel.org/r/20210416002104.323-1-shiraz.saleem@intel.com
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com >
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-05-14 09:50:40 +02:00
Parav Pandit
1d7c995820
RDMA/i40iw: Avoid typecast from void to pci_dev
...
hw_context stores a pci_device pointer. Use the correct type instead of
void * and avoid typecasts.
Link: https://lore.kernel.org/r/20200914123528.270382-1-parav@mellanox.com
Signed-off-by: Parav Pandit <parav@nvidia.com >
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2020-09-16 13:40:29 -03:00
Christophe Jaillet
02654b5ae1
i40iw: Simplify code
...
Axe a few lines of code and re-use existing error handling path to avoid
code duplication.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Doug Ledford <dledford@redhat.com >
2017-08-18 14:01:08 -04:00
Henry Orosco
1ef936b229
i40iw: Code cleanup, remove check of PBLE pages
...
Remove check for zero 'pages' of unallocated pbles calculated in
add_pble_pool(); as it can never be true.
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Henry Orosco <henry.orosco@intel.com >
Signed-off-by: Doug Ledford <dledford@redhat.com >
2016-12-05 16:09:44 -05:00
Ismail, Mustafa
5c1c1908c1
RDMA/i40iw: Correct return code check in add_pble_pool
...
Move return code check to immediately after i40iw_hmc_sd_one call
where it is set instead of outside the then statement.
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com >
Signed-off-by: Faisal Latif <faisal.latif@intel.com >
Signed-off-by: Doug Ledford <dledford@redhat.com >
2016-04-28 16:32:54 -04:00
Faisal Latif
9715830157
i40iw: add pble resource files
...
i40iw_pble.[ch] to manage pble resource for iwarp clients.
Changes since v2:
remove unnecessary casts
Acked-by: Anjali Singhai Jain <anjali.singhai@intel.com >
Acked-by: Shannon Nelson <shannon.nelson@intel.com >
Signed-off-by: Faisal Latif <faisal.latif@intel.com >
Signed-off-by: Doug Ledford <dledford@redhat.com >
2016-02-29 17:10:53 -05:00