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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F3B4C3DA4A for ; Thu, 22 Aug 2024 14:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type: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=28KjxeZ01+p9nDVnGtXx9KfJaHBczSdiwVjl2vmbphI=; b=kTd8qfQab32ht4P6F7pD8UUx+Z TAsAxpOoLFk/SQMlR1m/G4AKTpbc1T68hJxC7VJALDW7VnlkHwwaAnmxug6aUm67tY6E/AOVvevDY UzrfFgW80j8onwzBbjrQeg8v2Z0hVnKsgSL3UpfBC/iiCJnpLrtjtpZWL6Sf1KOxWUC5H7gXRoehd uuVfgnT3BXSI2wVnkoBNBRge1ohXrehkniwcwHtYRLptuo5d5ZlHaZ9X/qWeLJpoAe7KLrIxZNeyX 71C728XscwpnFP/JJ/VIvwsLPshK7VywNJoOwPfiAsd3Mh/UI9QkxRvpxNLVykWz1oNDvKGv+Q+FI Qh7RJmOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh8tk-0000000DAwn-0GyO; Thu, 22 Aug 2024 14:34:48 +0000 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh8sO-0000000DAZg-0TxT; Thu, 22 Aug 2024 14:33:27 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id D6BBF1C0002; Thu, 22 Aug 2024 14:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1724337199; 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=28KjxeZ01+p9nDVnGtXx9KfJaHBczSdiwVjl2vmbphI=; b=MmE2IZpmpKFJ4A+9lsXAKU6W/E6Whvpbyy4BTW/u9jMcZ/kVKNoKCfgBmi6FUpl9ngeq2T jY4JhCs28GxODWc7Ckqrhcu9ZytXED4ifDTkMbDd+4INaZ9enWDSxSfPNhlqy/Xmfv5w9X aIXpRI0K3ER1hNzFuCfUbPGXnGLY/nMTaI0chcba5QUSnTcnEeN0SH/GSHVIJ1A9b3mjo0 gnPZOYtCJ+fuTZm7aIiPfHP1iKEYzuI6rEUSb5d52Ugs37TTubxvW1Pk36T5hkKzmoRE26 sQMCRp4IUvgBMPgmPEnOyQtwlHW4Y7tmuo/RCjTgySkhgK9eJhmohngZfX0Xvw== Date: Thu, 22 Aug 2024 16:33:16 +0200 From: Alexandre Belloni To: Andy Shevchenko Subject: Re: [PATCH 4/8] tty: atmel_serial: Use devm_clk_get_enabled() helpers Message-ID: <202408221433165841f563@mail.local> References: <20240822033924.32397-1-liulei.rjpt@vivo.com> <20240822033924.32397-5-liulei.rjpt@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-GND-Sasl: alexandre.belloni@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_073324_921947_46A38E89 X-CRM114-Status: GOOD ( 18.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Valentin Caron , Erwan Le Ray , Kunihiko Hayashi , Lorenzo Pieralisi , Liviu Dudau , Alexandre Torgue , Claudiu Beznea , Paul Cercueil , Thierry Reding , Manivannan Sadhasivam , Jiri Slaby , linux-stm32@st-md-mailman.stormreply.com, opensource.kernel@vivo.com, Florian Fainelli , Jonathan Hunter , linux-arm-kernel@lists.infradead.org, Andi Shyti , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , linux-mips@vger.kernel.org, Patrice Chotard , Lei Liu , John Ogness , linux-kernel@vger.kernel.org, linux-actions@lists.infradead.org, linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org, Thomas Gleixner , Richard GENOUD , Sebastian Andrzej Siewior , Greg Kroah-Hartman , Lino Sanfilippo , Masami Hiramatsu , Maxime Coquelin , Sudeep Holla , Jeff Johnson , Andreas =?iso-8859-1?Q?F=E4rber?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22/08/2024 16:34:28+0300, Andy Shevchenko wrote: > On Thu, Aug 22, 2024 at 03:28:40PM +0200, Richard GENOUD wrote: > > Le 22/08/2024 à 05:39, Lei Liu a écrit : > > > The devm_clk_get_enabled() helpers: > > > - call devm_clk_get() > > > - call clk_prepare_enable() and register what is needed in order to > > > call clk_disable_unprepare() when needed, as a managed resource. > > > > > > This simplifies the code and avoids calls to clk_disable_unprepare(). > > ... > > > > * The peripheral clock can now safely be disabled till the port > > > * is used > > > */ > > > - clk_disable_unprepare(atmel_port->clk); > > > - > > Why removing this ? > > This is not an error path. > > Good point, I wouldn't apply this patch as well as a few others in this series > due to this reason. > > Instead it might make sense to add a comment on top of devm_clk_get() to > explain why _enabled() variant is *not* used. Or maybe stop doing brainded conversions to new APIs. > > -- > With Best Regards, > Andy Shevchenko > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com