Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp28228rwi; Wed, 2 Nov 2022 09:01:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5KIQfRn/NjJ2qFaW4MgwGB/19/L4ogXzN7ZNhTH7D9gKP6syKvxqpwwTJ+f9NqBp2KdK+F X-Received: by 2002:a17:902:b90b:b0:186:8a4d:d4b7 with SMTP id bf11-20020a170902b90b00b001868a4dd4b7mr25135816plb.129.1667404898137; Wed, 02 Nov 2022 09:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667404898; cv=none; d=google.com; s=arc-20160816; b=hP1G/ln6OGnFLa06hjY5b3c/GkR9xc4CkGFpW8E888HGCxr49AJ2Wkuu8ONb5aoe5g thRpkJvT7QXroqXrCIVjQXFXqMOfPlsFdRbaED8JYMcN8eX8xHwD9HtbDPZUPnTQlHAQ /q+KXDvHvDGwruZ+d6Sf6uGEE4FoBxj61tWoHVpAbdBZYy+ZOXIhpfnzQMNYWJuzU/rJ nkppEOjKpi8rAvC7ULjuKQYX53IzQOArbJnUHDrApBhgIDWbCBMleQD+OwuC5XtyvDYr cJol//8Qv8oguIS+FnIJ36xcsCxKctos3sfLaf5Dfb5d2XjUgH4HCLtHx81h2urUMCcw dXbg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2DTSqo9OTIQYujqTVsLXfLHRPioItsy4wiJgST4IE9A=; b=THDY4nz9JSaTRXHl73uCVEFbq7xPA8ykRR4NBOZ7hvEilHgV8T0QicmzRKvO9+cCK7 g4wvVDMUAt1pQPnHc7enxYcHf6NjOzjyeS1678nrPD0vC0bcXxltAUcGMo80pI2hgucQ 6vQzmNps66QfgmoLPCWVPYoxGxoiORK+3en+SMdS8nAGducx1ZPIKNq8I9J/uLD+qDft BNoTBonLcLnddhR50hNxMuM4YiZjLn5M+4Uo6kiR1plPMZ04m9njC2Fkz0oIiDEN36yh IkzXStDXXPfKMqC23vXy4Xu4u4SdhqFRYgt5XQr/45jliLV82zZuH3iV4JZ7C1+jsdn5 yJxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QcmfDof6; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ix5-20020a170902f80500b001868a4db3d1si14313822plb.48.2022.11.02.09.00.58; Wed, 02 Nov 2022 09:01:38 -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=@kernel.org header.s=k20201202 header.b=QcmfDof6; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbiKBP1k (ORCPT + 98 others); Wed, 2 Nov 2022 11:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbiKBP1j (ORCPT ); Wed, 2 Nov 2022 11:27:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CFF713E2B; Wed, 2 Nov 2022 08:27:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 49386B8233C; Wed, 2 Nov 2022 15:27:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBB6AC433D6; Wed, 2 Nov 2022 15:27:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667402855; bh=hUMH3kogeaEGr2FmRDxDjl277jnXJkiytyvOR+dvAgo=; h=From:To:Cc:Subject:Date:From; b=QcmfDof65Dj/WWk3IHoJ+u78L27TQc6+kJIR5G0PrG2kohGJhF3rBnI9wHS7VHgHK N8HiNvWQ/13NR5v/RJd2qaJ7E/iFNUEXmZN/AYEwQnSDGaPsvq44WdwfAz+TJAd8sf KX+ik7vapmvV5cbtkkIP6own963IhU7OMU2ozEMr6+PSTH+WdIVwYm4nhgWe2w+oK9 lEM420OrJzOdyrl04JrCEleFEZOOdxwzSKac2MrAc9VF5ifIb3nKfEU1YrVlwRdj5q lsczXwErPnDVLizIrrYwe8Fg2osMLMg/fKZwjkejOAHkkEIMmOfJwRz897pHFwYYHG nar8nxzSdfl/w== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oqFeB-0000C8-8M; Wed, 02 Nov 2022 16:27:19 +0100 From: Johan Hovold To: Amit Kucheria , Thara Gopinath Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Date: Wed, 2 Nov 2022 16:26:30 +0100 Message-Id: <20221102152630.696-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Drivers should not be logging errors on probe deferral. Switch to using dev_err_probe() to log failures when parsing the devicetree to avoid errors like: qcom-spmi-adc-tm5 c440000.spmi:pmic@0:adc-tm@3400: get dt data failed: -517 when a channel is not yet available. Signed-off-by: Johan Hovold --- drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c index a3310bf061cb..c70615d2d771 100644 --- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c +++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c @@ -1031,10 +1031,8 @@ static int adc_tm5_probe(struct platform_device *pdev) return irq; ret = adc_tm5_get_dt_data(adc_tm, node); - if (ret) { - dev_err(dev, "get dt data failed: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "get dt data failed\n"); ret = adc_tm->data->init(adc_tm); if (ret) { -- 2.37.3