* [dm-devel] Patch "dm crypt: fix get_key_size compiler warning if !CONFIG_KEYS" has been added to the 5.4-stable tree
@ 2022-04-02 16:42 Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2022-04-02 16:42 UTC (permalink / raw)
To: stable-commits, shraash; +Cc: dm-devel, Mike Snitzer, Alasdair Kergon
This is a note to let you know that I've just added the patch titled
dm crypt: fix get_key_size compiler warning if !CONFIG_KEYS
to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-crypt-fix-get_key_size-compiler-warning-if-config.patch
and it can be found in the queue-5.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
commit f5b717084845f22e48014ba1d63ab8e15c2f8379
Author: Aashish Sharma <shraash@google.com>
Date: Fri Feb 11 12:15:38 2022 +0000
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>
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 571c04e70343..3ed8ca47bc6e 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -2010,7 +2010,7 @@ static int crypt_set_keyring_key(struct crypt_config *cc, const char *key_string
static int get_key_size(char **key_string)
{
- return (*key_string[0] == ':') ? -EINVAL : strlen(*key_string) >> 1;
+ return (*key_string[0] == ':') ? -EINVAL : (int)(strlen(*key_string) >> 1);
}
#endif
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-02 16:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-02 16:42 [dm-devel] Patch "dm crypt: fix get_key_size compiler warning if !CONFIG_KEYS" has been added to the 5.4-stable tree Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox