Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5583465pxb; Mon, 14 Feb 2022 02:38:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRBRq1sfI5UdUjAGYEYUtswcHXQI5SWouWaugp1QCHM3sSBV50KBkQmUCgtpyD4Q21VM88 X-Received: by 2002:aa7:dd86:: with SMTP id g6mr14945156edv.452.1644835112963; Mon, 14 Feb 2022 02:38:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644835112; cv=none; d=google.com; s=arc-20160816; b=xT4I3Xb0Z3Op73i0THqJGfqy2zALFolcHLw+CMPA9HblhuNi/Ck9VQupNYLtHe4c0a HOOdv7UXU/ZT0pSFyzlAngZzJbsccDD0niVqLWWZMuabdwyc8nN52XMSnNM4uLN+1ae+ qS+uC5JGevDAVOk+fposPAcYf6udZGQfTrGEjnfSHJ7ufn5fbJe1g2+dTapxg9Wgl3wS W1yhBUcxqoY+DSFLgXUUyrrBhfh1/pZpWX+CP1fLuDl4DDNGuxcFWGYI91EPq7cbeJ3Q OAW6/G8MjZlSyjVfhN8ex0YyYqfASszOJxhjpW9cAvbafb85IIReX4VocyprNohMKdhH Pazg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=dHcRBMyYOzUwhslp5JRE655B9xCzIebKFjgXEXXATO4=; b=RKNv6b5MA+Uxyj3AUJn1BhOvNtBTCS1TCjoNlXuK3G/pg3zja7kvZdGf8RLXImq9Vv pjG9LSqI7WKA2Ok74M+l6/M+ftCW9PSa/tDZsUF8SlT6PlUWpk5yJ19Gy8IMSJmWqPtQ z9+d+UqDofgCWJ+aP9kIdAKy0x42EDBbiPrLvsGz5jUwaebiulDYXLmj+w1lHU1Nrnok d5Ig0L8oAKMIpKGFlZOEJzYUWLwvZhel+WnZcivhd2DpAcAiFwmvWRbQH3HN68Gc5fqP +tuy76IpMCcON8Zo8iYs9PxN/Y6W9GbtdpfLnfwIXq30rvp4t0lMdh/5LGqm5r0XlERZ j5dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=KByLTW8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 5si17729260edx.36.2022.02.14.02.38.10; Mon, 14 Feb 2022 02:38:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=KByLTW8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349927AbiBKMPr (ORCPT + 93 others); Fri, 11 Feb 2022 07:15:47 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349926AbiBKMPq (ORCPT ); Fri, 11 Feb 2022 07:15:46 -0500 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA588F59 for ; Fri, 11 Feb 2022 04:15:44 -0800 (PST) Received: by mail-pl1-x649.google.com with SMTP id p5-20020a170902bd0500b00148cb2d29ecso3217590pls.4 for ; Fri, 11 Feb 2022 04:15:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=dHcRBMyYOzUwhslp5JRE655B9xCzIebKFjgXEXXATO4=; b=KByLTW8roR7b/NsGCj8KMJC8GU7G4BMRSMdx4gOMyWClsbzAJNpymM1x4Wd1ISttSQ 7v+LCjeOaKaoaSqOwYupW16di9rAp5Mcn1DYAh4QvsBrDgilYFcx83J9LAk73ZHTwufX mp8kzHEZeLPFaaVBV/HItgbLfcQVFbCZ7LoN/ewSXazk0x3gZxrtknjG3KmzlI+xT6F0 5Fvp4rRdBZj9246kq3sDuBzKtK7bMFoD8RWnkJkz3Gqpin2rcn5VD1rgC7qU1WO91JHx dAKdDhjAalEgEL+RzkfZww5rUWly4cp5y0T+jBsHm5GbsASZ/r/9MrLSgbzg8nmwZxDr U+Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=dHcRBMyYOzUwhslp5JRE655B9xCzIebKFjgXEXXATO4=; b=pf7iAq0qULQ+zHSKt+tGyZ7WaTmiuf29fCEJIKUEWXnhnMW8Ls8gQIlzJrp5WeQtKY s6w/KZkVWLJ7HU65oz/FQTbuPhJRvdu/+IQ4j8zfZMytE/IfglOCp7H09dqqtobRYC5l hyMGqtaj8BYgf7Htgi9As2+YslcHQaVyY+nMfbxF7ZT9dU9eWNdvi7olIdm5yuFBtcMq 9LNcbp6CSVP6oPX87c0Z98kmsc4ityPH4rAqYuQhb12ihyiI4vRagDh0HODWTJpAokHq XYXkyQePeRSwVrsWiSqk94jF5z4G1pkqpI7fFf8akGb1+vMIVDLr/97WSaivceIuGdGa 0isQ== X-Gm-Message-State: AOAM532kEaQmoNsvI7vTSDSNN+HPHdyeIG1a7/EaVbTIFR/jKlNvVHTz VaU59c9ImVM1K90A9vlTNqDCXp68k5q/ X-Received: from ezekiel.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:108e]) (user=shraash job=sendgmr) by 2002:a17:90a:e7ce:: with SMTP id kb14mr75272pjb.202.1644581744235; Fri, 11 Feb 2022 04:15:44 -0800 (PST) Date: Fri, 11 Feb 2022 12:15:38 +0000 Message-Id: <20220211121538.1636240-1-shraash@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog Subject: [PATCH] dm crypt: fixed compiler warning in conditional expression From: Aashish Sharma To: Alasdair Kergon Cc: Mike Snitzer , dm-devel@redhat.com, linux-kernel@vger.kernel.org, groeck@chromium.org, Aashish Sharma Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Explicitly converting 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] Signed-off-by: Aashish Sharma --- drivers/md/dm-crypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index d4ae31558826..489b23cb37c3 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -2590,7 +2590,8 @@ 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 /* CONFIG_KEYS */ -- 2.35.1.265.g69c8d7142f-goog