Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2161380rdb; Thu, 7 Dec 2023 23:01:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IF18yZEr/uRHdE8T1/zjnqPgq9M2V8Jv6137HFjgFIb+u0tm9PddEqW9YTbtIAM2NpoSLdS X-Received: by 2002:a17:902:dacd:b0:1d0:910e:5028 with SMTP id q13-20020a170902dacd00b001d0910e5028mr4455525plx.47.1702018873677; Thu, 07 Dec 2023 23:01:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702018873; cv=none; d=google.com; s=arc-20160816; b=D2XywudPjPfi/+dk4Re/T3ij0CvSw01YLY7yD4yND7wDfvVx6RL33mdgrv/mbQY4vz qF0R71Bg0qRx62RuQrTNFLNtcLO8fEmACQlVxRKHHeQ5/b+o9TojeuTeMpx63NqId0cm JIGUNCuFXlo9+dQ3TDgusm6fLQsv/3BpJ+vtijPPF3MMPWb9LCwMPvEq+jQTpK9lc72f gn3y4ESKobjRKZN5H+h2pEqcJ2HUzMVZ+R3wJIiqPw+CQ8nA51brlMqTr6iA826Odbh4 KtzS6NY0DfRs6EJ32NLbU6w0G7j/BiEkuvTC5HPUYBa5z95hSETB145gJz2OtFCC2TBd MBrg== 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=HoOVNeTfZvxRIC3uL7kjE8KmflrgcfElV/ugTIZ3BFU=; fh=3M/8bTCRB16Lsc02X7bSCpILCqUt5UU6Z9lIcVlF+qQ=; b=TCTSiNocu9hdN1JI8g/sHlVom/Rv3dbm2UTX3+dLC8XgqUMINil2kZonvdaoOR9woC xqBd808WObIuP8UMm08jy1bG49qBlo/qrse+hCoXMthFUrWEAiHI2bE1PI66oIG76GuG iEWHwyHK1NtKgaRNoKK6Vr8XG7njW370R1oo4J97+auwYaPpRnTYiROnQ7CXe/EsQrkK kbic9NMh396FOT4/S3hPvf3VdzQAQCPiz4bkYW9f8egQ52toKPG4UHxRW1GUvJsGp38h +b0thprgxg76DiCAsimha/GdcGBFEN3w7KgyGVD3jZJBlZJpo3Gr6tRMgqMDpryWi2iD VBNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KwCmZLtz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id p4-20020a170902e74400b001d01ace7633si1091500plf.567.2023.12.07.23.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:01:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KwCmZLtz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 4AE3A836E45A; Thu, 7 Dec 2023 23:01:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573257AbjLHHAW (ORCPT + 99 others); Fri, 8 Dec 2023 02:00:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235755AbjLHHAB (ORCPT ); Fri, 8 Dec 2023 02:00:01 -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 583521730 for ; Thu, 7 Dec 2023 23:00:07 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1d098b87eeeso16091285ad.0 for ; Thu, 07 Dec 2023 23:00:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702018807; x=1702623607; 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=HoOVNeTfZvxRIC3uL7kjE8KmflrgcfElV/ugTIZ3BFU=; b=KwCmZLtzfSCH+x9hWctFcR/nNTj+bpNObKtuFEb3EGFPHCMpr9jV9m+WJQmAeTKd4y tagRMoCVcQEjRlSbvbyeL6lpIhUUi0NsydWMTPVuP+7ghJuICuzcPkyT+MH8Vc70ZN5H cKWV8cop1/h6bljcUrVk1vIQJ9XxSGXxGgjOjToYJsz8nTxG5pkCvvj/pz0oZ/SL6DXr OEEPbHxOrpJPPWxy4aSWPMgX7ssCMeon2UIHRC93lRvRCGRwVWQO8kNo3t7FYdDinA1c KzVEDmG70NT8VYjI69Dc0iinNp0xr1wJsuNMO2o2P5YtNI4eTLTb3gBlXuHNv7qu9VBp LWGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702018807; x=1702623607; 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=HoOVNeTfZvxRIC3uL7kjE8KmflrgcfElV/ugTIZ3BFU=; b=UMtf+AFLmyM/GXviLfcbq6qaYJ4yus/78n1iuRL/EKjV2EVrchWhsJdkQsCcBBL34e Lhr8Y84kpIhuD/glFtCyHulQsiQ7slV7gx8JNBAUgKXL18133J8joJMWxKAEMaKauQKj XSnoDNUlPqmBJ381TM1mNva2bDN2J45+GUNSNnkfRM9U27KZFtO10+21spowPOvG7Fxg tyvqsLZG1Iuz+v0bBIwZatM+aJvS4MToXI9iUUKu68moMiIoKUBRCK5gVweFZOeI6crD Z5/gQK8BTyMWOckXqKSd9940KvGkyhdWpFRnivClJhwsJ7bOH5KBHlih1BdaReJFVEa2 QezA== X-Gm-Message-State: AOJu0YwQ+y5oI15C8bVsukV2MAM8j5pu2ORKFKVkYFSNiVhC6B3rMFej imo94joA6YRvQA1gl7aNbbRm X-Received: by 2002:a17:902:d2cd:b0:1d0:6ffd:9e22 with SMTP id n13-20020a170902d2cd00b001d06ffd9e22mr4168124plc.116.1702018806680; Thu, 07 Dec 2023 23:00:06 -0800 (PST) Received: from localhost.localdomain ([117.216.123.142]) by smtp.gmail.com with ESMTPSA id n8-20020a170902e54800b001b03f208323sm934263plf.64.2023.12.07.23.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 23:00:06 -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 Subject: [PATCH v2 10/17] scsi: ufs: qcom: Use dev_err_probe() to simplify error handling of devm_gpiod_get_optional() Date: Fri, 8 Dec 2023 12:28:55 +0530 Message-Id: <20231208065902.11006-11-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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 07 Dec 2023 23:01:04 -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". Reviewed-by: Andrew Halaney 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 05a9a25bc34c..ae9fafa49ded 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -1148,9 +1148,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