Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425110AbdDUT2d (ORCPT ); Fri, 21 Apr 2017 15:28:33 -0400 Received: from smtprelay0125.hostedemail.com ([216.40.44.125]:48408 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1424995AbdDUT2Y (ORCPT ); Fri, 21 Apr 2017 15:28:24 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1963:2198:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3871:3873:4321:5007:6119:7903:10004:10400:10848:11026:11232:11657:11658:11914:12043:12048:12740:12760:12895:13069:13311:13357:13439:14096:14097:14181:14659:14721:21080:21451:30012:30054:30056:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: cause28_809365273512c X-Filterd-Recvd-Size: 2352 Message-ID: <1492802882.30293.34.camel@perches.com> Subject: Re: [PATCH v2 16/17] IB/mlx4: Add spaces for better code readability From: Joe Perches To: SF Markus Elfring , Doug Ledford , Hal Rosenstock , Leon Romanovsky , Majd Dibbiny , Matan Barak , Sean Hefty , Yishai Hadas , linux-rdma@vger.kernel.org Cc: LKML , kernel-janitors@vger.kernel.org, trivial@kernel.org Date: Fri, 21 Apr 2017 12:28:02 -0700 In-Reply-To: References: <1935365a-bd7c-461e-6a84-0c5d3a501fff@users.sourceforge.net> <1492720654.3041.16.camel@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1022 Lines: 31 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;