From patchwork Fri Apr 7 21:03:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9670417 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F7AA602B3 for ; Fri, 7 Apr 2017 21:04:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41E2528652 for ; Fri, 7 Apr 2017 21:04:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35CE828665; Fri, 7 Apr 2017 21:04:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFF8828652 for ; Fri, 7 Apr 2017 21:04:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753544AbdDGVED (ORCPT ); Fri, 7 Apr 2017 17:04:03 -0400 Received: from mout.web.de ([217.72.192.78]:65472 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752677AbdDGVEC (ORCPT ); Fri, 7 Apr 2017 17:04:02 -0400 Received: from [192.168.1.2] ([77.181.117.94]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M4IAh-1c4ldR0gbb-00rlwI; Fri, 07 Apr 2017 23:03:38 +0200 Subject: [PATCH 4/9] IB/IPoIB: Delete unwanted spaces behind usages of the sizeof operator From: SF Markus Elfring To: linux-rdma@vger.kernel.org, target-devel@vger.kernel.org, David Ahern , Doug Ledford , Erez Shitrit , Feras Daoud , Hal Rosenstock , Leon Romanovsky , Mark Bloch , Or Gerlitz , Paolo Abeni , Roi Dayan , Sagi Grimberg , Sean Hefty , Yuval Shaia , Zhu Yanjun Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <3e97b74c-26fa-2965-fa3c-e0f96c62e46e@users.sourceforge.net> Date: Fri, 7 Apr 2017 23:03:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:izoP0iW+QQyaJjPCS5aGwyJ7G4oYaDJJt7gPSCoWLF6/YzPv+8Q wnJJtBayC3ndPNBd0KUETc+f7MQRi6bRuAfsW58sweRqEifTbMmf+iITrE2MOKehnkRdP7e bry9NhjS2GR/FtQ2O4rG/dmIoBwQsFdM4UAUuaXPtnffwDaIuM2sS1Ri+rf00xoBFQU3UcD fKeZnVjHomx1bLkk9S24g== X-UI-Out-Filterresults: notjunk:1; V01:K0:RlkGRNGRL0E=:ln5jou6Il8EIiD1zwLSWXV ZzqIo7BeU/6ESVgyjXYvFWhEt7FVzscrHS1S524AtYKOkez6RIfHC9H9Lr4IwW/zffC6yG+Ig ykCS2OgV/f79i6clAxr13Jh89E1k2QB2fXpchmpk0ja9oCRu7hmWSqN/PhSp9oZrCj5iXvs0d r7q2DERthwR9hhQGWA/yd6c7yvia2owT5E79VDDpQUeifcueLW7+nEUlC5XuTTlPW3zAmBnrv tNp/sVgwr+4POcQWimYvnRznwTubPdDYrzbTWVlz/kPj8Y3/CPV5wCevzssXDCQagBwMb+Eb0 aJOwDfi6Ti/wfc1ORTFtBw5ZSouMSRBE4nmMo5QANka9PjZ9tbWPJyGxXDeRYOKklVONtfOyj pyVSiLDUq6WOlXmQvZi9uWekyLZoOOYLv2k/M0aKrKSUSehu28EsQ8qfD5g+f+3Q8dWHUOj++ Lvjr6qT8doJWejWkYH1CoNFI1a/bv+dO1KnRLjzXzkHHxgIVvMUZa4iY9zJpK7zXas0wdZPJB d/jKjvPTShvIwAtxvItHcg9x7dAFrRp5xkaFHxV0DxPPF9YZfU1rqbIU3sMVnRf0gEChP1Kc0 vpGtrRlJ32dMIEgCxJtZB10KhaNxyIIJwwjaKiu+m7ph144ctDnZ9M0Cd3O3XuY1JrYVrRD5D SgZyCKYM2V3RJFxXqV0CRcNc7C5wXQARrX2IFHtfRhQKZMNezz8AfWTunRkYUWjO43I4di95k mVj6pzRPUGmDxgUA3VtFpikbjCiJCmuoplJdVQOCWJ9qTJSc4wyO/onGN1gwmJpKEG790Q+KW hKctZb1 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Fri, 7 Apr 2017 20:10:45 +0200 * Replace the source code "sizeof (" by "sizeof(" according to the Linux coding style convention. * Adjust indentation at a few places. Signed-off-by: Markus Elfring Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 446af4ec3d86..55581417eb43 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -514,8 +514,7 @@ struct ipoib_path *__path_find(struct net_device *dev, void *gid) path = rb_entry(n, struct ipoib_path, rb_node); ret = memcmp(gid, path->pathrec.dgid.raw, - sizeof (union ib_gid)); - + sizeof(union ib_gid)); if (ret < 0) n = n->rb_left; else if (ret > 0) @@ -540,7 +539,7 @@ static int __path_add(struct net_device *dev, struct ipoib_path *path) tpath = rb_entry(pn, struct ipoib_path, rb_node); ret = memcmp(path->pathrec.dgid.raw, tpath->pathrec.dgid.raw, - sizeof (union ib_gid)); + sizeof(union ib_gid)); if (ret < 0) n = &pn->rb_left; else if (ret > 0) @@ -611,7 +610,7 @@ int ipoib_path_iter_next(struct ipoib_path_iter *iter) path = rb_entry(n, struct ipoib_path, rb_node); if (memcmp(iter->path.pathrec.dgid.raw, path->pathrec.dgid.raw, - sizeof (union ib_gid)) < 0) { + sizeof(union ib_gid)) < 0) { iter->path = *path; ret = 0; break; @@ -874,7 +873,7 @@ static struct ipoib_path *path_rec_create(struct net_device *dev, void *gid) INIT_LIST_HEAD(&path->neigh_list); - memcpy(path->pathrec.dgid.raw, gid, sizeof (union ib_gid)); + memcpy(path->pathrec.dgid.raw, gid, sizeof(union ib_gid)); path->pathrec.sgid = priv->local_gid; path->pathrec.pkey = cpu_to_be16(priv->pkey); path->pathrec.numb_path = 1; @@ -1541,7 +1540,8 @@ void ipoib_del_neighs_by_gid(struct net_device *dev, u8 *gid) while ((neigh = rcu_dereference_protected(*np, lockdep_is_held(&priv->lock))) != NULL) { /* delete neighs belong to this parent */ - if (!memcmp(gid, neigh->daddr + 4, sizeof (union ib_gid))) { + if (!memcmp(gid, neigh->daddr + 4, + sizeof(union ib_gid))) { rcu_assign_pointer(*np, rcu_dereference_protected(neigh->hnext, lockdep_is_held(&priv->lock))); @@ -2060,7 +2060,8 @@ static struct net_device *ipoib_add_port(const char *format, hca->name, port, result); goto device_init_failed; } else - memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw, sizeof (union ib_gid)); + memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw, + sizeof(union ib_gid)); set_bit(IPOIB_FLAG_DEV_ADDR_SET, &priv->flags); result = ipoib_dev_init(priv->dev, hca, port);