Message ID | 20200728043220.17231-2-allison.henderson@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xfs: Fix compiler warnings | expand |
On 7/27/20 9:32 PM, Allison Collins wrote: > Fix compiler warning for variable 'blk' set but not used in > xfs_attr_node_removename_setup. > > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Allison Collins <allison.henderson@oracle.com> Fixes: 534c7e150352 ("xfs: Add helper function xfs_attr_node_removename_setup") Reviewed-by: Eric Sandeen <sandeen@redhat.com> > --- > fs/xfs/libxfs/xfs_attr.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c > index d4583a0..e5ec9ed 100644 > --- a/fs/xfs/libxfs/xfs_attr.c > +++ b/fs/xfs/libxfs/xfs_attr.c > @@ -1174,15 +1174,14 @@ int xfs_attr_node_removename_setup( > struct xfs_da_state **state) > { > int error; > - struct xfs_da_state_blk *blk; > > error = xfs_attr_node_hasname(args, state); > if (error != -EEXIST) > return error; > > - blk = &(*state)->path.blk[(*state)->path.active - 1]; > - ASSERT(blk->bp != NULL); > - ASSERT(blk->magic == XFS_ATTR_LEAF_MAGIC); > + ASSERT((*state)->path.blk[(*state)->path.active - 1].bp != NULL); > + ASSERT((*state)->path.blk[(*state)->path.active - 1].magic == > + XFS_ATTR_LEAF_MAGIC); > > if (args->rmtblkno > 0) { > error = xfs_attr_leaf_mark_incomplete(args, *state); >
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c index d4583a0..e5ec9ed 100644 --- a/fs/xfs/libxfs/xfs_attr.c +++ b/fs/xfs/libxfs/xfs_attr.c @@ -1174,15 +1174,14 @@ int xfs_attr_node_removename_setup( struct xfs_da_state **state) { int error; - struct xfs_da_state_blk *blk; error = xfs_attr_node_hasname(args, state); if (error != -EEXIST) return error; - blk = &(*state)->path.blk[(*state)->path.active - 1]; - ASSERT(blk->bp != NULL); - ASSERT(blk->magic == XFS_ATTR_LEAF_MAGIC); + ASSERT((*state)->path.blk[(*state)->path.active - 1].bp != NULL); + ASSERT((*state)->path.blk[(*state)->path.active - 1].magic == + XFS_ATTR_LEAF_MAGIC); if (args->rmtblkno > 0) { error = xfs_attr_leaf_mark_incomplete(args, *state);
Fix compiler warning for variable 'blk' set but not used in xfs_attr_node_removename_setup. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Allison Collins <allison.henderson@oracle.com> --- fs/xfs/libxfs/xfs_attr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)