From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 0845627B4FA for ; Fri, 23 Jan 2026 18:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769191759; cv=none; b=Wug4g+HqAraMp4H8Z3Pr3ulFENY/Af1BZ2ej6SI2vXVwCcZ+DBcn4dbhR/FKYG4QjTvBxjmyTU+/vA04M1FjqINyEaS13zlkRySa2dPSW3miun+0PFNXoJIMErJqh9g03VLwf4zbVH5jRl+6ZiUFIIW7FBZ1avyMBjxZaMl/FOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769191759; c=relaxed/simple; bh=U6jok9Lm4gAl1gXQAwBolGmq4HjJ88DnwYNX9jA/Pek=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZyVphW2f0arnUDkUniRYRaoLB+fPSbEK0NP/YTbTUErHZ1+iDcD3Pgs23S3MyT8j0hpVE/xgAly/KtM9e2MDJQXq0OQydi7qyN/6NVzTX80ldZqcyCM3FY3p57nyz1MN3vfFrOPJoHAIHpmyBVsVgNGK4aqhyskIsLsv9pTGygk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=RtSdAMtU; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RtSdAMtU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769191757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sju1fArvXLQeBXSNQsoi+yWmCa/O67MXYMKkbK3HSjs=; b=RtSdAMtUpqKgWXe3Mc/lJsDZGbeFX5Te+J+KR9QFOc+ZZSos8AEmRf1pMAQp8e+8Q6RV3/ eYlopZAp9GD6VYG593DgNwzAM5rXl6VS1xSCESeg/+gqANCp6c9wyhxVSiOeOBMtOTvhH0 1iWIZXwAVYXo7y9WsWzP0a9gd2t2Qag= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-435-8ZTT9zXcO0-1LCjDfiacMQ-1; Fri, 23 Jan 2026 13:09:11 -0500 X-MC-Unique: 8ZTT9zXcO0-1LCjDfiacMQ-1 X-Mimecast-MFC-AGG-ID: 8ZTT9zXcO0-1LCjDfiacMQ_1769191749 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B183B1944B0C; Fri, 23 Jan 2026 18:09:09 +0000 (UTC) Received: from GoldenWind.redhat.com (unknown [10.22.89.232]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A394718004D8; Fri, 23 Jan 2026 18:09:07 +0000 (UTC) From: Lyude Paul To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, Danilo Krummrich Cc: "Ewan Chorynski" , "Miguel Ojeda" , "Alice Ryhl" , "Simona Vetter" , "Shankari Anand" , "David Airlie" , "Asahi Lina" , "Atharv Dubey" , "Daniel Almeida" , "Lyude Paul" Subject: [PATCH v3 2/2] rust/drm: Remove imports covered by prelude::* Date: Fri, 23 Jan 2026 13:08:08 -0500 Message-ID: <20260123180851.3974488-2-lyude@redhat.com> In-Reply-To: <20260123180851.3974488-1-lyude@redhat.com> References: <20260123180851.3974488-1-lyude@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 This just removes any explicit imports of items in files that are already being pulled in by `use prelude::*;`. There should be no functional changes in this patch. Signed-off-by: Lyude Paul --- rust/kernel/drm/device.rs | 5 +---- rust/kernel/drm/driver.rs | 6 +----- rust/kernel/drm/file.rs | 6 +----- rust/kernel/drm/gem/mod.rs | 6 +----- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs index ae123ffece790..629ef0bd1188e 100644 --- a/rust/kernel/drm/device.rs +++ b/rust/kernel/drm/device.rs @@ -12,10 +12,7 @@ self, driver::AllocImpl, // }, - error::{ - from_err_ptr, - Result, // - }, + error::from_err_ptr, prelude::*, sync::aref::{ ARef, diff --git a/rust/kernel/drm/driver.rs b/rust/kernel/drm/driver.rs index 24e81afb04f58..2940fece7d59e 100644 --- a/rust/kernel/drm/driver.rs +++ b/rust/kernel/drm/driver.rs @@ -9,14 +9,10 @@ device, devres, drm, - error::{ - to_result, - Result, // - }, + error::to_result, prelude::*, sync::aref::ARef, // }; -use macros::vtable; /// Driver use the GEM memory manager. This should be set for all modern drivers. pub(crate) const FEAT_GEM: u32 = bindings::drm_driver_feature_DRIVER_GEM; diff --git a/rust/kernel/drm/file.rs b/rust/kernel/drm/file.rs index 7dade6dfa1ba2..10160601ce5af 100644 --- a/rust/kernel/drm/file.rs +++ b/rust/kernel/drm/file.rs @@ -7,14 +7,10 @@ use crate::{ bindings, drm, - error::Result, prelude::*, types::Opaque, // }; -use core::{ - marker::PhantomData, - pin::Pin, // -}; +use core::marker::PhantomData; /// Trait that must be implemented by DRM drivers to represent a DRM File (a client instance). pub trait DriverFile { diff --git a/rust/kernel/drm/gem/mod.rs b/rust/kernel/drm/gem/mod.rs index 56b7641b1405e..b4199945db378 100644 --- a/rust/kernel/drm/gem/mod.rs +++ b/rust/kernel/drm/gem/mod.rs @@ -5,7 +5,6 @@ //! C header: [`include/drm/drm_gem.h`](srctree/include/drm/drm_gem.h) use crate::{ - alloc::flags::*, bindings, drm::{ self, @@ -14,10 +13,7 @@ AllocOps, // }, }, - error::{ - to_result, - Result, // - }, + error::to_result, prelude::*, sync::aref::{ ARef, -- 2.52.0