]> 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, 8 Apr 2022 11:58:10 +0000 (13:58 +0200)
commit29cabf372b31ec4ae8a9740b800243891cef705c
tree7a8591b5859f56073ff71cb2c5539d2d834e9b8d
parent958b5990153934ba68436305f53f48ed87a1ae9a
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