public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] infiniband: Fxi dma_map_sg error check
@ 2022-08-26  9:56 Jack Wang
  2022-08-26  9:56 ` [PATCH 1/2] infiniband/mthca: Fix " Jack Wang
  2022-08-26  9:56 ` [PATCH 2/2] RDMA: dma-mapping: Return an unsigned int from ib_dma_map_sg{,_attrs} Jack Wang
  0 siblings, 2 replies; 12+ messages in thread
From: Jack Wang @ 2022-08-26  9:56 UTC (permalink / raw)
  To: jgg, leon, linux-rdma

Hi, all,

While working on a bugfix on RTRS[1], I noticed there are quite a few other
drivers have the same problem, due to the fact dma_map_sg return 0 on error,
not like most of the cases, return negative value for error.

I "grep -A 5 dma_map_sg' in kernel tree, and audit/fix the one I feel is buggy,
hence this patchset. As suggested by Christoph Hellwig, I now send the patches per
subsystem, this is for infiniband subsystem.

The first one for mthca, leon mentioned it's too old to change, I still keep it
in the hope others have a different opinion.

The second patch change the return value follow the patch from Christoph
Hellwig, we might want to change the type for in the drivers which calls
dma_map_sg or ib_dma_map_sg to unsigned int to.

Thanks!

[1] https://lore.kernel.org/linux-rdma/20220818105355.110344-1-haris.iqbal@ionos.com/T/#t
Jack Wang (2):
  infiniband/mthca: Fix dma_map_sg error check
  RDMA: dma-mapping: Return an unsigned int from ib_dma_map_sg{,_attrs}

 drivers/infiniband/core/device.c            | 2 +-
 drivers/infiniband/hw/mthca/mthca_memfree.c | 7 ++++---
 include/rdma/ib_verbs.h                     | 6 +++---
 3 files changed, 8 insertions(+), 7 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-08-30  9:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-26  9:56 [PATCH 0/2] infiniband: Fxi dma_map_sg error check Jack Wang
2022-08-26  9:56 ` [PATCH 1/2] infiniband/mthca: Fix " Jack Wang
2022-08-28 10:10   ` Leon Romanovsky
2022-08-29  5:27     ` Jinpu Wang
2022-08-26  9:56 ` [PATCH 2/2] RDMA: dma-mapping: Return an unsigned int from ib_dma_map_sg{,_attrs} Jack Wang
2022-08-28 11:09   ` Leon Romanovsky
2022-08-29  9:40     ` Jinpu Wang
2022-08-29 12:06       ` Leon Romanovsky
2022-08-29 13:19         ` Jinpu Wang
2022-08-30  8:01           ` Leon Romanovsky
2022-08-30  8:23             ` Jinpu Wang
2022-08-30  9:13               ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox