Skip to content

Commit

Permalink
cachefiles: Explicitly cast enumerated type in put_object
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: David Howells <[email protected]>
  • Loading branch information
nathanchance authored and dhowells committed Nov 30, 2018
1 parent c5a94f4 commit b7e768b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/cachefiles/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,13 @@ static int cachefiles_mark_object_active(struct cachefiles_cache *cache,

ASSERT(!test_bit(CACHEFILES_OBJECT_ACTIVE, &xobject->flags));

cache->cache.ops->put_object(&xobject->fscache, cachefiles_obj_put_wait_retry);
cache->cache.ops->put_object(&xobject->fscache,
(enum fscache_obj_ref_trace)cachefiles_obj_put_wait_retry);
goto try_again;

requeue:
cache->cache.ops->put_object(&xobject->fscache, cachefiles_obj_put_wait_timeo);
cache->cache.ops->put_object(&xobject->fscache,
(enum fscache_obj_ref_trace)cachefiles_obj_put_wait_timeo);
_leave(" = -ETIMEDOUT");
return -ETIMEDOUT;
}
Expand Down

0 comments on commit b7e768b

Please sign in to comment.