From mboxrd@z Thu Jan 1 00:00:00 1970 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 520AFC4332F for ; Sun, 18 Dec 2022 11:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230200AbiLRLNd (ORCPT ); Sun, 18 Dec 2022 06:13:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230435AbiLRLNX (ORCPT ); Sun, 18 Dec 2022 06:13:23 -0500 X-Greylist: delayed 250 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 18 Dec 2022 03:13:22 PST Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [5.144.164.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CF642716 for ; Sun, 18 Dec 2022 03:13:21 -0800 (PST) Received: from [192.168.2.144] (adsl-d248.84-47-10.t-com.sk [84.47.10.248]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id D0C773EE52; Sun, 18 Dec 2022 12:13:18 +0100 (CET) Date: Sun, 18 Dec 2022 12:13:13 +0100 From: Martin Botka Subject: Re: [PATCH] thermal: qcom-spmi-adc5: Suppress probe-deferral error message To: Marijn Suijten Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Jami Kettunen , Johan Hovold , Andy Gross , Bjorn Andersson , Konrad Dybcio , Jonathan Cameron , Lars-Peter Clausen , Robert Marko , Linus Walleij , Nuno =?iso-8859-1?b?U+E=?= , linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: <1633NR.JIUCB2Y1JAXI3@somainline.org> In-Reply-To: <20221216190945.902754-1-marijn.suijten@somainline.org> References: <20221216190945.902754-1-marijn.suijten@somainline.org> X-Mailer: geary/40.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Fri, Dec 16 2022 at 08:09:45 PM +01:00:00, Marijn Suijten wrote: > Much like 807efb7102e8 ("thermal: qcom-spmi-adc-tm5: suppress > probe-deferral error message") the ADC5 driver also spams a similar > probe-deferral error on startup when a channel is not yet available: > > [ 0.343136] qcom-spmi-adc-tm5 1c40000.spmi:pmic@0:adc-tm@3500: > get dt data failed: -517 > > Suppress it by using dev_err_probe instead, which also takes care of > storing the message as reason for deferring. > > Signed-off-by: Marijn Suijten > --- > drivers/iio/adc/qcom-spmi-adc5.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/adc/qcom-spmi-adc5.c > b/drivers/iio/adc/qcom-spmi-adc5.c > index 821fee60a765..69cc36004b5a 100644 > --- a/drivers/iio/adc/qcom-spmi-adc5.c > +++ b/drivers/iio/adc/qcom-spmi-adc5.c > @@ -894,10 +894,8 @@ static int adc5_probe(struct platform_device > *pdev) > mutex_init(&adc->lock); > > ret = adc5_get_fw_data(adc); > - if (ret) { > - dev_err(dev, "adc get dt data failed\n"); > - return ret; > - } > + if (ret) > + return dev_err_probe(dev, ret, "adc get dt data failed\n"); > Reviewed-by: Martin Botka -Martin > irq_eoc = platform_get_irq(pdev, 0); > if (irq_eoc < 0) { > -- > 2.39.0 >