提交 7cc7720f 编写于 作者: B Ben Dooks (Codethink) 提交者: Richard Weinberger

ubifs: Fix type of sup->hash_algo

The sup->hash_algo is a __le16, and whilst 0xffff is
the same in __le16 and u16, it would be better to use
cpu_to_le16() anyway (which should deal with constants)
and silence the following sparse warning:

fs/ubifs/sb.c:187:32: warning: incorrect type in assignment (different base types)
fs/ubifs/sb.c:187:32:    expected restricted __le16 [usertype] hash_algo
fs/ubifs/sb.c:187:32:    got int
Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 df22b5b3
......@@ -184,7 +184,7 @@ static int create_default_filesystem(struct ubifs_info *c)
if (err)
goto out;
} else {
sup->hash_algo = 0xffff;
sup->hash_algo = cpu_to_le16(0xffff);
}
sup->ch.node_type = UBIFS_SB_NODE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部