diff mbox

[v2,16/17] IB/mlx4: Add spaces for better code readability

Message ID d7f1064f-a70e-83c4-bf45-0467ffba954f@users.sourceforge.net (mailing list archive)
State Deferred
Headers show

Commit Message

SF Markus Elfring April 21, 2017, 6:54 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 21 Apr 2017 19:14:11 +0200

Use space characters at some source code places according to
the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/infiniband/hw/mlx4/qp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Joe Perches April 21, 2017, 7:28 p.m. UTC | #1
On Fri, 2017-04-21 at 20:54 +0200, SF Markus Elfring wrote:

> Use space characters at some source code places according to
> the Linux coding style convention.

[]

> diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
[]
> @@ -2599,7 +2599,7 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_ud_wr *wr,
>  		u16 ether_type;
>  		u16 pcp = (be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 29) << 13;
>  
> -		ether_type = (!is_udp) ? ETH_P_IBOE:
> +		ether_type = (!is_udp) ? ETH_P_IBOE :
>  			(ip_version == 4 ? ETH_P_IP : ETH_P_IPV6);

Please refrain from tool generated mechanical changes.

Do try to make the code human readable and correct when
you are also making actual object code differences.

If this is to be modified at all then also please use
consistent ?: condition testing parentheses or perhaps
don't use parentheses at all.

Maybe even align the ETH_P_ uses like:

		ether_type = !is_udp		? ETH_P_IBOE :
			     ip_version == 4	? ETH_P_IP :
						  ETH_P_IPV6;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 068abfdc9d01..15240163c399 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1065,7 +1065,7 @@  static void destroy_qp_common(struct mlx4_ib_dev *dev, struct mlx4_ib_qp *qp,
 	list_del(&qp->cq_recv_list);
 	if (!is_user) {
 		__mlx4_ib_cq_clean(recv_cq, qp->mqp.qpn,
-				 qp->ibqp.srq ? to_msrq(qp->ibqp.srq): NULL);
+				   qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL);
 		if (send_cq != recv_cq)
 			__mlx4_ib_cq_clean(send_cq, qp->mqp.qpn, NULL);
 	}
@@ -2599,7 +2599,7 @@  static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_ud_wr *wr,
 		u16 ether_type;
 		u16 pcp = (be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 29) << 13;
 
-		ether_type = (!is_udp) ? ETH_P_IBOE:
+		ether_type = (!is_udp) ? ETH_P_IBOE :
 			(ip_version == 4 ? ETH_P_IP : ETH_P_IPV6);
 
 		mlx->sched_prio = cpu_to_be16(pcp);