From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DE4EC3527A for ; Thu, 14 Apr 2022 14:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348543AbiDNOwk (ORCPT ); Thu, 14 Apr 2022 10:52:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344852AbiDNNoo (ORCPT ); Thu, 14 Apr 2022 09:44:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73AB0393C6; Thu, 14 Apr 2022 06:40:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0FA2AB82983; Thu, 14 Apr 2022 13:40:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E317C385A5; Thu, 14 Apr 2022 13:40:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649943623; bh=W36Li4AORCbRpA8/ELuitbJTJ9wO1rcyMXYmqFCWJLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PAf1vFN31gN0v0PhZUGPZUMYMLlcP7nis4TzzhomR9rKLhQF/un0ZRRV0m2cAq+6u jHR9hY4Qktj5se07WO8pJJj4iKyeuJSfP982pn/oabFvePAt/kGCnqaRbRp9+3bifH rfQWLjV6IpgWUT6iaVzehs0ymTUarLxMujccJAyU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aashish Sharma , Mike Snitzer , Sasha Levin Subject: [PATCH 5.4 182/475] dm crypt: fix get_key_size compiler warning if !CONFIG_KEYS Date: Thu, 14 Apr 2022 15:09:27 +0200 Message-Id: <20220414110900.226782952@linuxfoundation.org> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220414110855.141582785@linuxfoundation.org> References: <20220414110855.141582785@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aashish Sharma [ 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 Signed-off-by: Mike Snitzer Signed-off-by: Sasha Levin --- drivers/md/dm-crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.34.1