drbd: Change drbd_request_detach_interruptible's return type to int
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 20 Dec 2018 16:23:44 +0000 (17:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 19:39:55 +0000 (20:39 +0100)
commit20e106dfb16f1207308f832f0b2f7c09f4212ea2
treec94dc43f483f1b7f5e51ea83f7aad745b33aa84a
parentcbe87667e31662c57c530ad3c50d2ded9157e9bf
drbd: Change drbd_request_detach_interruptible's return type to int

[ Upstream commit 5816a0932b4fd74257b8cc5785bc8067186a8723 ]

Clang warns when an implicit conversion is done between enumerated
types:

drivers/block/drbd/drbd_state.c:708:8: warning: implicit conversion from
enumeration type 'enum drbd_ret_code' to different enumeration type
'enum drbd_state_rv' [-Wenum-conversion]
                rv = ERR_INTR;
                   ~ ^~~~~~~~

drbd_request_detach_interruptible's only call site is in the return
statement of adm_detach, which returns an int. Change the return type of
drbd_request_detach_interruptible to match, silencing Clang's warning.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/drbd/drbd_state.c
drivers/block/drbd/drbd_state.h