Skip to content

Commit 7cc7720

Browse files
bjdooks-ctrichardweinberger
authored andcommitted
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: Ben Dooks <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent df22b5b commit 7cc7720

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ubifs/sb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int create_default_filesystem(struct ubifs_info *c)
184184
if (err)
185185
goto out;
186186
} else {
187-
sup->hash_algo = 0xffff;
187+
sup->hash_algo = cpu_to_le16(0xffff);
188188
}
189189

190190
sup->ch.node_type = UBIFS_SB_NODE;

0 commit comments

Comments
 (0)