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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2D97C433DF for ; Wed, 12 Aug 2020 09:36:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80A5620885 for ; Wed, 12 Aug 2020 09:36:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oy3fRPvq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80A5620885 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0VCCnw21qky70WhpcNHgl/ydf4ceeP+hX/6vmHI8BEo=; b=oy3fRPvqjEMfhTMUw1IGBA8tb YvmJmWG43/eXb/1VJkJVDfWKM7oi5Jz5ZpgwIXziXcy2SkIuJxKNsVVFTgrfdKeWbPFjh55dTlB/i oT/JCVcfm1SkhdnA706AmcE6ri8UmxMG+PneDPwm6npJhzIuj1hqbx48GFbb2BGKXskgzJz3OMQSS gCCl6eUMi+5L8ui9Ax8GOVRbJpAWnhr/dl1gZLJ7yJJKaO+BGP0ize0mS/3NVphiK1puy2eLeDVni bVN6CKQR74HP+5i4hziv22AkEEarR7ykmtBlezuGx+VNeLxGVNN8XwJx2F4xFm1FYzd2wdJMJEFhb tbs0+HpsQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5n9u-0005qQ-6c; Wed, 12 Aug 2020 09:34:58 +0000 Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5n9r-0005pf-CC for linux-arm-kernel@lists.infradead.org; Wed, 12 Aug 2020 09:34:56 +0000 X-Originating-IP: 90.66.108.79 Received: from localhost (lfbn-lyo-1-1932-79.w90-66.abo.wanadoo.fr [90.66.108.79]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id D3CBD1BF206; Wed, 12 Aug 2020 09:34:52 +0000 (UTC) Date: Wed, 12 Aug 2020 11:34:52 +0200 From: Alexandre Belloni To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH] pwm: atmel: Make use of dev_err_probe() Message-ID: <20200812093452.GJ3448@piout.net> References: <20200812080259.4431-1-u.kleine-koenig@pengutronix.de> <20200812082002.GD4354@dell> <20200812083204.kktnid63j6vefsky@pengutronix.de> <20200812084728.GI3448@piout.net> <20200812092539.fbpapvrwxbmzfi65@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200812092539.fbpapvrwxbmzfi65@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200812_053455_516169_6885471A X-CRM114-Status: GOOD ( 18.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Ludovic Desroches , Thierry Reding , kernel@pengutronix.de, Lee Jones , Claudiu Beznea , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/08/2020 11:25:39+0200, Uwe Kleine-K=F6nig wrote: > Hello Alexandre, > = > On Wed, Aug 12, 2020 at 10:47:28AM +0200, Alexandre Belloni wrote: > > On 12/08/2020 10:32:04+0200, Uwe Kleine-K=F6nig wrote: > > > On Wed, Aug 12, 2020 at 09:20:02AM +0100, Lee Jones wrote: > > > > On Wed, 12 Aug 2020, Uwe Kleine-K=F6nig wrote: > > > > > atmel_pwm->clk =3D devm_clk_get(&pdev->dev, NULL); > > > > > if (IS_ERR(atmel_pwm->clk)) > > > > > - return PTR_ERR(atmel_pwm->clk); > > > > > + return dev_err_probe(&pdev->dev, PTR_ERR(atmel_pwm->clk), > > > > > + "Failed to get clock\n"); > > > > = > > > > Isn't dev_err_probe() only useful for drivers handling -EPROBE_DEFE= R? > > > = > > > devm_clk_get() might return -EPROBE_DEFER. > > = > > If it did, you wouldn't be able to print this message. > = > Why that? It probably won't make it to the console immediately, but once > the clk is available the log buffer should be pushed out, shouldn't it? > = No because that would mean that there is not timer clock and te system would not be booting to that point at all. > > I' not sure it is worth adding so many checks for errors that will > > never happen. > = > I'm sure this train of thought is unsustainable. And people will copy > this code to platforms where this assumption might even be more wrong > than on at91. = Well my point is that if you keep the error checks, you can remove the strings as they will never be printed. -- = Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel