From: Ben Dooks (Codethink) Date: Wed, 16 Oct 2019 10:04:09 +0000 (+0100) Subject: ubifs: Force prandom result to __le32 X-Git-Tag: v5.15~4988^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cfa4412df98207e07de6e60d3c805c541cbce1a;p=platform%2Fkernel%2Flinux-starfive.git ubifs: Force prandom result to __le32 In set_dent_cookie() the result of prandom_u32() is assinged to an __le32 type. Make this a forced conversion to remove the following sparse warning: fs/ubifs/journal.c:506:30: warning: incorrect type in assignment (different base types) fs/ubifs/journal.c:506:30: expected restricted __le32 [usertype] cookie fs/ubifs/journal.c:506:30: got unsigned int Signed-off-by: Ben Dooks Signed-off-by: Richard Weinberger --- diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index 4fd9683b..d6136f7 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c @@ -503,7 +503,7 @@ static void mark_inode_clean(struct ubifs_info *c, struct ubifs_inode *ui) static void set_dent_cookie(struct ubifs_info *c, struct ubifs_dent_node *dent) { if (c->double_hash) - dent->cookie = prandom_u32(); + dent->cookie = (__force __le32) prandom_u32(); else dent->cookie = 0; }