xfs
[Top] [All Lists]

Re: [PATCH] fix sparse warning in xfs_da_btree.c

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH] fix sparse warning in xfs_da_btree.c
From: Christoph Hellwig <hch@xxxxxx>
Date: Wed, 7 Feb 2007 13:54:37 +0100
In-reply-to: <20061129154441.GA6400@xxxxxx>
References: <20061129154441.GA6400@xxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Wed, Nov 29, 2006 at 04:44:41PM +0100, Christoph Hellwig wrote:
> 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?

> 
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
> index a68bc1f..cccf69e 100644
> --- a/fs/xfs/xfs_da_btree.c
> +++ b/fs/xfs/xfs_da_btree.c
> @@ -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---


<Prev in Thread] Current Thread [Next in Thread>