From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-a1-smtp.messagingengine.com (flow-a1-smtp.messagingengine.com [103.168.172.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A30CF1FCF62; Wed, 8 Jan 2025 11:53:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736337221; cv=none; b=t1shWcRzLQfkoa8rLpBrPjE3I+nbaBZSxU0YwOjbGzAVd5MA2u3u/Oi9kDw4RX2rjVZj7qsaLTBvy5lMq1n1tnO4qKOh18do4Eo4xCc0++aqEawT6MTdayvUd8Mbirgv093Cx2CSB5jJxiGAZ2DZq/IApZbZsaFvCziOCne8KoU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736337221; c=relaxed/simple; bh=x00YMsxhjzJGlP9Sq4r8hP0TerHaPpRXSdNMhuXXc8c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Hilo/Akf29vbvRqx0/p0LQRADtlN3p0syKWf4kl7CzGCBsLOpoJ3YWJTcJY2oB64DVUKoOWBMRXt8d1H3NWx0bacyH1kenITLkEF+zU3X2EX5vKfTcRKAvPIUWypS4nU9XD16ehprbIwNZiY95a08hrBs56QMn4Y1QnmqHbqLls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com; spf=pass smtp.mailfrom=kroah.com; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b=KI2aVTuw; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Xpm5xDDw; arc=none smtp.client-ip=103.168.172.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kroah.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="KI2aVTuw"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Xpm5xDDw" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailflow.phl.internal (Postfix) with ESMTP id A3353200FDD; Wed, 8 Jan 2025 06:53:38 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Wed, 08 Jan 2025 06:53:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1736337218; x=1736344418; bh=btUwRHuX5g BsWJIQdk3kdeg3r4y3ZqBBNLuLHNcycxE=; b=KI2aVTuwWZNuVLooRSyIfoWGJ/ rA/g2dgsUbVQBcEUHHmLdQ9FvfckVQsYAaznAARdwsqXNz9g68lmHLkFUXznWuy7 DzHSGxlLzatZO72zLZVSWCbbAUsbFvG176LvjNccfv1t0LCOyydhY1toyaFle6nD rGZ3w9Ri17ExRLEAb9iOJw9RoMcZgiviSR9//Khj+0NjLIiWBp7LG0fEOs+4DpqN rr0A3665/R0Ujv9bd27tOYyXn36T+LE0GbiVLAu25mFbgwx+ejc7qS2ZRS4erC4o NFW+Y60qOiqR+aSPCr3PPiem9U7O8143rCTbU/s2lrcyoM7uBFpcUymlrOFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1736337218; x=1736344418; bh=btUwRHuX5gBsWJIQdk3kdeg3r4y3ZqBBNLu LHNcycxE=; b=Xpm5xDDw7t/ZkbaFr5Ju90h+q1pWUXJSlRS2dNC6yYs1ugfX0wX ZM0qbR8cVtHeXbuNzt2F3Dx7XUFQtYGjGVlud056t9vMIeWcyy6wgqTbwQv8EBrA C3rpzFNeRW46j9Wdz0Tf4JrH7+pyG3+0zQazMVD0oopY9jFqPr3ewJJCzsBhxDP2 +SyOOmEqmq0rkBeu4E+LzmoaPXI2R8wxEfKG2VX7cwmIiMhKqWOGf2C2KMtCqrMH kIuv8P3QbMrhBrMjUHO1O1VoIp3jCvniivZdWfbyWPYIUw3dWdBzfkTwjmna+CYw 2La+EeGI7A0mWkGr6YKzjtsbc+5DlzKwWvQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudeggedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvden ucfhrhhomhepifhrvghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrf grthhtvghrnhepheegvdevvdeljeeugfdtudduhfekledtiefhveejkeejuefhtdeufefh gfehkeetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmpdhnsggprhgtphhtthhopeehtddpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtohepvhhirhgvshhhrdhkuhhmrghrsehlihhnrghrohdroh hrghdprhgtphhtthhopehrrghfrggvlheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohep mhhighhuvghlrdhojhgvuggrrdhsrghnughonhhishesghhmrghilhdrtghomhdprhgtph htthhopegurghkrhesrhgvughhrghtrdgtohhmpdhrtghpthhtohepvhhirhgvshhhkhes khgvrhhnvghlrdhorhhgpdhrtghpthhtohepnhhmsehtihdrtghomhdprhgtphhtthhope hssghohigusehkvghrnhgvlhdrohhrghdprhgtphhtthhopehojhgvuggrsehkvghrnhgv lhdrohhrghdprhgtphhtthhopegrlhgvgidrghgrhihnohhrsehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Jan 2025 06:53:37 -0500 (EST) Date: Wed, 8 Jan 2025 12:53:35 +0100 From: Greg KH To: Viresh Kumar Cc: "Rafael J. Wysocki" , Miguel Ojeda , Danilo Krummrich , Viresh Kumar , Nishanth Menon , Stephen Boyd , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , linux-pm@vger.kernel.org, Vincent Guittot , rust-for-linux@vger.kernel.org, Manos Pitsidianakis , Erik Schilling , Alex =?iso-8859-1?Q?Benn=E9e?= , Joakim Bech , Rob Herring , linux-kernel@vger.kernel.org Subject: Re: [PATCH V6 01/15] PM / OPP: Expose refcounting helpers for the Rust implementation Message-ID: <2025010821-yam-distaste-130f@gregkh> References: <2025010759-errant-lather-a64a@gregkh> <20250108091124.3cqgjk4k45uuvppk@vireshk-i7> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250108091124.3cqgjk4k45uuvppk@vireshk-i7> On Wed, Jan 08, 2025 at 02:41:24PM +0530, Viresh Kumar wrote: > On 07-01-25, 12:58, Greg KH wrote: > > On Tue, Jan 07, 2025 at 04:51:34PM +0530, Viresh Kumar wrote: > > > The Rust implementation needs these APIs for its working. Expose them. > > > > Why is the rust code unique here? Why does C code not need these > > exported? > > > > And that first sentance isn't really good grammer :) > > > > Also, you created a new function here and didn't document it anywhere, > > nor do you mention it here in the changelog text, making this a > > non-starter right off :( > > How about this ? > > PM / OPP: Add reference counting helpers for Rust implementation > > To ensure that resources such as OPP tables or OPP nodes are not freed > while in use by the Rust implementation, it is necessary to increment > their reference count from Rust code. > > This commit introduces a new helper function, > `dev_pm_opp_get_opp_table_ref()`, to increment the reference count of an > OPP table and declares the existing helper `dev_pm_opp_get()` in > `pm_opp.h`. That works, if you drop the `` stuff, not needed :) thanks, greg k-h