Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp87902rwi; Wed, 2 Nov 2022 09:35:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7AXgjNSMBL+UzsChV5aoWh5kRJdIK5hi44UF3xdc32XaVZ/6TnVqiMlQduFSXJoEDxJxU9 X-Received: by 2002:a17:907:608d:b0:7a2:b93e:a765 with SMTP id ht13-20020a170907608d00b007a2b93ea765mr25029063ejc.273.1667406958506; Wed, 02 Nov 2022 09:35:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667406958; cv=none; d=google.com; s=arc-20160816; b=RN9Hpz2hdOeGYJ+8dfN/e1QaPN/Dkq5Ur3bw9IfzMN0YtDPxPyGuzLv++Q6JoIt2ND y0pCSQiHiE8vcx1iJZ3sdL1kxBtrFOuBy4yiDU4aEe+CuuEauxL23mH30vxLMrzsgwEK H5V5QGKZjCELxIZRNJFMHOWIUJKvR3mAh5rVhsFQKGUvE46/K+axKYmoPzdap2YKDrGg HfvicAQnQpuVrCQ+VXImvtU+XM0VQUIW54Y8fSRlbZt7ok9+FAPod0tYdkRAHxyMMvDm LHf6H8JekZEwa9pY2uIDHO/qH7bcuY5drc+ukRpYNH1NxoFj8JGJosH9hgpMKYl+s8dF WY1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=a7vwrtGdB+gEc3/DnSemPD/VlISldERHDSjgSgP2GbU=; b=FY8YosGtA9xP2aKPkq2C5FDfuDxQlUooQ/dT9Lff2zV21u19ziH/4MfIIhQ7n1zyjc 7Svjff+ZUEmRsRhuxMoIvRFAOC2K3FuzmVsZ/yvM1EnokikZ/ZSAPkbhB6p+kj/lORv6 rbRN32C0jrlkcMwUFau1HmfQg34cj/nJ7LP3Ib0YkIDWAW91GNlxXmxvxfMRF0utvvmD xQXKJC1A7npQ7qQrWPm1owzxPyzCnhXHG29DhW50172pTvccxYq7F0mUtdx7f++KsCd9 jva87TalhA1CZkdWzIcUzulwssKhwm+kdbci4rDDfPD/cu3fgFjj3ygMDRy+cdsneqFj YMtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="FNU/w5Lm"; 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 di21-20020a170906731500b007adb868f102si17983122ejc.476.2022.11.02.09.35.31; Wed, 02 Nov 2022 09:35:58 -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="FNU/w5Lm"; 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 S230378AbiKBQ2X (ORCPT + 98 others); Wed, 2 Nov 2022 12:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbiKBQ2E (ORCPT ); Wed, 2 Nov 2022 12:28:04 -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 9D2AA11C11; Wed, 2 Nov 2022 09:23:31 -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 65F08B823C0; Wed, 2 Nov 2022 16:23:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18EACC433C1; Wed, 2 Nov 2022 16:23:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667406209; bh=KAUYkNDElfqZbLWslfyhLBCbvIgG2boL2USce5w0SuM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FNU/w5LmJ90ySCfOHvrPDP6sRkqfmFtNG4on+782B7kLkKejL9BAytAXWZrAWAfey cKGVROHBDvbVGrjUqSOVGW/ZGAS5DWu8LxPs9jVKysFgBtECNHmqufUMZyUOYeAR85 7CQwrEX5ZMhB74+uvKHCz/NHVsX0+Zoe6tF4LqMvLCek73AA+p+MdB8nvrzvZc7Ed0 OTw580ieh9+oJL/kTKZUEQgRA2flPodlhHRtBnAIkgkniIA9BDoXuCaq4G7Ei/+te1 sUeDk7Bh6F0cvI1AJJOmP26rU/xDXIl8T1Psbxmagvv3qWTgvZFnrEbKaMy5LCRMYQ Ahx3IphMCRJ2w== Date: Wed, 2 Nov 2022 21:53:16 +0530 From: Manivannan Sadhasivam To: Johan Hovold Cc: Amit Kucheria , Thara Gopinath , 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 Subject: Re: [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Message-ID: <20221102162316.GB10650@thinkpad> References: <20221102152630.696-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221102152630.696-1-johan+linaro@kernel.org> 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 On Wed, Nov 02, 2022 at 04:26:30PM +0100, Johan Hovold wrote: > 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 I did send a patch earlier for fixing this same issue but I did not use dev_err_probe(). So yours is better. Reviewed-by: Manivannan Sadhasivam Thanks, Mani > --- > 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 > -- மணிவண்ணன் சதாசிவம்