cachefiles: Explicitly cast enumerated type in put_object
authorNathan Chancellor <natechancellor@gmail.com>
Mon, 24 Sep 2018 17:33:44 +0000 (10:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 08:24:40 +0000 (09:24 +0100)
commitd8bf97a0a48901591f621bbed3de79bc4a6c8030
tree4d6b0fc6040bcd5a1d5ca48b04fd935572828215
parent02bd7b740cbbb374ebbdb965eb2e08f944f6e8bd
cachefiles: Explicitly cast enumerated type in put_object

[ Upstream commit b7e768b7e3522695ed36dcb48ecdcd344bd30a9b ]

Clang warns when one enumerated type is implicitly converted to another.

fs/cachefiles/namei.c:247:50: warning: implicit conversion from
enumeration type 'enum cachefiles_obj_ref_trace' to different
enumeration type 'enum fscache_obj_ref_trace' [-Wenum-conversion]
        cache->cache.ops->put_object(&xobject->fscache,
cachefiles_obj_put_wait_retry);

Silence this warning by explicitly casting to fscache_obj_ref_trace,
which is also done in put_object.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cachefiles/namei.c