From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E3404155312; Mon, 30 Sep 2024 12:28:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727699285; cv=none; b=LGAI0jdiVxh3ENQEpHVi8skdXEJwQs5AqQVRy7ZKW/u8pcvpQ24jS3CLOcndd9dLwzcT03Ioh7pDvEno6XA8P9yGvGyBWmedMMbrY5GoFemsIdyV7I13cBby5g5zdwA/k3gSjA5gX3+nqZ0Kcxv3H5gSKDTCc4qJkrFH7ZUvLaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727699285; c=relaxed/simple; bh=olQxUjUujOS4T2mMsKlVpArogN+6ojBSjpk7l3yrKUE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bOYQtQV3don3I7y0PJQSbgkKaQF0ZyIT+DX5GqX/rLOS66shfe8vIwpXlleqk8ZjrKM+QdB7b85GghARwxLagkFLYpKmq3Q3ws5GAWgIEMP2qVLXS7tpu8cdJHiLvgCClChEXvVviMYsEM6N1v6LSyWKTEwqseqbsjppEPdFD8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PDnoEoDx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="PDnoEoDx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5A29C4CEC7; Mon, 30 Sep 2024 12:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1727699284; bh=olQxUjUujOS4T2mMsKlVpArogN+6ojBSjpk7l3yrKUE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PDnoEoDx+oFzJvOOvKAJtY6bGmWa5I4u8arSiXVp3a9kCOKyyVRpfvsonqsMQlIeP K0suLCrAONic75rDBMEkhcGs+ukBAg0f17c4imGqCo+XLDL0eKNGcN88cjOziRqeXO /z8msEfzlIGhIrkSGD4AzFDjlhvU9aQ94FS9UWGw= Date: Mon, 30 Sep 2024 14:28:01 +0200 From: "gregkh@linuxfoundation.org" To: Danilo Krummrich Cc: Guilherme =?iso-8859-1?Q?Gi=E1como_Sim=F5es?= , rafael@kernel.org, ojeda@kernel.org, alex.gaynor@gmail.com, boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, benno.lossin@proton.me, aliceryhl@google.com, mcgrof@kernel.org, russ.weight@linux.dev, dakr@redhat.com, a.hindborg@kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] device: rust: change the name function Message-ID: <2024093035-stream-chowder-3b95@gregkh> References: <2024093044-emblaze-disrupt-d479@gregkh> Precedence: bulk X-Mailing-List: rust-for-linux@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: On Mon, Sep 30, 2024 at 02:11:37PM +0200, Danilo Krummrich wrote: > On Mon, Sep 30, 2024 at 01:35:09PM +0200, gregkh@linuxfoundation.org wrote: > > > > > /// While not officially documented, this should be the case for > > > any `struct device`. > > > - pub unsafe fn from_raw(ptr: *mut bindings::device) -> ARef { > > > + pub unsafe fn get_device(ptr: *mut bindings::device) -> ARef { > > > > With this change, nothing broke? Does nothing call this code yet? I > > thought the firmware interface did that, but I could be wrong... > > The firmware code uses the `Device` structure, but it doesn't create a > reference from a raw pointer. > > This function should probably only ever be called from bus abstractions. I > thought the PHY layer needed this urgently (which also was the reason we merged > it already), so I'd expect the PHY code to use it. > > Though, they might just use `as_ref`. Ah, then no harm in renaming it now, great! When it's resent in a way we can apply it, I'll be glad to queue it up. thanks, greg k-h