Skip to content

IB/mlx: Fine-tuning for several function implementations

SF Markus Elfring kernel-janitors linux-rdma lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest29 patches 24 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/29IB/mlx4: Use kcalloc() in mlx4_ib_alloc_pv_bufs()drivers/infiniband/hw/mlx4/mad.c+2 -21 reply
2/29IB/mlx4: Improve another size determination in mlx4_ib_alloc_pv_bufs()drivers/infiniband/hw/mlx4/mad.c+1 -11 reply
3/29IB/mlx4: Improve another size determination in mlx4_ib_alloc_demux_ctx()drivers/infiniband/hw/mlx4/mad.c+1 -11 reply
4/29IB/mlx4: Improve another size determination in alloc_pv_object()drivers/infiniband/hw/mlx4/mad.c+1 -11 reply
5/29IB/mlx4: Fix a typo in a comment linedrivers/infiniband/hw/mlx4/mad.c+4 -21 reply
6/29IB/mlx4: Delete three unnecessary return statementsdrivers/infiniband/hw/mlx4/mad.c+0 -31 reply
7/29IB/mlx4: Split a condition check in handle_slaves_guid_change()drivers/infiniband/hw/mlx4/mad.c+9 -51 reply
8/29IB/mlx4: Delete an unnecessary check before the function call "kfree" in free_pv_object()drivers/infiniband/hw/mlx4/mad.c+2 -41 reply
9/29IB/mlx4: Move an assignment out of a check in forward_trap()drivers/infiniband/hw/mlx4/mad.c+2 -11 reply
10/29IB/mlx4: Enclose 15 expressions for the sizeof operator by parenthesesdrivers/infiniband/hw/mlx4/mad.c+15 -151 reply
11/29IB/mlx4: Use kmalloc_array() in three functionsdrivers/infiniband/hw/mlx4/main.c+9 -51 reply
12/29IB/mlx4: Enclose 17 expressions for the sizeof operator by parenthesesdrivers/infiniband/hw/mlx4/main.c+17 -181 reply
13/29IB/mlx4: Split a condition check in five functionsdrivers/infiniband/hw/mlx4/main.c+59 -311 reply
14/29IB/mlx4: Delete an unnecessary variable in __mlx4_ib_query_gid()drivers/infiniband/hw/mlx4/main.c+1 -40 replies
15/29IB/mlx4: Delete an unnecessary return statement in do_slave_init()drivers/infiniband/hw/mlx4/main.c+0 -11 reply
16/29IB/mlx4: Improve another size determination in do_slave_init()drivers/infiniband/hw/mlx4/main.c+1 -10 replies
17/29IB/mlx4: Improve another size determination in mlx4_ib_add()drivers/infiniband/hw/mlx4/main.c+2 -32 replies
18/29IB/mlx4: Delete an unnecessary variable initialisation in mlx4_ib_add()drivers/infiniband/hw/mlx4/main.c+1 -10 replies
19/29IB/mlx4: Delete an unnecessary variable assignment in mlx4_ib_add()drivers/infiniband/hw/mlx4/main.c+0 -21 reply
20/29IB/mlx4: Delete an error message for a failed memory allocation in mlx4_ib_add()drivers/infiniband/hw/mlx4/main.c+1 -41 reply
21/29IB/mlx4: Delete unnecessary braces in mlx4_ib_add()drivers/infiniband/hw/mlx4/main.c+1 -21 reply
22/29IB/mlx4: Use kmalloc_array() in alloc_proxy_bufs()drivers/infiniband/hw/mlx4/qp.c+3 -31 reply
23/29IB/mlx4: Improve size determinations in create_qp_common()drivers/infiniband/hw/mlx4/qp.c+2 -21 reply
24/29IB/mlx4: Delete unwanted spaces behind usages of the sizeof operatordrivers/infiniband/hw/mlx4/qp.c+63 -650 replies
25/29IB/mlx4: Add spaces for better code readabilitydrivers/infiniband/hw/mlx4/qp.c+2 -20 replies
26/29IB/mlx4: Enclose 14 expressions for the sizeof operator by parenthesesdrivers/infiniband/hw/mlx4/qp.c+16 -150 replies
27/29IB/mlx5: Use kmalloc_array() in create_kernel_qp()drivers/infiniband/hw/mlx5/qp.c+15 -60 replies
28/29IB/mlx5: Less function calls in create_kernel_qp() after error detectiondrivers/infiniband/hw/mlx5/qp.c+27 -160 replies
29/29IB/mlx5: Use kmalloc_array() in create_srq_kernel()drivers/infiniband/hw/mlx5/srq.c+3 -20 replies

Reviews trailers per patch

None of the 29 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMajd Dibbiny
SeriesR-b R-b R-b R-b R-b
1/29
2/29
3/29
4/29
5/29
6/29
7/29
8/29
9/29
10/29
11/29
12/29
13/29
14/29
15/29
16/29
17/29
18/29
19/29
20/29
21/29
22/29
23/29
24/29
25/29
26/29
27/29
28/29
29/29

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/29] IB/mlx: Fine-tuning for several function implementations

From: Markus Elfring <[email protected]>
Date: Sat, 18 Feb 2017 21:34:32 +0100

Several update suggestions were taken into account from static source code analysis.

Markus Elfring (29):
Use kcalloc() in mlx4_ib_alloc_pv_bufs()
Improve another size determination in mlx4_ib_alloc_pv_bufs() Improve another size determination in mlx4_ib_alloc_demux_ctx() Improve another size determination in alloc_pv_object()
Fix a typo in a comment line
Delete three unnecessary return statements
Split a condition check in handle_slaves_guid_change()
Delete an unnecessary check before the function call "kfree" in free_pv_object() Move an assignment out of a check in forward_trap()
Enclose 15 expressions for the sizeof operator by parentheses
Use kmalloc_array() in three functions
Enclose 17 expressions for the sizeof operator by parentheses
Split a condition check in five functions
Delete an unnecessary variable in __mlx4_ib_query_gid()
Delete an unnecessary return statement in do_slave_init()
Improve another size determination in do_slave_init()
Improve another size determination in mlx4_ib_add()
Delete an unnecessary variable initialisation in mlx4_ib_add() Delete an unnecessary variable assignment in mlx4_ib_add()
Delete an error message for a failed memory allocation in mlx4_ib_add() Delete unnecessary braces in mlx4_ib_add()
Use kmalloc_array() in alloc_proxy_bufs()
Improve size determinations in create_qp_common()
Delete unwanted spaces behind usages of the sizeof operator
Add spaces for better code readability
Enclose 14 expressions for the sizeof operator by parentheses
Use kmalloc_array() in create_kernel_qp()
Less function calls in create_kernel_qp() after error detection
Use kmalloc_array() in create_srq_kernel()

 drivers/infiniband/hw/mlx4/mad.c  |  72 ++++++++--------
 drivers/infiniband/hw/mlx4/main.c | 164 ++++++++++++++++++++----------------
 drivers/infiniband/hw/mlx4/qp.c   | 173 +++++++++++++++++++-------------------
 drivers/infiniband/hw/mlx5/qp.c   |  66 ++++++++++-----
 drivers/infiniband/hw/mlx5/srq.c  |   5 +-
 5 files changed, 261 insertions(+), 219 deletions(-)
Signature · 1 line
2.11.1