Skip to contentSkip to conversation

fix sparse warning in xfs_da_btree.c

PATCH In review Christoph Hellwig 2 participants 4 messages Nov 29, 2006 – Feb 8, 2007 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix sparse warning in xfs_da_btree.c

The first use in xfs_da_node_lookup_int would have to be __be32. But we can just remove this temporary variable use completely and make sparse happy. The variable is used later in the function for a native endian variable so we'll have to keep it.

fs/xfs/xfs_da_btree.c +1 -2
index a68bc1f..cccf69e 100644
@@ -1090,8 +1090,7 @@ xfs_da_node_lookup_int(xfs_da_state_t *s
 		if (blk->magic == XFS_DA_NODE_MAGIC) {
 			node = blk->bp->data;
 			max = be16_to_cpu(node->hdr.count);
-			btreehashval = node->btree[max-1].hashval;
-			blk->hashval = be32_to_cpu(btreehashval);
+			blk->hashval = be32_to_cpu(node->btree[max-1].hashval);
 
 			/*
 			 * Binary search.  (note: small blocks will skip loop)
#1 lore raw
Quoted 4 lines · Christoph Hellwig

The first use in xfs_da_node_lookup_int would have to be __be32. But we can just remove this temporary variable use completely and make sparse happy. The variable is used later in the function for a native endian variable so we'll have to keep it.

ping?

Quoted 9 lines
fs/xfs/xfs_da_btree.c +0 -0
index a68bc1f..cccf69e 100644

fs/xfs/xfs_da_btree.c xfs_da_node_lookup_int(xfs_da_state_t *s · line 1096

Quoted 9 lines
fs/xfs/xfs_da_btree.c +1 -2
@@ -1090,8 +1090,7 @@ xfs_da_node_lookup_int(xfs_da_state_t *s
 		if (blk->magic == XFS_DA_NODE_MAGIC) {
 			node = blk->bp->data;
 			max = be16_to_cpu(node->hdr.count);
-			btreehashval = node->btree[max-1].hashval;
-			blk->hashval = be32_to_cpu(btreehashval);
+			blk->hashval = be32_to_cpu(node->btree[max-1].hashval);
 
 			/*
 			 * Binary search.  (note: small blocks will skip loop)

---end quoted text---

#2 lore raw

Christoph,

I merged this change a while ago but it looks like the take message didn't make it to oss.

mod xfs-linux-melb:xfs-kern:27702a TAKE message
================================================
Subject: TAKE 954580 -

fix sparse warning in xfs_da_btree.c

Date:  Tue Dec 12 13:15:55 AEDT 2006
Workarea:  vpn-emea-sw-emea-160-4.emea.sgi.com:/home/lachlan/isms/2.6.x-xfs
Inspected by:  hch
Author:  lachlan

The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb

Modid: xfs-linux-melb:xfs-kern:27702a
fs/xfs/xfs_da_btree.c - 1.173 - changed

Lachlan

Quoted 32 lines · Christoph Hellwig
Quoted 4 lines · Christoph Hellwig

The first use in xfs_da_node_lookup_int would have to be __be32. But we can just remove this temporary variable use completely and make sparse happy. The variable is used later in the function for a native endian variable so we'll have to keep it.

ping?

Quoted 8 lines
fs/xfs/xfs_da_btree.c +0 -0
index a68bc1f..cccf69e 100644

fs/xfs/xfs_da_btree.c xfs_da_node_lookup_int(xfs_da_state_t *s · line 1096

Quoted 9 lines
fs/xfs/xfs_da_btree.c +1 -2
@@ -1090,8 +1090,7 @@ xfs_da_node_lookup_int(xfs_da_state_t *s
 		if (blk->magic == XFS_DA_NODE_MAGIC) {
 			node = blk->bp->data;
 			max = be16_to_cpu(node->hdr.count);
-			btreehashval = node->btree[max-1].hashval;
-			blk->hashval = be32_to_cpu(btreehashval);
+			blk->hashval = be32_to_cpu(node->btree[max-1].hashval);
 
 			/*
 			 * Binary search.  (note: small blocks will skip loop)

---end quoted text---

#3 lore raw
Quoted 4 lines · Lachlan McIlroy

Christoph,

I merged this change a while ago but it looks like the take message didn't make it to oss.

Ah, okay - thanks for putting this in. And we really should find a way to make the system send out TAKE messages automatically so that developers can't acidentally not send it out.. (and while we're at it make sure the diff is sent out in the message aswell as for most cvs/svn commit list setups..)