2021-06-07 00:55:14

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the xfs tree

Hi all,

After merging the xfs tree, today's linux-next build (powerpc_ppc64
defconfig) produced this warning:

fs/xfs/libxfs/xfs_ialloc.c: In function 'xfs_difree_finobt':
fs/xfs/libxfs/xfs_ialloc.c:2032:20: warning: unused variable 'agi' [-Wunused-variable]
2032 | struct xfs_agi *agi = agbp->b_addr;
| ^~~

Not sure how this came about, but somehow DEBUG has been turned off
which exposes this.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-06-07 01:17:34

by Dave Chinner

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the xfs tree

On Mon, Jun 07, 2021 at 10:48:19AM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the xfs tree, today's linux-next build (powerpc_ppc64
> defconfig) produced this warning:
>
> fs/xfs/libxfs/xfs_ialloc.c: In function 'xfs_difree_finobt':
> fs/xfs/libxfs/xfs_ialloc.c:2032:20: warning: unused variable 'agi' [-Wunused-variable]
> 2032 | struct xfs_agi *agi = agbp->b_addr;
> | ^~~
>
> Not sure how this came about, but somehow DEBUG has been turned off
> which exposes this.

I think I replaced all the agi->agi_seqno usages in that function
with pag->pag_agno and so now the agi structure is only accessed via
debug functions. The debug code should now pass perag structures
rather than raw AGI structures to check the free inode counts....

Cheers,

Dave.
--
Dave Chinner
[email protected]