]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm crypt: fix get_key_size compiler warning if !CONFIG_KEYS
authorAashish Sharma <shraash@google.com>
Fri, 11 Feb 2022 12:15:38 +0000 (12:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Apr 2022 12:14:48 +0000 (14:14 +0200)
commit10757f7f878aaff01ea9451e93961845714f9ef2
tree1233a058e0cbec21aaa0a477423d8a45073d526d
parent0b85cd1cac71dd7b5b2cb682ad4e10f7b41f489a
dm crypt: fix get_key_size compiler warning if !CONFIG_KEYS

[ Upstream commit 6fc51504388c1a1a53db8faafe9fff78fccc7c87 ]

Explicitly convert unsigned int in the right of the conditional
expression to int to match the left side operand and the return type,
fixing the following compiler warning:

drivers/md/dm-crypt.c:2593:43: warning: signed and unsigned
type in conditional expression [-Wsign-compare]

Fixes: c538f6ec9f56 ("dm crypt: add ability to use keys from the kernel key retention service")
Signed-off-by: Aashish Sharma <shraash@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-crypt.c