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 2D3902AEE4; Fri, 1 Aug 2025 09:00:17 +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=1754038818; cv=none; b=pKUpK/HFztr9Z2Nmr1rkQiKSVFG5x5lwfaZ2nEiGHfLTGnnEJrTjxYK3SjGw+p4arAGDtgDgT3gSC3zWhI1pTKgU3fs53POauDsVp2IZons7spXkpm/o6iomqkXBdVhq55M1nnYUHa69zK5wQ9DIJPccVZd4sMEjdWmVd1GCxR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754038818; c=relaxed/simple; bh=fWPKNnaX5uTj9m87UtZaRk7qwv0U/J5aGdkXKnx0kmk=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=UjR4kDQBnzQlj+0Eg4NAtqGP/vjeqS6uwe+poJku1I5YfdScnx2OZJJRvYCECq8RQeX52nehDtKCV23uZINHTHyAmRAQjIt94RkgURCXU6WjZiGy5FKhf7bLPuX+ILN6lef7irdOXEC9osrqMu+7URVNESgbv6JgHNnGAyvldO8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AI2d9u7G; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AI2d9u7G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1E0EC4CEE7; Fri, 1 Aug 2025 09:00:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754038817; bh=fWPKNnaX5uTj9m87UtZaRk7qwv0U/J5aGdkXKnx0kmk=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=AI2d9u7GEhdHDUvT62m95R0mTiBVyzjU3eMhjNV0RIKDjCQmTY83/1ELsYyMZm7Ig nyRUvDbnOOuhBTG3F5ANWyrergDXiGgiHbM/Jsll4uTJkwBYDhmf2RtAJ6pzA7Nxny tyEE5wusDL5llWMoTty194W8AUW4SgIB6bRdRdvf9gTeR5nhzpp/dgiUlXXvyFhj/3 IRMkrMlLW2/Jol63ECWaACUow3X6uRVslrJKOFq6jE9wb9LNpoS8sSh2EnJZd55iIT tKO5vY37kcS5ewvVilysUUHMQa1ptd0K7iEMnVZ6BoOJiJqgs2dZSLbom2Lz/J9gUe K8h4JZnsIuybg== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 01 Aug 2025 11:00:12 +0200 Message-Id: Cc: , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 3/4] rust: drm: remove pin annotations from drm::Device From: "Benno Lossin" To: "Danilo Krummrich" X-Mailer: aerc 0.20.1 References: <20250731154919.4132-1-dakr@kernel.org> <20250731154919.4132-4-dakr@kernel.org> In-Reply-To: On Fri Aug 1, 2025 at 10:21 AM CEST, Danilo Krummrich wrote: > On Thu Jul 31, 2025 at 8:54 PM CEST, Benno Lossin wrote: >> On Thu Jul 31, 2025 at 5:48 PM CEST, Danilo Krummrich wrote: >>> #[repr(C)] >>> -#[pin_data] >>> pub struct Device { >>> dev: Opaque, >>> - #[pin] >>> data: T::Data, >> >> Looking at this code again, I also noticed that it was wrong before this >> patch: `Device` implemented `Unpin` if `T::Data` did which is most >> likely wrong (or is `drm_device` not address sensitive?). > > It is, but as mentioned above a drm::Device only ever exists as > ARef. Yeah the `Unpin` thing isn't a problem for `ARef`, but we are theoretically allowed to implement moving out of an `ARef` (given that it is unique) when the type is `Unpin`. Thanks for confirming. --- Cheers, Benno