Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2160714rdb; Thu, 7 Dec 2023 23:00:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnv2VdMLFGSu3QpOthnF+5Tu3uPgSztdIgD87HVfWnmnoaAoR3F+HTwkTpei2//F3PTFto X-Received: by 2002:a17:903:2342:b0:1d0:700b:3f78 with SMTP id c2-20020a170903234200b001d0700b3f78mr619970plh.50.1702018802292; Thu, 07 Dec 2023 23:00:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702018802; cv=none; d=google.com; s=arc-20160816; b=Jd/vWcwzoN/7m8Rv5jqC2msRx0QP1Lskl/B+W6dmLFB6tJEYAH0IcTFxIP6N//XbWn HxiqjsmfCWAcyaq6Ia0LCkMm7Q5ffdfWTQuyLOfoBFEe3y186VG7XEYfs74QkY5hWGfR B626f2i2o4jBxn2WsWYfGwXpXrVsDEOa9wmpxHYdDHqra0OtNrU/kQwdwNri4jXvIcla I2PT+ZVmlJrhSTrMTq94p4mAOkn+szmrHljuPVpz44KU5A6GROfnlTg89HivK9OPN0iA zbmn63C1aKQl92cgXmoPV3SBv0AkgvMfw5MEpLPo7BSaihuUzGiUS6nKYU3eD2b4u6aO tecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OIWn45Ech+fto22q1XGFNjdWj3hQRi8//sYbCfmx5as=; fh=fjXvo9o9asx0XOcGs9ifNV/y7msj8txQqVBg2DrHlY0=; b=jkxlkQ05ZK9tvrNarSB/FCQ870yj6QKq4ema/DN2N8mT34fObynIq8mghLhApCzbuJ ckoSHV7txfsQ69WhTGHyIx1Su4blg3ZpdMgA+4oBsJ+sBYF37b4zFV25R5uf0p3c1/fl r8aOmlFy+9CLGxLjl8NWRS1GWzYK0S4HHrVbD5R0cNPZNJZ1j/l8p6tYbVCUIf3ggHKm +mSn6hgfSxgSo9YQIflRfMSak6plxyKHhVdDxD4hBga+IMPeguAZOOQ4b/m4WQ8Jfn9D JP1hDIDEz35bVVh+jnJfw79fWpf60bHRSi5GyyiocOUI4N+zkXFLH8ToHNdHeDhuQ7DL /62w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tnecBDvi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id f1-20020a17090274c100b001cf5d073fa7si1110297plt.119.2023.12.07.23.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:00:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tnecBDvi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 948E985BF2C1; Thu, 7 Dec 2023 22:59:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233268AbjLHG71 (ORCPT + 99 others); Fri, 8 Dec 2023 01:59:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233226AbjLHG7U (ORCPT ); Fri, 8 Dec 2023 01:59:20 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 657C81718 for ; Thu, 7 Dec 2023 22:59:26 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1cfabcbda7bso21838525ad.0 for ; Thu, 07 Dec 2023 22:59:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702018766; x=1702623566; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OIWn45Ech+fto22q1XGFNjdWj3hQRi8//sYbCfmx5as=; b=tnecBDvi8mgub21fpXNe0w89pKeQ140jqJeww+5fE/T5Iqnn/UBEN9ZrEdtM7IKJTb TQ9gCT9xEMXbk7oGshB5cBWIcf0cpbD48tp/JHa2jqf6slp9IYK12YJexpI8UiIUt2Jm 1R61VPyKVp2pCy0oTKw8EBmLdCcpkuEW1rW9Gsc4sVGIe67O3VfgeGYZzV9tMqGVUoeX MafsW9ZbGdbyRvUQenmfY+YcQrZy4Wfa2xK4rc2lsf2pj616SgAM/p7WLvmVGYsS50kC ClZrHKwmYQqzrTYQq9bqMSFRuFaFO5l17DHxh+2iN6DsArnlyqMZek//914A/ue+fen4 Sdqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702018766; x=1702623566; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OIWn45Ech+fto22q1XGFNjdWj3hQRi8//sYbCfmx5as=; b=et93ZxVQFpE8LAIbVRoyVZFx6dq0nJVvv59DineVPb9knqfaRgj7Vse/DvjR0oumzw gRTPTxylBZQQ8VaxZQc/dsbbK4CYiPpL+rQRndjWbpo8gk8nhHcrUwytGo6COgxHlYx4 74nkjLwERgNNx2W9pVWQRatzf/wzGJ6pDq4wSZBBnx2u9YY2vK8YD9yC6pHk626+ZE5S sUT383Qit9DqNZjxN+Y6fZ6+bQgI6N9EMQyMMsbPBXiViQXcnzZdDhIwzdXz1CgpleLd KAf0GN7OlrnQZWtCJIHVR6eR5EQDm2aCjVsgARyYP/rnqGVB25yCy6G81FE9wNaWP3zE OS6Q== X-Gm-Message-State: AOJu0YwCjrcyGqRP2QwyhTdc9riyP0sIe1uHlJvMsrUrTtMjC7bCD3Wk KUJbiIHwZOHHlQuqRkfr36+9 X-Received: by 2002:a17:902:ea11:b0:1cf:cc3e:c550 with SMTP id s17-20020a170902ea1100b001cfcc3ec550mr530932plg.5.1702018765889; Thu, 07 Dec 2023 22:59:25 -0800 (PST) Received: from localhost.localdomain ([117.216.123.142]) by smtp.gmail.com with ESMTPSA id n8-20020a170902e54800b001b03f208323sm934263plf.64.2023.12.07.22.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 22:59:25 -0800 (PST) From: Manivannan Sadhasivam To: martin.petersen@oracle.com, jejb@linux.ibm.com Cc: andersson@kernel.org, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, quic_cang@quicinc.com, ahalaney@redhat.com, quic_nitirawa@quicinc.com, Manivannan Sadhasivam , Abel Vesa Subject: [PATCH v2 02/17] scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key() Date: Fri, 8 Dec 2023 12:28:47 +0530 Message-Id: <20231208065902.11006-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231208065902.11006-1-manivannan.sadhasivam@linaro.org> References: <20231208065902.11006-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 22:59:58 -0800 (PST) Currently, the function returns -EINVAL if algorithm other than AES-256-XTS is requested. But the correct error code is -EOPNOTSUPP. Fix it! Cc: Abel Vesa Fixes: 56541c7c4468 ("scsi: ufs: ufs-qcom: Switch to the new ICE API") Reviewed-by: Abel Vesa Signed-off-by: Manivannan Sadhasivam --- drivers/ufs/host/ufs-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index cbb6a696cd97..852179e456f2 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -158,7 +158,7 @@ static int ufs_qcom_ice_program_key(struct ufs_hba *hba, cap = hba->crypto_cap_array[cfg->crypto_cap_idx]; if (cap.algorithm_id != UFS_CRYPTO_ALG_AES_XTS || cap.key_size != UFS_CRYPTO_KEY_SIZE_256) - return -EINVAL; + return -EOPNOTSUPP; if (config_enable) return qcom_ice_program_key(host->ice, -- 2.25.1