提交 1bc5858d 编写于 作者: C Christoph Hellwig 提交者: Tim Shimmin

[XFS] fix valid but harmless sparse warning

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: NChristoph Hellwig <hch@infradead.org>
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
Signed-off-by: NTim Shimmin <tes@sgi.com>
上级 bcc7b445
......@@ -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++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册