From patchwork Tue Aug 16 10:56:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schubert X-Patchwork-Id: 1071082 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7GAv3II021368 for ; Tue, 16 Aug 2011 10:57:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752005Ab1HPK5C (ORCPT ); Tue, 16 Aug 2011 06:57:02 -0400 Received: from mailgw1.uni-kl.de ([131.246.120.220]:48567 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890Ab1HPK5B (ORCPT ); Tue, 16 Aug 2011 06:57:01 -0400 Received: from itwm2.itwm.fhg.de (itwm2.itwm.fhg.de [131.246.191.3]) by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p7GAux7H020439 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT); Tue, 16 Aug 2011 12:56:59 +0200 Received: from mail2.itwm.fhg.de ([131.246.191.79]:35558) by itwm2.itwm.fhg.de with esmtps (TLSv1:DES-CBC3-SHA:168) (/C=DE/ST=Rheinland-Pfalz/L=Kaiserslautern/O=Fraunhofer ITWM/OU=SLG/CN=mail2.itwm.fhg.de)(verified=1) (Exim 4.74 #1) id 1QtHKN-0004mW-G9; Tue, 16 Aug 2011 12:56:59 +0200 Subject: [PATCH 2/2] Rename 'n' into a longer variable name. To: netdev@vger.kernel.org From: Bernd Schubert Cc: linux-rdma@vger.kernel.org Date: Tue, 16 Aug 2011 12:56:59 +0200 Message-ID: <20110816105659.1805137.44398.stgit@fsdevel3> In-Reply-To: <20110816105648.1805137.35191.stgit@fsdevel3> References: <20110816105648.1805137.35191.stgit@fsdevel3> User-Agent: StGit/0.15 MIME-Version: 1.0 X-ITWM-CharSet: utf-8 X-ITWM-Scanned-By: mail2.itwm.fhg.de Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 16 Aug 2011 10:57:03 +0000 (UTC) When it comes to me variable names consisting of a single letter should be forbidden by coding style guide lines, as it is rather --- 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 difficult to search for single letter, such as 'n'. Rename struct neighbour *n to dst_neigh Signed-off-by: Bernd Schubert --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index fe89c46..189d4cb 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -717,22 +717,22 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_neigh *neigh; - struct neighbour *n = NULL; + struct neighbour *dst_neigh = NULL; unsigned long flags; if (likely(skb_dst(skb))) - n = dst_get_neighbour(skb_dst(skb)); + dst_neigh = dst_get_neighbour(skb_dst(skb)); - if (likely(n)) { - if (unlikely(!*to_ipoib_neigh(n))) { + if (likely(dst_neigh)) { + if (unlikely(!*to_ipoib_neigh(dst_neigh))) { ipoib_path_lookup(skb, dev); return NETDEV_TX_OK; } - neigh = *to_ipoib_neigh(n); + neigh = *to_ipoib_neigh(dst_neigh); if (unlikely((memcmp(&neigh->dgid.raw, - n->ha + 4, + dst_neigh->ha + 4, sizeof(union ib_gid))) || (neigh->dev != dev))) { spin_lock_irqsave(&priv->lock, flags); @@ -758,7 +758,8 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) return NETDEV_TX_OK; } } else if (neigh->ah) { - ipoib_send(dev, skb, neigh->ah, IPOIB_QPN(n->ha)); + ipoib_send(dev, skb, neigh->ah, + IPOIB_QPN(dst_neigh->ha)); return NETDEV_TX_OK; }