From patchwork Tue Aug 8 14:26:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 711850 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBE71C001B0 for ; Tue, 8 Aug 2023 19:09:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233977AbjHHTJK (ORCPT ); Tue, 8 Aug 2023 15:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233988AbjHHTIk (ORCPT ); Tue, 8 Aug 2023 15:08:40 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FAFD31C07 for ; Tue, 8 Aug 2023 09:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691512170; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RiiUrTAdlH1WDAwp4uIE1Px1Zl2wmGgAzSKjNn/1kOs=; b=MjAuOK9DNiy363TEeoZVZu39VaYmWCszsvavbUBaDfbG9qRhnh7iU6Y2azZMrplilhvF+Z DgRll3eELJ92WciGcgo+U5T6mCgMEoE+iejE5M54VhHFTSPEmr3OgMy+egfrf/XBvsp5PV 3imBpY6torBfTgKQv8ULQcwpJ2g7Sdc= Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-672-WTGQY-l7MMGfhKxAZCihuQ-1; Tue, 08 Aug 2023 10:27:13 -0400 X-MC-Unique: WTGQY-l7MMGfhKxAZCihuQ-1 Received: by mail-yb1-f197.google.com with SMTP id 3f1490d57ef6-d052f49702dso6632003276.3 for ; Tue, 08 Aug 2023 07:27:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691504833; x=1692109633; 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=RiiUrTAdlH1WDAwp4uIE1Px1Zl2wmGgAzSKjNn/1kOs=; b=bEjNvHT60xlFAO+yrafN7/HGBtdMFiKZEisuwfzpqXRC0bW1PVomnnqotC98I/6uF/ BqgFN6WxQ6TTHkMwHmrabewJ6oYn9zW1FCRAcRppw7YdPTSwifElH+0mSl9SzSGTvJ9f tsDkOjkJo1QjFOFi8tjBAFO6CFsv4Qum9mvjQb8Wly1uP5hL3hapVapzW2XfmlJsetA4 m4SEjbVhAMYZzfx7luIlA/lhObc0ORVqE4s4vN7aqhv5+4vdRkOXJikgW6iLD6xErYIx 0PDMGAHQTexqJfmnaZzNIUf/IFb+ufWl7GBNdwMJGMrxd5UjxlvzRVkNAcahDrmfRx+0 PxiA== X-Gm-Message-State: AOJu0YwQmGWiFqutT/m+IsTbjxwAbyVha6+B1xZ6ZhLY/9Y8QGYhBe1X x+LEY3A8c3qRJyeHl4x+d992Q0mml1XwpTMhcZ+NLyfqrQ+Qh4f90nxjk9P24usbcc1Dapp1+5R 3PlFQGf/T0nuK5SlSlOpjIw== X-Received: by 2002:a25:2686:0:b0:d4b:6936:90f9 with SMTP id m128-20020a252686000000b00d4b693690f9mr10735261ybm.49.1691504833429; Tue, 08 Aug 2023 07:27:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSZr2v/luenLdvMzRHvyNRK7DrsRTyyulfTGLb3xjOhaRryRb47w5qC1xKFlgnLqi3DmK+FQ== X-Received: by 2002:a25:2686:0:b0:d4b:6936:90f9 with SMTP id m128-20020a252686000000b00d4b693690f9mr10735245ybm.49.1691504833186; Tue, 08 Aug 2023 07:27:13 -0700 (PDT) Received: from brian-x1.redhat.com (c-73-214-169-22.hsd1.pa.comcast.net. [73.214.169.22]) by smtp.gmail.com with ESMTPSA id y9-20020a259c89000000b00c71e4833957sm2713058ybo.63.2023.08.08.07.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 07:27:12 -0700 (PDT) From: Brian Masney To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init Date: Tue, 8 Aug 2023 10:26:49 -0400 Message-ID: <20230808142650.1713432-2-bmasney@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230808142650.1713432-1-bmasney@redhat.com> References: <20230808142650.1713432-1-bmasney@redhat.com> MIME-Version: 1.0 Content-type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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. 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) From patchwork Tue Aug 8 14:26:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 713263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F37FCC001B0 for ; Tue, 8 Aug 2023 19:09:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234372AbjHHTJQ (ORCPT ); Tue, 8 Aug 2023 15:09:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbjHHTIm (ORCPT ); Tue, 8 Aug 2023 15:08:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43D3E31C02 for ; Tue, 8 Aug 2023 09:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691512167; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0NAdb78Y0H73weIO98ugUGfmSIY7jdtUo6DNWWtUmQ4=; b=VihupwTVOy0YTBacKTm2hB1sZCFpA9sBwPaqYmZRf+QJRqg19o0yuLxESaVf0fDe1BnL6d F/4XQoZg6/2LxpG+9mmgZByRc8N0vF7KT6w+t2VLZxVFN5pbUlDS+wuO4sWnMAb9jQiGFM Yt+utDlx2+Nzd+/zkF5ndZnAYNUi5Rk= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-413-r3Y5m1MENQeeJ589zNwNGw-1; Tue, 08 Aug 2023 10:27:16 -0400 X-MC-Unique: r3Y5m1MENQeeJ589zNwNGw-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-583c1903ad3so67508087b3.2 for ; Tue, 08 Aug 2023 07:27:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691504835; x=1692109635; 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=0NAdb78Y0H73weIO98ugUGfmSIY7jdtUo6DNWWtUmQ4=; b=D9JnxU/HxAwA6ZXIzP355hXuSnv50ifhs5Ngzfq5NyoNVhkAuu21+ZGeaS/v4nHwwc +VBiRS1L4e1NxoJRLXSfnmGUW63i+9s8P7V+sfAyhyuujO8qsfmmPeBa63uBPu24O//k UnHWqTm+yxX47QZv7S3Ip08bfLjl3XJCjuTR9VU6T17MzRVkvqzgdD3IyFNwqsk8wSyo LAyysLy/i3tB90KlYA2J/uV14V92FLwHctljZqPVM83VvXUhlXvCZTTJeRvZ3f42CQ2U 5/xAae96ZOSKMlpnChrrZMCxo1GhqJzBVhZ2V/u7+MP+nnTQp6HWkZ0/BwsK4iE8MKmQ Og3Q== X-Gm-Message-State: AOJu0YxpHFQjh1qGihGOtutnrGeynT0vfBNh1TJkwwnKzkpSiz+w7mjq yGhs2le84vERaPDjeFJhCLs1s8YF4Xmv/Dbh5YKjcp0B3jH4UqGLRJzP7xx3YY8OLZZO/pjbvxe ZaytKpm4Hw+/K/ozCGNzoSg== X-Received: by 2002:a25:f828:0:b0:d09:34f4:6693 with SMTP id u40-20020a25f828000000b00d0934f46693mr11968672ybd.25.1691504835475; Tue, 08 Aug 2023 07:27:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/DUUfQxavR7RqM5scoji8HEnxVztw4xX0S3NZ+ZEK++1ssDoFQJEo57gsqTValGWBjevnWg== X-Received: by 2002:a25:f828:0:b0:d09:34f4:6693 with SMTP id u40-20020a25f828000000b00d0934f46693mr11968662ybd.25.1691504835224; Tue, 08 Aug 2023 07:27:15 -0700 (PDT) Received: from brian-x1.redhat.com (c-73-214-169-22.hsd1.pa.comcast.net. [73.214.169.22]) by smtp.gmail.com with ESMTPSA id y9-20020a259c89000000b00c71e4833957sm2713058ybo.63.2023.08.08.07.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 07:27:14 -0700 (PDT) From: Brian Masney To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] scsi: ufs: host: convert to dev_err_probe() in pltfrm_init Date: Tue, 8 Aug 2023 10:26:50 -0400 Message-ID: <20230808142650.1713432-3-bmasney@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230808142650.1713432-1-bmasney@redhat.com> References: <20230808142650.1713432-1-bmasney@redhat.com> MIME-Version: 1.0 Content-type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Convert ufshcd_pltfrm_init() over to use dev_err_probe() to avoid the following log message on bootup due to an -EPROBE_DEFER return code: ufshcd-qcom 1d84000.ufs: Initialization failed Signed-off-by: Brian Masney --- drivers/ufs/host/ufshcd-pltfrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/host/ufshcd-pltfrm.c b/drivers/ufs/host/ufshcd-pltfrm.c index 0b7430033047..f2c50b78efbf 100644 --- a/drivers/ufs/host/ufshcd-pltfrm.c +++ b/drivers/ufs/host/ufshcd-pltfrm.c @@ -373,7 +373,7 @@ int ufshcd_pltfrm_init(struct platform_device *pdev, err = ufshcd_init(hba, mmio_base, irq); if (err) { - dev_err(dev, "Initialization failed\n"); + dev_err_probe(dev, err, "Initialization failed\n"); goto dealloc_host; }