Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3423359ioa; Tue, 26 Apr 2022 03:28:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfMYWu6S374UnySJ1JRzUNfzn8PZIWHcyHyq0DPh/+xICTxBiY/g+thU0p8HYvm8FocdVF X-Received: by 2002:a17:907:9719:b0:6f0:14b6:33e9 with SMTP id jg25-20020a170907971900b006f014b633e9mr21465075ejc.734.1650968907445; Tue, 26 Apr 2022 03:28:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650968907; cv=none; d=google.com; s=arc-20160816; b=k9YLorwaF+nYVvnHFDQkTiGojYQxQdkcJIlNqAvC3SBLXIuiDE/LJJwQr5PHPmzDmm SzsW0/vh/IUO5oDYe0gIcbKpAn6w3S5NHAvLzdPDWT1QUJK57INeADjnbtmKBc/gNBwG 9qlePreb/sMOXqb+2HUMZHaLhyzc4dnGbYEEL8wlgdG7QmzRVQhDvzsN+bSn1TiANfau CU60z/4yH/+B7idaeodjd8ZjOgv1Fgj3V2sqiRkeFVciUlEfWqEeY4Qdq05licXLzJ3L ALAOCTxMTDhMVsVaikykgwO8x5G5sE4i4/25qLrZ+lKlx3USzgXQLQR+A5IYLfz4wj7H 6fnQ== 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=DnYEkw8ulZZ9zI2h3SIen3Sz7tMMDf8FghFH38SaqtA=; b=NRyzXTJwyDN34ThQBOOSKsBT/hnI0/4XWZ4NgEGKnu/4it8cJ3Vlp6H0GCaEygqwQW tvfNGvK2YSU5hgy5JuUNvWGIhSG4XFKEt6xSGK0M+a5KZ8bQIpWkOm6E/zgypC9mJ5kC kRIgscfCT4h8JHa5Jajsv1JlRfD29/lo4e1SsliOfpsHF9cUqbSCAlDBUPqsH+RoDqMM qvcGjlsiMzb75TSAkuoaT56PLu7AtsCQojwKh3IomGZLKFDFJa8zhKOuTVgdcl6tG7es FfcckuKvIKe7ir0hDKZjzDZvKInTAJojDVGlqb5wxpim6sniLlYUxsr88s3M8YFlNuCS gjnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TdvZFGNN; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb7-20020a0564020d0700b0041d6147352bsi18068999edb.528.2022.04.26.03.28.01; Tue, 26 Apr 2022 03:28:27 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=TdvZFGNN; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240583AbiDYNC6 (ORCPT + 99 others); Mon, 25 Apr 2022 09:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239806AbiDYNC4 (ORCPT ); Mon, 25 Apr 2022 09:02:56 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2308113FB3 for ; Mon, 25 Apr 2022 05:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650891578; 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=DnYEkw8ulZZ9zI2h3SIen3Sz7tMMDf8FghFH38SaqtA=; b=TdvZFGNNiKXbuw5TfT+DufT5lE6My53TbGe3/1LmTXUYJxpngjVK7GFkN5kuK7EvKkEIu1 iVLCIiHQmts/sFgLRlZrsZhohJERN2v139BNMQwxwgC/K9kZ5+lFL+qvAttXVm5fi6Aki5 YjvaPcNJuy16/EuioXbem90EWYF9CDk= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-eekxLXqQO-OJFkKCj6nInw-1; Mon, 25 Apr 2022 08:59:37 -0400 X-MC-Unique: eekxLXqQO-OJFkKCj6nInw-1 Received: by mail-qk1-f198.google.com with SMTP id s63-20020a372c42000000b0069ec0715d5eso9617847qkh.10 for ; Mon, 25 Apr 2022 05:59:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DnYEkw8ulZZ9zI2h3SIen3Sz7tMMDf8FghFH38SaqtA=; b=pEhKsKeFj4y1zSrOo8o7gXE2GNIeuR/+f4wjt+Nh1W7iyR1gW4SKtgcTeYk9sGBLMv 8hqj1jO8jqsGBf7mvi8wmhKnz5iux++lCWVfkUOegQ33CGTGgoFg3uxpCOgVzFB9RbMo gHVXgqKr0/pFQGFLC540C6w4U9CdIU2yLN96BSrnVkku1u2gnBiZBbnkw50was0h0bz0 8Mf4exIHufj5+YBc+3+lBq5vVt3KgmR7xyV2LO4jss5akt8IB6PUe9mTant1hbQG+LyA 1i6bjC6floVXhBttOMJDvY4Ei67Ly+psCPlyavSir4AodDfvDavZ3IXN5ixLwveDT07D xxuw== X-Gm-Message-State: AOAM532YGaRtRGRT621W1dZ2OpuYdrnnnVcuPzUXpQ/MgLSaA3V699JO f2ptxYuDUfnIC91+Dys2JfmL8QTR8C39QEDUEJNsJzVeiEoKFTjOJSu+C1m14Ha6mHYx4SbXrNH jD1BTIEbrJc69L2icqnqGa0Wm X-Received: by 2002:ad4:5be8:0:b0:44e:b1dd:49dd with SMTP id k8-20020ad45be8000000b0044eb1dd49ddmr12215251qvc.57.1650891575420; Mon, 25 Apr 2022 05:59:35 -0700 (PDT) X-Received: by 2002:ad4:5be8:0:b0:44e:b1dd:49dd with SMTP id k8-20020ad45be8000000b0044eb1dd49ddmr12215241qvc.57.1650891575205; Mon, 25 Apr 2022 05:59:35 -0700 (PDT) Received: from halaneylaptop (068-184-200-203.res.spectrum.com. [68.184.200.203]) by smtp.gmail.com with ESMTPSA id v14-20020a05622a144e00b002f1f32f86a6sm5974951qtx.5.2022.04.25.05.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Apr 2022 05:59:34 -0700 (PDT) Date: Mon, 25 Apr 2022 07:59:31 -0500 From: Andrew Halaney To: Bjorn Andersson Cc: Manivannan Sadhasivam , martin.petersen@oracle.com, jejb@linux.ibm.com, avri.altman@wdc.com, alim.akhtar@samsung.com, linux-arm-msm@vger.kernel.org, quic_asutoshd@quicinc.com, quic_cang@quicinc.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, bvanassche@acm.org Subject: Re: [PATCH v2 1/5] scsi: ufs: qcom: Fix acquiring the optional reset control line Message-ID: <20220425125931.g3ub2fprsfa56bl6@halaneylaptop> References: <20220423140245.394092-1-manivannan.sadhasivam@linaro.org> <20220423140245.394092-2-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 On Sat, Apr 23, 2022 at 07:59:17AM -0700, Bjorn Andersson wrote: > On Sat 23 Apr 07:02 PDT 2022, Manivannan Sadhasivam wrote: > > > On Qcom UFS platforms, the reset control line seems to be optional > > (for SoCs like MSM8996 and probably for others too). The current logic > > tries to mimic the `devm_reset_control_get_optional()` API but it also > > continues the probe if there is an error with the declared reset line in > > DT/ACPI. > > > > In an ideal case, if the reset line is not declared in DT/ACPI, the probe > > should continue. But if there is problem in acquiring the declared reset > > line (like EPROBE_DEFER) it should fail and return the appropriate error > > code. > > > > Signed-off-by: Manivannan Sadhasivam > > --- > > drivers/scsi/ufs/ufs-qcom.c | 10 +++++----- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c > > index 0d2e950d0865..bee81b45299e 100644 > > --- a/drivers/scsi/ufs/ufs-qcom.c > > +++ b/drivers/scsi/ufs/ufs-qcom.c > > @@ -1002,13 +1002,13 @@ static int ufs_qcom_init(struct ufs_hba *hba) > > host->hba = hba; > > ufshcd_set_variant(hba, host); > > > > - /* Setup the reset control of HCI */ > > - host->core_reset = devm_reset_control_get(hba->dev, "rst"); > > + /* Setup the optional reset control of HCI */ > > + host->core_reset = devm_reset_control_get_optional(hba->dev, "rst"); > > if (IS_ERR(host->core_reset)) { > > err = PTR_ERR(host->core_reset); > > - dev_warn(dev, "Failed to get reset control %d\n", err); > > - host->core_reset = NULL; > > - err = 0; > > + if (err != -EPROBE_DEFER) > > dev_err_probe() does this comparison internally, so you can omit it > here. > > With that removed, feel free to add my: > Reviewed-by: Bjorn Andersson > > Regards, > Bjorn +1; well with that change in place: Reviewed-by: Andrew Halaney Thanks, Andrew > > > + dev_err_probe(dev, err, "Failed to get reset control\n"); > > + goto out_variant_clear; > > } > > > > /* Fire up the reset controller. Failure here is non-fatal. */ > > -- > > 2.25.1 > > >