linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
To: linux-nfs@vger.kernel.org, linux-ext4@vger.kernel.org
Cc: hch@infradead.org, yong.fan@whamcloud.com,
	linux-fsdevel@vger.kernel.org, tytso@mit.edu,
	adilger@whamcloud.com
Subject: [PATCH 6/6] Rename 'n' into a longer variable name.
Date: Tue, 16 Aug 2011 13:26:08 +0200	[thread overview]
Message-ID: <20110816112607.1808464.44359.stgit@fsdevel3> (raw)
In-Reply-To: <20110816112536.1808464.7174.stgit@fsdevel3>

When it comes to me variable names consisting of a single letter
should be forbidden by coding style guide lines, as it is rather
difficult to search for single letter, such as 'n'.

Rename struct neighbour *n to dst_neigh


Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
---
 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;
 		}
 


  parent reply	other threads:[~2011-08-16 11:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-16 11:25 [PATCH 0/2] 32/64 bit llseek hashes Bernd Schubert
2011-08-16 11:25 ` [PATCH 1/6] Add new FMODE flags: FMODE_32bithash and FMODE_64bithash Bernd Schubert
2011-08-16 11:25 ` [PATCH 2/6] Return 32/64-bit dir name hash according to usage type Bernd Schubert
2011-08-16 21:22   ` Andreas Dilger
2011-08-17  9:17     ` Bernd Schubert
2011-08-16 11:25 ` [PATCH 3/6] nfsd_open(): rename 'int access' to 'int may_flags' in nfsd_open() Bernd Schubert
2011-08-16 11:25 ` [PATCH 4/6] nfsd: vfs_llseek() with 32 or 64 bit offsets (hashes) Bernd Schubert
2011-08-16 11:26 ` [PATCH 5/6] Fix possible Null pointer dereference in ipoib_start_xmit() Bernd Schubert
2011-08-16 11:26 ` Bernd Schubert [this message]
2011-08-16 11:56 ` [PATCH 0/2] 32/64 bit llseek hashes Bernd Schubert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110816112607.1808464.44359.stgit@fsdevel3 \
    --to=bernd.schubert@itwm.fraunhofer.de \
    --cc=adilger@whamcloud.com \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=yong.fan@whamcloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).