From patchwork Wed Aug 9 19:10:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 133517 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:9d8d:b0:139:fa0d:b2d with SMTP id d13csp143868rwo; Wed, 9 Aug 2023 14:06:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEXGuC9fh3qeDXLueTR/IOrQjyleCUW2NTSv01zS2hUdQGxn5Vcf2ut1cOXr6oZTAs3r/u0 X-Received: by 2002:a50:fa84:0:b0:51e:2305:931 with SMTP id w4-20020a50fa84000000b0051e23050931mr271493edr.22.1691615168404; Wed, 09 Aug 2023 14:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691615168; cv=none; d=google.com; s=arc-20160816; b=X+Q13TdzoNcEIDJVl42CCYhYc3ttMlKVLxVxD+FsbbAISlp93FwlTvau6HXUYoSi47 sSeLa/EbsKMarsi94n3FV9piDrazkeirRmVNa8c2n1vYWeHUcT287WBkndGurc8TARi1 DFouBNIA5G2d2lONdh2B9dVThemqoL6qXUjMUNhfS+GdAQ2Z5hC2FCk326vogNd8fWf5 DR5AFV3KOxLXT76DgnIoODJyAKGDHtr0T9aXbZdaSviFwnoA8FV48ra0KBKz+P5iTl6P 2paDQq6erCqBoGBMGwZkQ9romfP7Rx/sSJJpmNgsyoRPn/iM61YDXk6pxXhGQVwuxFiO 7XEA== 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=FqOZf2iFH1wW1M9KxBnD+04A0QPe8+T9kONfr/09M2E=; fh=hc5e8cLPeOSIpxJU4j4YYXOIXP2caYxrHNMZJhjGPQQ=; b=PMh/JoOSKcbpBo1EkPuLhZrVKOVZ8QPNQ483PHLOP/wnHmP2Ea+39fOTfPq/bhNgku rrAXYhMYtFoXUaeJLOznz5wFX0AjlHuvkSDk80uD9PzH8VZlXcjLqIlcLewp0OeozYS9 KTiJCgRZCDowMcq7miHa/301TdfD8VTE18twIDW7g4hGSITlJdAo9H8/QNQdzLTSj1gF 0khNcDXol3fkykWZlJj53+4beoFPpoO3m5lUpqxLTI9E+71AuFuOaCb2Q/SMO01Jmh0V txF1OnJXBb3CCyzDCHXFyFRoIteI2f3/a0M3zn7k2twFk/nvdw/dClY0b4flcCiAMXqB 40uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c8NEOwqA; 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 b13-20020aa7d48d000000b00523228f6149si8179281edr.100.2023.08.09.14.05.42; Wed, 09 Aug 2023 14:06:08 -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=c8NEOwqA; 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 S232665AbjHITLs (ORCPT + 99 others); Wed, 9 Aug 2023 15:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232787AbjHITLp (ORCPT ); Wed, 9 Aug 2023 15:11:45 -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 ESMTPS id 81BED10DC for ; Wed, 9 Aug 2023 12:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691608269; 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=FqOZf2iFH1wW1M9KxBnD+04A0QPe8+T9kONfr/09M2E=; b=c8NEOwqAJqMDohW44fNWXJ6FfJR1aFtu7j8QNHQqQsEjsl5WaN0pDxrFXqibB3uEtkBBVl U1RHFYmrcm9PyqhGksOTMmv28u8AVMVtVReuiamkbwgHRJPEWUE4xbvw1XjRM6Ll+vC7St IvIlcwwY++uvX4m4gmXFZyKQuN5FLL4= Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-245-Q44OmUZ4MjGq7WlNb_-sZA-1; Wed, 09 Aug 2023 15:11:08 -0400 X-MC-Unique: Q44OmUZ4MjGq7WlNb_-sZA-1 Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-586b0ef17daso24329307b3.1 for ; Wed, 09 Aug 2023 12:11:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691608267; x=1692213067; 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=FqOZf2iFH1wW1M9KxBnD+04A0QPe8+T9kONfr/09M2E=; b=c0YiL3pxdydeGXcElcgeK053DDDgUYZ1eKZS3luARuOruc+/cKDDwmc16jgFSzWgGI piTJb2y7QvN/EEQEO2S7TDx9Zwi2KwFQr8zMT+SecRN864PKI+TzY7+PmUemQgiQhuXl t79BJkv2y2V2XBKjB60PSA/2WsbNsfW5xKkzkvsYPyU+wvqjeI4kaeVU29uM5Il/O2VE gyyJf2wt5Ke2ruyDO/uYIwZusI6JSaprDvcMsB5RVFcN1SjoqrSOA/jpiLwbDM4vYVaM jYSaK+/KIqer73lsKJn4kbXvNdOi1/b4qGRpk1FnWGbqpd5LsfKrlfcVnECef6wqFt7j bpVg== X-Gm-Message-State: AOJu0Yw8f2SZeoJKMviwbkOddC1UclIIm81nighBotEv2fLzTeO3puRa UmOBhKuNHZdID565fXxjuRgiVzSKk0ckKp7oa0lZelvZhjxZktSAxSVywoBw8VThIh0VjSgGzG8 H+4VeB8/9PsS5yQuwvHfJkqeXVySDr0io X-Received: by 2002:a81:4e15:0:b0:56c:fbd2:edec with SMTP id c21-20020a814e15000000b0056cfbd2edecmr353511ywb.6.1691608267747; Wed, 09 Aug 2023 12:11:07 -0700 (PDT) X-Received: by 2002:a81:4e15:0:b0:56c:fbd2:edec with SMTP id c21-20020a814e15000000b0056cfbd2edecmr353498ywb.6.1691608267498; Wed, 09 Aug 2023 12:11:07 -0700 (PDT) Received: from brian-x1.. (c-73-214-169-22.hsd1.pa.comcast.net. [73.214.169.22]) by smtp.gmail.com with ESMTPSA id s84-20020a817757000000b005774338d039sm4172969ywc.96.2023.08.09.12.11.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 12:11:06 -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, hugo@hugovil.com Subject: [PATCH v2 1/2] scsi: ufs: core: convert to dev_err_probe() in hba_init Date: Wed, 9 Aug 2023 15:10:53 -0400 Message-ID: <20230809191054.2197963-2-bmasney@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809191054.2197963-1-bmasney@redhat.com> References: <20230809191054.2197963-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: 1773787066641654862 X-GMAIL-MSGID: 1773787066641654862 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 Signed-off-by: Brian Masney --- Changes since v1 - Dropped code cleanup drivers/ufs/core/ufshcd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 129446775796..409d176542e1 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -9235,8 +9235,9 @@ static int ufshcd_variant_hba_init(struct ufs_hba *hba) 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); + dev_err_probe(hba->dev, err, + "%s: variant %s init failed err %d\n", + __func__, ufshcd_get_var_name(hba), err); out: return err; }