Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4925173rwb; Tue, 8 Aug 2023 16:50:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBvT1QQmmq19QipMw+4+/czP/U1Z8mazgjgKAvSQyjFn6akGkrZwGazE2hIAGxa97/nukk X-Received: by 2002:a17:90a:718c:b0:263:4164:dfba with SMTP id i12-20020a17090a718c00b002634164dfbamr896949pjk.6.1691538624608; Tue, 08 Aug 2023 16:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691538624; cv=none; d=google.com; s=arc-20160816; b=i9qh/xi0yeEkXeeYlMmdUJ9SHs/cnye2CePjWTjywtlKmCgccbU0EdjaEqVzbVH0tu /lQK6E6cvAq22QiEjBBvSDNVh6R49aAk5fTBWcdkIAq1mxxPUAtbMu5xpvzhwRfd8iZK 2b3rp8biFK2UMvb2kpzhVSPia1FXFPwA0mOUntkwW3uK/Lgi7alJzVlMwltsY7MJCjQ5 VLphC59hS9CgI8yatbo/zXASTRcibm3wTQeeZwxws31KdqWeKixqLfl5stYqCVfXyhq2 428IKyXfRUBQzgpVAStjOIJ9NhvIU9XhGfGA/mPlmOO57qSHhcvj41NPH5643OwL5eHd cmEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=5I3ARFB3ZlH4m4HRqWi5eYmGenJa2WJgy9folBuUU4w=; fh=pUN2hPlqvsj6oCsGjaYCD1hYcwXEm9bYy3O0fk4jVik=; b=Mb8v7k/bPehFNgyTrjQOTj3x2QPCECc8c5dgxGKLbmzFCOreD7TcMsD4JrMvh1nSCa 53VggVMztTcYUP3DdeZoM8y4cbyMOJZgBs52xau0qbr598d7JnCW7OeYqZ9ov6bcC0nz 15nFKKd7fme45tWP905C+fRtsG4XymiFFmmlvr57jK7Xy5Y8GDBGesVJzyiaSW7f26Vd 4lWz8yeZgxp5fsgLU/OOwB5KWsuBvMuYNO1hHxFH9Yc5xYfKGs3QcaF0vB6nbEgd2JBV ZmNm7rz7374vO0MiNFgWft6P+dc4hnlh5AHAX6wyD0Kbba+F4DX8Ay6nt+YBJa3Z2Z6g gByQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=oduTdsOb; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id na10-20020a17090b4c0a00b002681289fee1si214573pjb.107.2023.08.08.16.50.13; Tue, 08 Aug 2023 16:50:24 -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=@hugovil.com header.s=x header.b=oduTdsOb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235606AbjHHVIH (ORCPT + 99 others); Tue, 8 Aug 2023 17:08:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234470AbjHHVIC (ORCPT ); Tue, 8 Aug 2023 17:08:02 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0637E5A69; Tue, 8 Aug 2023 13:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:Mime-Version:Message-Id:Cc:To:From :Date:subject:date:message-id:reply-to; bh=5I3ARFB3ZlH4m4HRqWi5eYmGenJa2WJgy9folBuUU4w=; b=oduTdsObD0JpHoVqfalNSLjxSm xUTafpp4fA6pMSwmRwHkOP24fR5tRyTPtPWYyEAMB/sbhTUQIRH4Rrd/mioDXgFRw1r9yTWQCCEM1 bpowduIgcsGB2I2A5U7sWdceV6zO2i46PbpoeigmdJ6Zui/ie0dnuxZGWsAySyOOFSH8=; Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:59142 helo=pettiford) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1qTTKc-0004rm-0X; Tue, 08 Aug 2023 16:29:30 -0400 Date: Tue, 8 Aug 2023 16:29:29 -0400 From: Hugo Villeneuve To: Brian Masney Cc: jejb@linux.ibm.com, martin.petersen@oracle.com, alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: <20230808162929.a1b784ad42bd346cd87747b9@hugovil.com> In-Reply-To: <20230808142650.1713432-2-bmasney@redhat.com> References: <20230808142650.1713432-1-bmasney@redhat.com> <20230808142650.1713432-2-bmasney@redhat.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 184.161.19.61 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Subject: Re: [PATCH 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 8 Aug 2023 10:26:49 -0400 Brian Masney wrote: > Convert ufshcd_variant_hba_init() over to use dev_err_probe() to avoid > log messages like the following on bootup: > > ufshcd-qcom 1d84000.ufs: ufshcd_variant_hba_init: variant qcom init > failed err -517 > > While changes are being made here, let's go ahead and clean up the rest > of that function. Hi, you should not combine code cleanup and fixes/improvements in the same patch, split them. Hugo Villeneuve > Signed-off-by: Brian Masney > --- > drivers/ufs/core/ufshcd.c | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index 129446775796..90d87cf5e25e 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -9228,17 +9228,18 @@ static int ufshcd_init_clocks(struct ufs_hba *hba) > > static int ufshcd_variant_hba_init(struct ufs_hba *hba) > { > - int err = 0; > + int ret; > > if (!hba->vops) > - goto out; > + return 0; > > - err = ufshcd_vops_init(hba); > - if (err) > - dev_err(hba->dev, "%s: variant %s init failed err %d\n", > - __func__, ufshcd_get_var_name(hba), err); > -out: > - return err; > + ret = ufshcd_vops_init(hba); > + if (ret) > + dev_err_probe(hba->dev, ret, > + "%s: variant %s init failed with error %d\n", > + __func__, ufshcd_get_var_name(hba), ret); > + > + return ret; > } > > static void ufshcd_variant_hba_exit(struct ufs_hba *hba) > -- > 2.41.0 >