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: 132811 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2361105vqr; Tue, 8 Aug 2023 12:56:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGMskr41JycJRoHQLP6kMbFMPP9qDTjfFkMh6negwhoNm9XfMGuK6BIxXhq9uAbZpsx3aQB X-Received: by 2002:a05:6870:4215:b0:1b7:3432:9ec4 with SMTP id u21-20020a056870421500b001b734329ec4mr775351oac.10.1691524612423; Tue, 08 Aug 2023 12:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691524612; cv=none; d=google.com; s=arc-20160816; b=l+9fIJC5G7fqen8xdN/WWF6NbaEafnn5MG/06iXsVhnbWW1wNJdvIvXnUaVXKL9qs8 d4Fp41r9o8+TmEUeD4RI8tS9awUIsS3Rzi9fAb1eD+ME0OqZPlu+Wz2VP78Mj7Fh2Uv/ l/fwYkmy9UMGpCU2VgbNNWzuNfKDCbo4Pby7rwsSk2TKScPkEoaA4MSO4nmc8rfg74ga oeo1lMOJTgQEpwGoZTdnI/OwvdPMwYfEn/L5NexgdFOenkEo/w9SMVV+zkuYxOYdBesF SsQL/KmVNhu+nSaw6Rgnc4ZV7/CaKPav/eAQVBywsNFtIAfDYzRc2YAdHigE6g92zjhg 5LWw== 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=RiiUrTAdlH1WDAwp4uIE1Px1Zl2wmGgAzSKjNn/1kOs=; fh=K50xCrIVmjpn9b+86NMGEYY9nBXdNkmVeTtW9YyjspM=; b=jpA/8VNIrielVajFo7pzjZ89x+UVweZFj+YVl/DsBpRXtn941OI2c0LleLuiKI7mfD NLqoSeI9T6zHeFBZKEFoKHG8Q9VLDP+7V1DyP+3QXzwO1gPrMBJD+EXVfPJCifL0B4d3 U25DlPGDu7sbAMm+F6axjoM1MkddRuPqDi9j6aIWY+2Fm+WmFiywbqpBdV+RX+Wgq6d5 6JroV+JFXIJa7Sb4P4dl90+oG2jYU9F3S1VOnSeu9DPbmAZ7gweFXiD22K+13EifTvsJ 3kDRHgLjyUN1wJvUH01iJARNsf2xWiY2WsmIaqhKtcsvpt7v2k8yJaMF9v4ATZ3v3i4i KtOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VmBFJoX5; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w34-20020a631622000000b0055b0f40083csi7440827pgl.639.2023.08.08.12.56.36; Tue, 08 Aug 2023 12:56:52 -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=VmBFJoX5; 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 S229644AbjHHSgW (ORCPT + 99 others); Tue, 8 Aug 2023 14:36:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232376AbjHHSgA (ORCPT ); Tue, 8 Aug 2023 14:36:00 -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 4BA1B132FB for ; Tue, 8 Aug 2023 09:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691512152; 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=VmBFJoX5HvT54Vt+aSZzXQQoLa+2U4tPFhQQcHX0cTDRV6CcDTt/2eu/aHBPJXRYFNtdYd 25J33MRvy0XeWUn0qMuN1CVqA/KXWEUn5sp8Jex/aCIAD0hXt+PuIEipXn4JzU+n73GDjh O86eis8l/fpUwgHeC0ALLqSSp65bk3o= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-98-Bi6bfTpvPiaIaWFhgRLbmQ-1; Tue, 08 Aug 2023 10:27:14 -0400 X-MC-Unique: Bi6bfTpvPiaIaWFhgRLbmQ-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-585f04ffa3eso74487177b3.0 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=SnSAZlqvdjKiwTeuMDkxPmUJfHJ+UaJySi0n14fcDjj4ej3pjlbEedEt20+B+MAGF2 FRiLoD+bpkzLCBa5IIB3z6DuOH79PJ9SZwQaMOM3bcMj0k42cBVqtnN5GC1nb4dapJGK 9Os+NEpe/vA8h4ihVJe0U6Tc4LH15CBPLPbAAqRdzJWXSREfrzMSgKtU55TroesiRPi3 hZsPE5chlR6tRtM2qshx/K4lU59D5AnuC2CyGPh7rXtfuIPlUVgrrkdxFzMXQUfDpjAP +mBc8WcHSRTrLiiHZYe7ImvFzFBkh6GkSpNQHMVKCSfv8RZ4MhX17kdeDBAxe2HT+cqt 4VZg== X-Gm-Message-State: AOJu0YzyxGPOCEPlt5YK0993BEYsoYvwgr/Nqfc0LxwhCKZKvvPJs3Ve F/i8+6RQR+Seye8iYVP54ngJYQ8d6OpQTiAkRM/KoNgPSMulardJFCujFx64gF9ukchpnH3CL7R sLiTMVin3hb1FVRitbJtOFU0S X-Received: by 2002:a25:2686:0:b0:d4b:6936:90f9 with SMTP id m128-20020a252686000000b00d4b693690f9mr10735262ybm.49.1691504833430; Tue, 08 Aug 2023 07:27:13 -0700 (PDT) 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773692111678697457 X-GMAIL-MSGID: 1773692111678697457 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: 132906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2417207vqr; Tue, 8 Aug 2023 14:57:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFoxu3xPTGgTqqAMuBPqrsfkwDBc/kTS4N9Aw7tAxYNhC6ouVMq9RPCh+o4ZxOVOXPxmlps X-Received: by 2002:a2e:9a8a:0:b0:2b6:cdfb:d06a with SMTP id p10-20020a2e9a8a000000b002b6cdfbd06amr584949lji.22.1691531877947; Tue, 08 Aug 2023 14:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691531877; cv=none; d=google.com; s=arc-20160816; b=UlH6546lZHNj3Nx8L0YirhdJJ2yyYYv01G6rKyqxslVip3wUOvDo07KxtZ3JE6/+nQ v4aHzQ0Lr8yk7dlnsuMjc5Oa+kM+5OlRH5MWhhQ2oUJ9ImC2NKMueaC1jpCnqhH2A+U9 74KfGduDC0eRnhiFRXzXp1fj7vyr2zUgebRzr8j9eE3/Y9BqJArSFN21dGjb6qSY09Sb K/jHzjumu8cJ+ya4wOpu7K4vVf+72vykz1CuDH+ta26ZDfICnbv+RGV3qZLORQQyITZS +uMzXBfnnehm4rt4hvbTui6OwsIHKkJWm+Rt1FR/djLSgtwrNLyg9PzYOUInR0Jd5MvH HH9Q== 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=0NAdb78Y0H73weIO98ugUGfmSIY7jdtUo6DNWWtUmQ4=; fh=K50xCrIVmjpn9b+86NMGEYY9nBXdNkmVeTtW9YyjspM=; b=qVYmYyN6+yuoUO2kLNdsct0rBb899btal4JEH/On2T9lLUnXLceQkkoraMkJG01yGT anM/Fme8X/j0b5fKJ4ExPE2XQQNXgZD/B/zPPbayJBt3xNPwCMcYXMO9r7yZlPFBpbQ1 YlHV+4DVHkKLu7C5EQyf1ILoBdTl2ZgDcLLTQ2alDa/YpG30pupmiB34Kjk+S1e1b+mS kMX4TKzG+fnU2wx7n+xYrn7C9hRXrnNr4G1gpmFPZznebonp8sXG19JpCVvbA08LzZly Qa132PL/FiauxH5DgwVqj2XB5P7YZFQ624eYj2pMJHenC4VzLqqJZ7r3WyisbtU5NNrI 6J3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VihupwTV; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p21-20020a170906229500b0099bd5561245si8349760eja.54.2023.08.08.14.57.34; Tue, 08 Aug 2023 14:57:57 -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=VihupwTV; 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 S234766AbjHHTJT (ORCPT + 99 others); Tue, 8 Aug 2023 15:09:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234419AbjHHTIn (ORCPT ); Tue, 8 Aug 2023 15:08:43 -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 C391131C04 for ; Tue, 8 Aug 2023 09:29:58 -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-yb1-f198.google.com (mail-yb1-f198.google.com [209.85.219.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-99-uBoU9ePdOSyMQ52hxoyLNA-1; Tue, 08 Aug 2023 10:27:16 -0400 X-MC-Unique: uBoU9ePdOSyMQ52hxoyLNA-1 Received: by mail-yb1-f198.google.com with SMTP id 3f1490d57ef6-d07cb52a768so6087695276.1 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=UjN+bZwBd6xiwDCBsgWsGuSFR8hJoSQo+4+Qu6/bGPTStNbuHcp/BYxEr6acsILHLW 6V+1LgX1iAx50V3rQ4rtYT1uH8nO4cc44CmyyPP/1psygLVPBOtke4jFXqDJWwfXK/lJ PkOV3JLX+W12ZLDiOqU4r1youFopuIsH4kGOGDs4KTL4HUxI1XLnuLZ2DmYyrf6xmjjD NdHDj5TbjC7BLGiKtH72lcDF19WlFR4yHJd4wVbtgLyFsFr8TATyL2gcoIVLkFF1+1Vn e5KsEdXqgw1aqir+96LkmqYXgUaB2BKMpMj+Eel7rEn76AgrdLvbfpugx0GXbj7LXclW ZnvA== X-Gm-Message-State: AOJu0YzzjsLfUWXiL6Tz0Vmd/S7ckXk4FnhzYJDsXB3AriT7hRDQEXZ4 OOR+smFAirt4IzmTLGu7FZkzVPajulswYhGqBImVwwBfdzUUCP/lt68XSSJRvTBZkf+9t38DXRK YSQXR+DICvy7bBDRx60KkeTQC X-Received: by 2002:a25:f828:0:b0:d09:34f4:6693 with SMTP id u40-20020a25f828000000b00d0934f46693mr11968670ybd.25.1691504835474; Tue, 08 Aug 2023 07:27:15 -0700 (PDT) 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773699730768777903 X-GMAIL-MSGID: 1773699730768777903 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; }