From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.85.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796295191; b=FI64/u4f57lFhOQ8fO5xu56w0k0Qz7vSv90zcBvyKNKNdMp5r0z+YHb2nwUNCcQrooHz JAPhUux34tCKe8jYLRa2KeysFI1wRJdBdwCx+VwU3KBxCGTfcSe7TH9sgDgYsjbHv16E6 jkOM9b5/bjbhzSJBOm8J9al5uEVpZ+PzNwtD2jMtLo5SHc0Th/jtOjMH/nj6SAp348ykg 8mD2S52RzVZDMdLQfOyFA393L/laoJWf8+rLV7pyx151Son3UsNjx6OCrx2Ny442OpFM8 MlKTgg8uv6C+3w7Ql6NpU7PZkPFb4KJKnobaIfop3ZiRKos+GgbxDoQi7a0kyfVvZ3Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796295191; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:From:To:Cc: Subject:In-Reply-To:References:User-Agent:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding: X-Last-TLS-Session-Version; bh=AWVVFf7f668t29uk/3UjMkbLxCPWHdrJYdu0lgOEipE=; b=zTpBCOk2/sJsAwx9YS/PUrnzDa7A5qO2uMgg2WRlAzCbz+DuPd/2riXkz7NHlAV8D3B1 htoR/xTI7QSmNGRJ5eOqF0pcix1sssp27MWk+FEAZuYe4CwsElMmTTrvLoMkOrdJNLGO+ 3yk8YYn5Iht8wPPoHHHy/PvcFwB5yb0aIOVtUj+kxvwqFCjHOJahe0UpQnES5lyKpCbZU HQ4k5UItZHTR9a3s3AGuZ7YfZGXKmcYw9plqQp+ZyJHM7zl3YihN7eDOVsk0XGCzz3yWx Y9qZ09n5SwQJ3uhwJ7/5ESCk3jURxxOD1RP4Qmr8CxwVtCi3aYxXlT6dUKvOdDWZzkQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=Ryc3cKN9; arc=none smtp.remote-ip=185.246.85.4 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B19AA606A32C for ; Thu, 3 Dec 2026 10:53:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B19AA606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=Ryc3cKN9 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id F1D6C4E4185C; Thu, 3 Dec 2026 10:53:08 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C6D6B604ED; Thu, 3 Dec 2026 10:53:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D4FA611EA09A2; Thu, 03 Dec 2026 11:53:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796295187; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=AWVVFf7f668t29uk/3UjMkbLxCPWHdrJYdu0lgOEipE=; b=Ryc3cKN90YDK0Q616+FOVs7spZk+U9CK2mH0ZHnQCsF+Js+RNer45GwXXrR4I3lLU2dJLI pr6UecfnA+IMmJccnbf0L5VexBiNqouU9r0f4S02cpecaWvvK0NGwlSbGoBnFvKFzKB/pY CT13Or3I/Eka7Zqc2VUQ3kMg+/ULkT97Cm+/d6c9wtPNeX3KaVSBnyBVz84KfPI5SwARRI sYf1pTZfNcSI3h70aJUEpUvGDZRp2PVhM6RmpAel4dnDIwjMT8nvDU0hGtLkBCOT4MyPTP DK6+92F/rYqTt5P5aSXcUcv6oi4Rrp5TEFi45ji0yhIeVVjOR1c9elaJsfvKGA== From: Miquel Raynal To: Arina Kharlamova via B4 Relay Cc: Pali =?utf-8?Q?Roh=C3=A1r?= , Greg Kroah-Hartman , Jiri Slaby , Gregory CLEMENT , Allen Yan , arina.kharlamova@mbzuai.ac.ae, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH] serial: mvebu-uart: disable the clock when probe fails In-Reply-To: <20261129-s2p-v08-v1-1-342b7170e692@mbzuai.ac.ae> (Arina Kharlamova via's message of "Sun, 29 Nov 2026 11:28:12 +0400") References: <20261129-s2p-v08-v1-1-342b7170e692@mbzuai.ac.ae> User-Agent: mu4e 1.12.12; emacs 30.2 Date: Thu, 03 Dec 2026 11:53:04 +0100 Message-ID: <8733sek54f.fsf@bootlin.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Hi Arina, On 29/11/2026 at 11:28:12 +04, Arina Kharlamova via B4 Relay wrote: > From: Arina Kharlamova > > mvebu_uart_probe() prepares and enables the UART clock, but the later > returns for a missing interrupt, including -EPROBE_DEFER from > platform_get_irq(), and for a failed uart_add_one_port() leave it > enabled. The clock comes from devm_clk_get(), so devres only puts it, > and every deferred probe raises the enable count by one more. Wouldn't using devm_clk_get_optional_enabled() (or a similar function) be more suitable and avoid most of the churn introduced by this patch? Thanks, Miqu=C3=A8l