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 552CDC3DA4A for ; Thu, 22 Aug 2024 13:37:53 +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=z6pfp3Jb7A5u+DcbpU7HygYW6nPEfbCTB6Gfy4ny9CA=; b=jrISOLmJSluPQuxwVh6GKNwObK BfkFImREIL+Kw7vfRL6wtlZrxOXXN+H2Lclea88S8hgHoYTRfvAVV+W1TRYN46H2nK9413eqTx+AL KBKhyfhHCpTBifdZ88MaG1kIVJFcUClvik2tAdFocOtCP1q8BViBCelxKRFai2yqTmWOY+CZGHCk4 knUhkPj9M6nwNkHiqdM0sAZ4LYiqCeNGqAi1Ux8xcuhZ2ZZoAw89jJRM1UC/VzGVYBAGMdQCaNyF0 1K8bIwFvqMwpidBVZbVikDAgGnhApDn/nuNv052v65VxnEaawN9ainYdmdg1uHJ6n+GRE9PQ26Kkz N/8Ph5kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh80T-0000000CyyX-4A4r; Thu, 22 Aug 2024 13:37:42 +0000 Received: from mgamail.intel.com ([192.198.163.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh7yk-0000000Cyev-1BXF; Thu, 22 Aug 2024 13:35:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724333754; x=1755869754; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=0LjGR0jv6vQPi1I16qcrigZKwqwq5Ay6KaAm2phGUVQ=; b=LcngvEks1OhIKHwZaSfzd88C3xOdGP7Sa6OhXYIuJb2fbuNgpZZM/6t5 PINLjvY3CwGt7INE/YA56MoBjVeYS0g5KKSkqGAPsSpJGeSnIWn2pVm9s ZetMfJJ01QFnBMd4xCm7ROTUk5mdoA/B50VM8LnPkLweyJ5imXS1RIpjQ bs3j5c/djl5nF7fHyUNWrtjLhYOz76A+O9r0tVs4J4ac2L6SOF1+rK8+H CIl4WJytw4S1HlS30EhsLO2pvseUzFvZ4MYNOqKLYEawEqo7xX0ox8JfG uSoxL7uiu9Y46fKF6D5+GnZNfUapqZI24uF2dLnmMMZnEhdfh1bDz6MbW A==; X-CSE-ConnectionGUID: BdV+gZqCQKm0BU96+0iAUw== X-CSE-MsgGUID: QoaqhNyUQDK76jzuCy1kug== X-IronPort-AV: E=McAfee;i="6700,10204,11172"; a="22927339" X-IronPort-AV: E=Sophos;i="6.10,167,1719903600"; d="scan'208";a="22927339" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2024 06:35:53 -0700 X-CSE-ConnectionGUID: 6/NWjhhmSSKzAJQm5iXJ3Q== X-CSE-MsgGUID: ei5bsNzcSRiljAVcDqkypQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,167,1719903600"; d="scan'208";a="61293724" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa010.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2024 06:35:44 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1sh7xM-00000000Sux-3XeL; Thu, 22 Aug 2024 16:34:28 +0300 Date: Thu, 22 Aug 2024 16:34:28 +0300 From: Andy Shevchenko To: Richard GENOUD Subject: Re: [PATCH 4/8] tty: atmel_serial: Use devm_clk_get_enabled() helpers Message-ID: 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: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_063554_359247_C1C1108E X-CRM114-Status: GOOD ( 16.00 ) 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: Alexandre Belloni , 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 , 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 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. -- With Best Regards, Andy Shevchenko