Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1107402rdb; Fri, 1 Dec 2023 07:16:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbdcUqo+qfGdNiDCivfewb+LdjhLGRHcREe2Kc/k0jfyIzTmm/8VWefCaVl0lIWoxvDn20 X-Received: by 2002:a05:6a20:3d14:b0:18a:b5c3:55da with SMTP id y20-20020a056a203d1400b0018ab5c355damr35498859pzi.10.1701443791721; Fri, 01 Dec 2023 07:16:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701443791; cv=none; d=google.com; s=arc-20160816; b=qUAmdk6MdflctKnAhuTRp6BIx77Ekd8YkrVwRUXtva47WBSM5OniXyF4u3VJ9XOMK+ Km4AXfGlgD+Dn9h9//oeM+JXLyKTAgGJHO+d5rz//tN8eI+4Xs2X73HxbMDjhc3+RviJ X7aF+c8/kMfomM1YJAwR29aJwjeuNZm4unN1+fLz/Kwu2/JMvyz9fuLe3XThDpDM6pyl 99NM/Oo8FjKhjexBW2miR5tavIVo/eWaqpo57sbgB+FlsOXJXF5pSN5WYqWzmGZw5qEl xOOvIskCItg494EUDX3cKJBqAtcAXLNbGqt2qRmoLYyyKt2HgHaqjcEE4pKh6EY5ZXKH gfgA== 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=64ppbjLuXnC3sRRee6xAp4YeL9+LAF3VOykBfQp43DQ=; fh=O5Q8LUawuCtrJk5mJG0Sz+mqyfwsmdVT26FvWpOyqg0=; b=iJ5VMAfYQ2X3/6sXoYz2chj8v0lQJCFaa0qWVqE2wk5j8m2+ses0a+Ibfa3BUCu1iA OoiYeUJSermaVmxO8FyyKHceS4r267jRTrSf12/Og+SXkmteWc92woG97D2aGrRWmwru m8kS9veOJNaahbQRaG2Vbgg9jcqkQJDdd3Q1cHyIQAIJFuUo0gKxd6qacD3mPjxF6eOQ NDrQxK2/w1gRL8ZzRSpFSfQJXPy4++jA3PhUbJn4g+8SXmrwg55bdQwJ63y4c2AojBbJ irQyOMBWF8grajpbHF3RbRyp9lQTAN5jt+UqPgqetp8oqK2dLgWsFzgwX+Og47Cfcqb9 9ACQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NqcaiHbD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id t18-20020a63dd12000000b005a073e0cc9asi3463591pgg.803.2023.12.01.07.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:16:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NqcaiHbD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 22EDD8078628; Fri, 1 Dec 2023 07:16:08 -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 S1379387AbjLAPPT (ORCPT + 99 others); Fri, 1 Dec 2023 10:15:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379442AbjLAPPK (ORCPT ); Fri, 1 Dec 2023 10:15:10 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECF97173F for ; Fri, 1 Dec 2023 07:15:09 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6cdce15f0a3so2572406b3a.1 for ; Fri, 01 Dec 2023 07:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701443709; x=1702048509; 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=64ppbjLuXnC3sRRee6xAp4YeL9+LAF3VOykBfQp43DQ=; b=NqcaiHbD9GEc1QdsywbH+1UAg6UVzN8fpEYFb9BqCPy8/OjnHyfEE/WF58C8a4gTkx wLcbXFvyQTq9BWcDY7/nuEgaV5OuKl9+L4xbhxUdFNU/KhlDvbNpcvpbgDzXl9NW6C8I 3Zwg72HTkUQJgwNRYUnnNrzwsBgj3KJUeyzy5JU/ikEYk1kseUj4TkcngNmSa7+VAHHE 4CD7wcv4fmktMwc/aWiqdm5UWfvfeTQnQ7laJkyUugKJTAQXxT7gK5Jikk23GhffpnZp 5hMuCRI94o1tvBCms84+ZqzCn5nR3TXnc8TwyNHp6p1ztZV6XB8dSSwraKG+b+Hf7xSv sK7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701443709; x=1702048509; 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=64ppbjLuXnC3sRRee6xAp4YeL9+LAF3VOykBfQp43DQ=; b=BFZN36/ebPNF1ol/iwXZsc3EN0be/lWGRChi6V/64cSZx2+lIgm+9tm3M6ChkkMDFQ rQqr/WuR2g8hTSgiRVKFQmlX11L2fdFHc13VE2VxWNjdAummvmDS2JbGEH0eQts4DAfV F4fgAAg5XBchAv203kPAa2jxNAA+MIHO4aKqUdTpTqYmUe1YqPcjJNkEFBIi44s3Hk1T uf3v/+kA4UCWLj2zY2uB58BtcUqRdhpxiWKWoQAm5nZsBMnro/MlfZ44PrNsJPQ41Dg2 NvbnwEHSE4v8/m4P+iH3809qeBCboK6Fcntwh/DML2YYvNZQxN438EnT9fuGufD8OPac pW3g== X-Gm-Message-State: AOJu0YyHem/7uZ60Dgl8PAgglkFY2OhJ7LgXjZCRJ15Qsq/pNwTPG0jG bGS0Z28AKzDeQYPbwJ3XYGxG X-Received: by 2002:a05:6a20:918b:b0:15d:4cf1:212e with SMTP id v11-20020a056a20918b00b0015d4cf1212emr38989386pzd.4.1701443708902; Fri, 01 Dec 2023 07:15:08 -0800 (PST) Received: from localhost.localdomain ([117.213.98.226]) by smtp.gmail.com with ESMTPSA id s14-20020a65644e000000b00578afd8e012sm2765824pgv.92.2023.12.01.07.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:15:08 -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, Manivannan Sadhasivam Subject: [PATCH 10/13] scsi: ufs: qcom: Use dev_err_probe() to simplify error handling of devm_gpiod_get_optional() Date: Fri, 1 Dec 2023 20:44:14 +0530 Message-Id: <20231201151417.65500-11-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231201151417.65500-1-manivannan.sadhasivam@linaro.org> References: <20231201151417.65500-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]); Fri, 01 Dec 2023 07:16:08 -0800 (PST) As done in other places, let's use dev_err_probe() to simplify the error handling while acquiring the device reset gpio using devm_gpiod_get_optional(). While at it, let's reword the error message to make it clear that the failure is due to acquiring "device reset gpio". Signed-off-by: Manivannan Sadhasivam --- drivers/ufs/host/ufs-qcom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 218d22e1efce..a86f6620abc8 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -1146,9 +1146,8 @@ static int ufs_qcom_init(struct ufs_hba *hba) host->device_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(host->device_reset)) { - err = PTR_ERR(host->device_reset); - if (err != -EPROBE_DEFER) - dev_err(dev, "failed to acquire reset gpio: %d\n", err); + err = dev_err_probe(dev, PTR_ERR(host->device_reset), + "Failed to acquire device reset gpio\n"); goto out_variant_clear; } -- 2.25.1