Skip to content

Commit

Permalink
[XFS] fix valid but harmless sparse warning
Browse files Browse the repository at this point in the history
The new xlog_recover_do_reg_buffer checks call be16_to_cpu on di_gen which
is a 32bit value so sparse rightly complains. Fortunately the warning is
harmless because we don't care for the value, but only whether it's
non-NULL. Due to that fact we can simply kill the endian swaps on this and
the previous di_mode check entirely.

SGI-PV: 969656
SGI-Modid: xfs-linux-melb:xfs-kern:29709a

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Lachlan McIlroy <[email protected]>
Signed-off-by: Tim Shimmin <[email protected]>
  • Loading branch information
Christoph Hellwig authored and Tim Shimmin committed Sep 20, 2007
1 parent bcc7b44 commit 1bc5858
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -1920,9 +1920,9 @@ xlog_recover_do_reg_buffer(
stale_buf = 1;
break;
}
if (be16_to_cpu(dip->di_core.di_mode))
if (dip->di_core.di_mode)
mode_count++;
if (be16_to_cpu(dip->di_core.di_gen))
if (dip->di_core.di_gen)
gen_count++;
}

Expand Down

0 comments on commit 1bc5858

Please sign in to comment.