Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1188298rdb; Wed, 6 Dec 2023 10:54:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDs17U1ck/WICvpNzq+52eLyPqXbPwM2kuFC5dOGqddldIW5YBJnJ0MUZXhlxTBTiK5hOt X-Received: by 2002:a05:6a00:18a8:b0:6ce:7af1:1bed with SMTP id x40-20020a056a0018a800b006ce7af11bedmr1155987pfh.37.1701888871032; Wed, 06 Dec 2023 10:54:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701888871; cv=none; d=google.com; s=arc-20160816; b=xPQTiy5TE4Vz7s2EFvLNb2NFaiHq0kUXW6JsaxnMQ7HengMNjmxNOlbShbSnMjwKVd 8QkDq3j+aoZaXEO3fX0VKjHGCRwbERQf8nK0d0uacYooR13NlCGLIC8ETnQF97YVgTJ5 hB5MzL7BshKT/Z1/sGVkns6GhvShaMhXCVvN4bqMMuw29aCqnj0HqsBTCPA3CxFjPn5b 9oiERLyM4p1Fjk3Y5bTYQ+KDccJlc6W6fxYSrkUK3ANWdoZuFsVCBelSzKAgo3U/LT+s T8jg0TR2lTgJQJB19PaGSqWXzMjrp3iUMwoMmF5SZgzOYjDnTQo13if4Euo91eYGL1hc 4yJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2T2oM8n7ES3F56mk7P89karRriuSouYwO1C14uj3RQs=; fh=rb5sR2rQa902X84yik1TqLU5qpRkQt89dLyRG+6e3gw=; b=x8hwb2z6/DOGoMK+zTolrQ3CwdPSPUkijKRomwcfn2set3IF5djSPG3JVMC+c5M5a3 Dt+tevRSyf0BJOn3mlp0oy8lyfutI4VWfBgGo+aH6l54jReLIeYhMRRGA2rN58n3slWw pD11sQWaafqWhlcWF0Qc72FgZviyivysxWLarPKoDdQBF9f1FnHtmZroqfp+Rl6xue2n NAtkjYfN6xi2U5pagnubKaXS38CaxolwfqLK3CrWyyHawsVRdQSyOkjW577hMkGUQPLU jigaPiXRnZvhVcDq7N4oLiBWeBLvNGeJxZx3xcwm06og7smQ2owpwHKdDOleW6PGbbDr EOmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JimC7r6Z; 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=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id j4-20020a654304000000b005bdb6dbffe7si290196pgq.273.2023.12.06.10.54.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 10:54:31 -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=@redhat.com header.s=mimecast20190719 header.b=JimC7r6Z; 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=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B640682A1750; Wed, 6 Dec 2023 10:54:28 -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 S1378628AbjLFSyM (ORCPT + 99 others); Wed, 6 Dec 2023 13:54:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378623AbjLFSyL (ORCPT ); Wed, 6 Dec 2023 13:54:11 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C13419A for ; Wed, 6 Dec 2023 10:54:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701888856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2T2oM8n7ES3F56mk7P89karRriuSouYwO1C14uj3RQs=; b=JimC7r6Z9ntYUll1MLERD24H29srfTXhws9y3VUKI4C5gIluvuDExux/eeh1RYxoOMUMes ZdVch5k+KA0GGvF8l1DG6eYJjffWV7QjRmUDDOxMkczhKG5UoyvDHNVzSN/SvuIYujIr21 s8UFSLB0c79YUaiQgGiDeofJrIUzJgs= Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-223-S6fuyit5OTO51ppnRR-u6w-1; Wed, 06 Dec 2023 13:52:43 -0500 X-MC-Unique: S6fuyit5OTO51ppnRR-u6w-1 Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-58e2b7e4f94so194139eaf.2 for ; Wed, 06 Dec 2023 10:52:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701888758; x=1702493558; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2T2oM8n7ES3F56mk7P89karRriuSouYwO1C14uj3RQs=; b=jkoRMaYgMDMHyC+W89F8LNtto6+slhSpGXWsOQL8KrZWKzLh8hsCBU6Cs8Tr8Zoh/A +OBr6uW+lrVjs7EXpgM83+qE1Og68TWY9p4NYsUsEas5te/HfzrREXTh/WooAFBdL+jO wcFAE+QFjcYo7SjHGgovdoh1k+FKMh1YjDz+hs+NG9e4Pvuy8lW0PLtRWveebbM2h8iT pWu8c7mpYcDPJ8FpCgwiwvDNeI9ma+nvwnM2k+VuuP+OeaB5sTSw3fYJWNGSLJ7oq/72 0eQ30bMVKmjOXjxkmThJZEoQn91uYA3PoVgx1SEgNJm78wJwwu4sS3FYD8XXuKxYus7J NNtA== X-Gm-Message-State: AOJu0Yy6o7WX/zJ4kQWUV8li5iG3GY3spCO+dI7IgAf9wLiCktFiluqK CPza4lwZaRFMMk+3aOmNE306oOVwNj2VZ+1Zjdgh+bgNZAPs6XhayG40JRyXn3rdHCzDaVudZVP KLaOw+Yvp5BRVBVd6F2GO0vFn X-Received: by 2002:a05:6358:9049:b0:170:982:5611 with SMTP id f9-20020a056358904900b0017009825611mr1734948rwf.32.1701888758714; Wed, 06 Dec 2023 10:52:38 -0800 (PST) X-Received: by 2002:a05:6358:9049:b0:170:982:5611 with SMTP id f9-20020a056358904900b0017009825611mr1734939rwf.32.1701888758442; Wed, 06 Dec 2023 10:52:38 -0800 (PST) Received: from fedora ([2600:1700:1ff0:d0e0::47]) by smtp.gmail.com with ESMTPSA id s6-20020ad45006000000b0067a3ad49979sm185483qvo.96.2023.12.06.10.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 10:52:38 -0800 (PST) Date: Wed, 6 Dec 2023 12:52:36 -0600 From: Andrew Halaney To: Manivannan Sadhasivam Cc: martin.petersen@oracle.com, jejb@linux.ibm.com, 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 Subject: Re: [PATCH 10/13] scsi: ufs: qcom: Use dev_err_probe() to simplify error handling of devm_gpiod_get_optional() Message-ID: References: <20231201151417.65500-1-manivannan.sadhasivam@linaro.org> <20231201151417.65500-11-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231201151417.65500-11-manivannan.sadhasivam@linaro.org> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,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]); Wed, 06 Dec 2023 10:54:28 -0800 (PST) On Fri, Dec 01, 2023 at 08:44:14PM +0530, Manivannan Sadhasivam wrote: > 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 Reviewed-by: Andrew Halaney > --- > 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 > >