From nobody Sat Feb 7 12:19:39 2026 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46A92363C64 for ; Tue, 13 Jan 2026 15:13:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768317212; cv=none; b=gdYJsQqdFhj6p+t1gkwo2RT/Lb+i+CrN2FObel/zfrg6Kmp1Fa/FZ8uM67driL/i/6ReRJKF7vqh4ioA9alxAbOfyQEIAUX1SdPn8Rm7sypjMJ37AZ+D7gce6pYCi0D/myokMh5KVf0uprR5W21q9Kpkd7qajKSzO4ALdOK8Qls= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768317212; c=relaxed/simple; bh=5DE8fHUHNeug+88kGFo3S/QoXnkelD/PvswD8rGjIrM=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=DYCWf+bfO9mwMPgyP59doaMNL9I6CXPMKER5CiD5QIK3dxJh9RYAYq3AmvHLGeHpb9t6lO37VADJRA9Ox9AYv9T7yeOaIjQs7GXSLjuHvCvQYLpK88MUguEH/ooOg7xNUpS2nzz6V19gulfXYvqsp3asms8c+oHI5vD2hnYcYVU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=I0xhZ6ud; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="I0xhZ6ud" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-43284f60a8aso4350402f8f.3 for ; Tue, 13 Jan 2026 07:13:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768317207; x=1768922007; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=clahOJSyAVmCLVNVjHaJTlJ4hThwgbY6ylIwpTEN8h8=; b=I0xhZ6udPcaRNeEhWztS9BIlheYHH78ilQ0ssnqyG+aDyEtt2ZgRIJEFMXcZxmErFh Ej2OY3B9/C1PglWoh/3bi7ywKQ9Bu5WqQgOzme5UiIqNVRzyb/pQXdUnkO6Qmgkjtrt+ VV8NK9cTKMs6OTRzWSN8SAXRtB9ypauip8DK5c77gK3x0M6AZ5GljGjFio4BWiy7IzkO OSIzEOHDw6GimKjcPKgT/IlhLE7eXigs3cSRMyYQcP+NVnhC02k7+z2xaiaE4vOvtQbp oq2p3JqOcIirjWXkhLjLJdZo5/nTn7RtXay4utXCAc9lv569lZArjJVIyxu8U2kfUKi3 eAZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768317207; x=1768922007; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=clahOJSyAVmCLVNVjHaJTlJ4hThwgbY6ylIwpTEN8h8=; b=hAv3z15gD1qpdoi38UDWp1bYFfxELeMvPMRQywJCrIpUFSAh+jB4iEe1iuLPpr0BAB z5z13tzT8ppY0W+c2vmvEaotTLuYJI4TbZ6UBMg5O33T2mTCjkere6bKEVNZAme+bsOP P9KhIVz8cUKvAhom97aT4pb0+oQt7Gp+NkqykcCBaCAVydPbWGyXRz2E8qZ+pAJKGEPP keiMQwjzNRclDagEVoAnqqy5YtNiWZtPCvAOhR8gZcuyefy9zmSfztcOhJLSZOH9mCKK yj0uyw1dlFV5aIOUzA54mhV/emGObQwpRqnTFd0HpPSpeQejFeFihAtW3iAcKDhGwmBA YLEA== X-Forwarded-Encrypted: i=1; AJvYcCXHWzY8n/bRmV/INEXtfG9M0HYjsb05kPfOhCcHnNlVuS8a/np7iql26LpswIjPyaWvl9arbepG2H4BSi4=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5Uzgg3KStTNP35sN2LLfhEQlav0A/kqO4cPxk+a+jt+vADt+c REJX2SVR2ynZNheww3G8nUwxZdJULVp12zD9Xbxtg/hP9G+CCMK0/Nkl028SQ2kVNh8F/Abe1fT U4yYPGytVdi5tna6szg== X-Google-Smtp-Source: AGHT+IFANjV4vLX5QPuJ5KpCs0Rj644PourkYIVXhMKZkYuRk0oEaR0gmzWWf8Xi/v74hg4ToVXO6AC9XE7qoTU= X-Received: from wrbbs10.prod.google.com ([2002:a05:6000:70a:b0:430:a835:4ce8]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:1a8b:b0:432:84f9:95f4 with SMTP id ffacd0b85a97d-432c374f4a7mr27176145f8f.31.1768317206801; Tue, 13 Jan 2026 07:13:26 -0800 (PST) Date: Tue, 13 Jan 2026 15:12:36 +0000 In-Reply-To: <20260113-clk-send-sync-v4-0-712bc7d94a79@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260113-clk-send-sync-v4-0-712bc7d94a79@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1369; i=aliceryhl@google.com; h=from:subject:message-id; bh=5DE8fHUHNeug+88kGFo3S/QoXnkelD/PvswD8rGjIrM=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpZmEQNNwQvfw9jQxuDNt4fC2n5Cfx+vcwSjcWB EjbHAg9hU2JAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaWZhEAAKCRAEWL7uWMY5 RvRxEACuwFIesZvoHE5gK5RQaiufwGNORvDKEuP1GJmMebtB3qC4PmH2wFMguWvNpJTUKWU0D5d jdQ+ITMxKWDtDMpGzdoBMliByodTN5wwtvNZGIPaLLEUZ+uImdP1HlZ+5M03+eyQJOMs05GW7Zc TSlL6zpiv+54WAj40TJH1d5HPB0WLbITPscM6xHXaCvfaCMxSEcbqqDprp8VoDZ6zgZSeAIqc8v zVSXwizZxkbc9uGfqfyY6kGS2soNpo+IyeElYFqMNY4pR992VOqL1+37BbqF6BxAxLrtBwNoyBC KbUq7ZcC+1DqYAejPv1soQ+e+hcJK9X/dtfkBjW6GBe3B9P0Y6s7qEHIUqV7BSEvxOB/mIQ5UZ0 rtRm3VEAOnA8v8E2oGTQazJ58ezoKWwB5L6muDTmHlSyEYQhVqNUNAVsxi61bWxCcuXPu9KmxgC LHI3zLNriAuors7Gzwlu7Ahzu/6yPgqwJ6ebzzMhWAwTKLvVRvIL7BbAMjEEfFofP9IEuyazi/l Up8zWnwYgaiqqLz/g9gxZdaF1h1dm0DWqMUCkAe0/o95w00/ZUtgyOkYMGdSqL8zyYHhS6K7/Qg NaPzd6f01DT77HGn2DEO6xOX2PbrAgvzU9PVSXxUEpt/0wR1I5PF2aS3brFDfpjwLpJ/0c2p8pf 28UFVHEynEoLnxg== X-Mailer: b4 0.14.2 Message-ID: <20260113-clk-send-sync-v4-1-712bc7d94a79@google.com> Subject: [PATCH v4 1/3] rust: clk: implement Send and Sync From: Alice Ryhl To: Stephen Boyd Cc: Michael Turquette , Maarten Lankhorst , Maxime Ripard , Drew Fustini , Guo Ren , Fu Wei , "=?utf-8?q?Uwe_Kleine-K=C3=B6nig?=" , Michal Wilczynski , Viresh Kumar , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Daniel Almeida , linux-clk@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pwm@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable These traits are required for drivers to embed the Clk type in their own data structures because driver data structures are usually required to be Send. Since the Clk type is thread-safe, implement the relevant traits. Reviewed-by: Daniel Almeida Reviewed-by: Danilo Krummrich Acked-by: Viresh Kumar Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Signed-off-by: Alice Ryhl --- rust/kernel/clk.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs index c1cfaeaa36a22be2e3180b1e9142bb608ab276ea..d192fbd97861212d738d24510ee= bcd99c9177f2c 100644 --- a/rust/kernel/clk.rs +++ b/rust/kernel/clk.rs @@ -129,6 +129,13 @@ mod common_clk { #[repr(transparent)] pub struct Clk(*mut bindings::clk); =20 + // SAFETY: It is safe to call `clk_put` on another thread than where `= clk_get` was called. + unsafe impl Send for Clk {} + + // SAFETY: It is safe to call any combination of the `&self` methods i= n parallel, as the + // methods are synchronized internally. + unsafe impl Sync for Clk {} + impl Clk { /// Gets [`Clk`] corresponding to a [`Device`] and a connection id. /// --=20 2.52.0.457.g6b5491de43-goog From nobody Sat Feb 7 12:19:39 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33558389DE3 for ; Tue, 13 Jan 2026 15:13:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768317211; cv=none; b=rSAOMabsgpFSwKDunEUOfbiX2qIdUuEWhfVP64XuKh54nHkSp9VnpE4l+Wsihu2Gl7SFZpvd7kshGWzbBq0KmjyQ8K1x/zUSBv27oR/xxJaFz9QWrMguREsQSXiOUwdtF5aONdEDJxzZvJbHGyAgsFQYUx23YSstdj7Poj+kNT0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768317211; c=relaxed/simple; bh=gBgvzdGxsZJ9P+o4TYuYZOZRWaJW6R3le+1fCyVi18I=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Vt6IKhp/4hjwqWc6VFQnXt7wCe3D1K7PN+XMQYRtuOEv3hBphYE9BXadxKq4T7fm8c0m080NjtIj5DoBqm2K8I98qW25VqLDU2er3S1x8aAVtpq9XPkGZfueCbddoEjlzxlukV2Bq9J9VhEydlVr+TKBeR0+yLun70QwctMHNMI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Dj+qPv+j; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Dj+qPv+j" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47d28e7960fso78405115e9.0 for ; Tue, 13 Jan 2026 07:13:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768317209; x=1768922009; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=+856FUFrQ1uMLS1oGlG8WJLskHLLy9o2M4Kx5xq+7BM=; b=Dj+qPv+jJqupyZRP7Wj37/5EsQU+bNFiakmdCA3aNZJS6iapgb4zKg/sYzUB+oIrSG tc8/6UBQBj5CWJnRY73jLigb6vZBJ7m5N4onkJ4PNZ/VXaI0uF6ckckOw9mzuoNlrFm7 sbtnnrEt4L8kY8VMQeTjYfkwAb31SHZtOLHs/mR6faOCZSS4TtTl8uMyBep+om0FkIQc C1rm+TsNue6AhtOQ3NrKV07mQT8624VGrnGC9VK48ne34gXjfU7PX1aXQa+tp561eDJY G6TNBaH8fX9vEqPpVCDZfKPU6BNOk+2f6EBQ2baWfVjwLsWbKwbu7cFEZ8LHpbyYiFXf fHMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768317209; x=1768922009; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+856FUFrQ1uMLS1oGlG8WJLskHLLy9o2M4Kx5xq+7BM=; b=XMHv6fo+RKkYM3AKkNmUeKDagFb1z3hTffIQo6ScNZ2psplvJZaRom3SDOogDfJwgR eCFSUDfxR6wLm2HUmRelNDdzvKOW7SS/nf5vyQ3yC9W1q0c3keTdkz6XqtqMcBnpqb+9 mx+NI7u+NIFuFrBmKP/eQirBA9He/P1f+gOE8Ta1KUQe50S3fiDtKoARA2j6IWRwhn/e BGG22Uj7RSbfyRPTz/7DaH9es99RiJMEZ/GBssLrbMzNNQ5aHb2oFhCmKvKmhCAA9bey YAqLfuZ7yo26fQv6mSZ7Aoi0kxtDZkIC5vCzbZxMyZFIJf+M0Cab8xbk5BXdqckvWGzR X25Q== X-Forwarded-Encrypted: i=1; AJvYcCXD3ujqC9AVes3OuEPeLsu4112UDI6qKIndwEZha6XeytxlK4hjsLpkh5EvAKAeBBHjrQDaP9evnoCIY1Y=@vger.kernel.org X-Gm-Message-State: AOJu0YzgFVESDYx/C1rUqcyuDgqLaOT+SmLgqQBTsxFIt5Og7WquSLD6 84BJI6Q1Ajcds0WtX7ms6HQk+YPyJb10Ts6kTInd5bpOElbX5/MsFKzUmh+uuN7udoZP1v/4fmu mNIr9Y0x9ytB4ozvRvQ== X-Google-Smtp-Source: AGHT+IGmHpal9o9kYRCqeudE5OGpHQsDJxQXH71nc/uK+vHzcbqRlM1R9M+yj/rHy+PL0q1Xd9tRxUhXRg/AaE8= X-Received: from wmkn12.prod.google.com ([2002:a7b:c5cc:0:b0:47b:e2d9:2e56]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1f8c:b0:477:7d94:5d0e with SMTP id 5b1f17b1804b1-47d84b40955mr245818705e9.27.1768317208607; Tue, 13 Jan 2026 07:13:28 -0800 (PST) Date: Tue, 13 Jan 2026 15:12:37 +0000 In-Reply-To: <20260113-clk-send-sync-v4-0-712bc7d94a79@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260113-clk-send-sync-v4-0-712bc7d94a79@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1702; i=aliceryhl@google.com; h=from:subject:message-id; bh=gBgvzdGxsZJ9P+o4TYuYZOZRWaJW6R3le+1fCyVi18I=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpZmEQ3m0NLVAdMWPcGPUsnYIg3W5r/sNDHFFhx Dkr8r8Oc/GJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaWZhEAAKCRAEWL7uWMY5 RvfEEACjTscIGJhJynFAKM6GeR0pshAjNruRsL1XI2fjXIhSE+SSnT4iB2E59xTIcS3M+nwv0oR lptUt2zMowQ0JNWnWfMlhYHwaSgd7j+IBwQOVbs8KFtzuMLrLQD1PpJmYQYsx9aIlzyb5uPIF+p 6I7+cnay5Xpoc6yv21NhJ1/WW77v+u3zgxTMoY6eyuF7ItHn0gI12TPn5TDUyqba8oE7XCAEiz5 DY7lo6vCuKHJHY/ysoW1cIN/3CLRBTgof4w8crzoLDnO26t1/55uZ6xRyhgkVNrWfpuKTpOFW+R AES7YP3VLCq2TMXhF9XeJ/ZqiDJFo2sawCja+1APoWHLnZRPL7Yn4JhxuD0vg9JpdjyEEGQk1LJ eNCsvUE1AsYAHWajubBONw1i0Zp9grMM2d+rkKCESW7cmqCNVBTEMUekH/wzc8r4N4FJSRq5Gen a/jBA/914TYhFX3ld9WgYBN1nrvIur9CJdr3CwZZmc1y6cAwUw21Fnh77pJF5/CRK2VXR1UPL4Y epuqg2O56ZCBKBG24sLv0yZ2FylVV1jXkBGC0sPytS+Zw26BczE2hM1tgQ0JaDOKKFTGWLF2x6Z 1h9mybuFKl/JaZmCCV/9SPM03m6WMzhmRV/Xnv6AGxM6KuU/VWAMbEPsCuoc0Po791vKHzbbfCd 1qJ4UwkULxYnX9A== X-Mailer: b4 0.14.2 Message-ID: <20260113-clk-send-sync-v4-2-712bc7d94a79@google.com> Subject: [PATCH v4 2/3] tyr: remove impl Send/Sync for TyrData From: Alice Ryhl To: Stephen Boyd Cc: Michael Turquette , Maarten Lankhorst , Maxime Ripard , Drew Fustini , Guo Ren , Fu Wei , "=?utf-8?q?Uwe_Kleine-K=C3=B6nig?=" , Michal Wilczynski , Viresh Kumar , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Daniel Almeida , linux-clk@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pwm@vger.kernel.org, Alice Ryhl Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Now that clk implements Send and Sync, we no longer need to manually implement these traits for TyrData. Thus remove the implementations. The comment also mentions the regulator. However, the regulator had the traits added in commit 9a200cbdb543 ("rust: regulator: implement Send and Sync for Regulator"), which is already in mainline. Reviewed-by: Danilo Krummrich Reviewed-by: Boqun Feng Reviewed-by: Gary Guo Reviewed-by: Daniel Almeida Signed-off-by: Alice Ryhl --- drivers/gpu/drm/tyr/driver.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs index 0389c558c0367522471ea78fcf72a6b58c4a3650..09711fb7fe0b1c83b72bffba06f= 5a76c53244f4d 100644 --- a/drivers/gpu/drm/tyr/driver.rs +++ b/drivers/gpu/drm/tyr/driver.rs @@ -53,18 +53,6 @@ pub(crate) struct TyrData { pub(crate) gpu_info: GpuInfo, } =20 -// Both `Clk` and `Regulator` do not implement `Send` or `Sync`, but they -// should. There are patches on the mailing list to address this, but they= have -// not landed yet. -// -// For now, add this workaround so that this patch compiles with the promi= se -// that it will be removed in a future patch. -// -// SAFETY: This will be removed in a future patch. -unsafe impl Send for TyrData {} -// SAFETY: This will be removed in a future patch. -unsafe impl Sync for TyrData {} - fn issue_soft_reset(dev: &Device, iomem: &Devres) -> Result { regs::GPU_CMD.write(dev, iomem, regs::GPU_CMD_SOFT_RESET)?; =20 --=20 2.52.0.457.g6b5491de43-goog From nobody Sat Feb 7 12:19:39 2026 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D485838E113 for ; Tue, 13 Jan 2026 15:13:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768317213; cv=none; b=UAbu/ySOPGAxpvw96808F8QRajPZyCmmgvjCQQixjURoxE5vcUlWVEtNqDwTV7ZWfMPqEQunhxBAvXIWTHkRPCCK6SyaX+Ddkk6Lg0CdlZD05nAaInonng7KbjdR6JUdOqbmhOWubSf5rG7yQ3LgjXRiuumzp03rusaxuno7DQY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768317213; c=relaxed/simple; bh=vFWramkwrqwtJwgC1sH4LSgngbV/etS8iNI590sqCqw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=EoyKKb0SfzoJso8BEUtm1t437uIaw1BSw4IpuJfQF4jbrceJeGx5kRqp6eTVB49KiUPjUuA6fwpKuLFRzDJfpMkmFIS5vAhiEd2F2NeKdcVhQlDzfDmmA5JqTAAnbtXTvL3FKhIQd14O2llfPcbmDSurDBqIRf78M8WuNB9LKwU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=D9MBpuSB; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="D9MBpuSB" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47d1622509eso49720385e9.3 for ; Tue, 13 Jan 2026 07:13:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768317210; x=1768922010; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=+gU9SYYpNNrQwCuq4FN+wHCGTlifJ/wCG0O0IkTkZkI=; b=D9MBpuSByWz878kOb/4JrWv+zQhlvU7+jNvCvJUNCXxPsWW/jI0DRcLGSwFq3p6XxF aG6dgoFPdG828zvPGKQL6tkQCmdRQs+k+eMOlvldtWa89rLuLxCIegEVJlUBf3AdY4HW Rr9tc0PDH/SHsCeoWaNLBkx6+5KqMa/ZLo5O6XjV3iTRoNbOLCXUQd3bsUDI0CqSQB+t dz04MUwmMVQx7CJ7ZVjwlZNazViQEuC5/RZ6w/N0kIno6EeThHGDNQ05sJF7PzIodkpY VyZhvj7hZ82Ku9TgFJw0LhcQQxqnk8j7rcfYD8Yr6X7tSk46LpXxQPeAcjC+Zkb9WPv7 VFNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768317210; x=1768922010; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+gU9SYYpNNrQwCuq4FN+wHCGTlifJ/wCG0O0IkTkZkI=; b=K2T//Hx6X4AUHavjSnLGtdrCpcuBdxqamNIuoZdrjqWHPoBeyYkynK8dGN08MfPmmc 2dl/1Yf+nMR5dGxp3vsVQIiMTKgWKy/q6VWOUGtdUjdVlYTa+lyCdzZrXANXcdfe+TKi xJLBpFrseZknrrJC4OLDikfLUGbvAGUvz1T1+YvRCukDtA/DfTE7N6PnVtJhOdTwzXuw G3e04usz07HD/dTlmQAnZs6fnIQzjaW5ddgZ5x7xBp2CMQuEZ51+uTqqsW7DiSXZXGzq 6EzJlIbW1pZiUvOI25UYsfkUYhxzO8PUgVnTUpNvKomzJXUADmOxYaOKANWuIwp2BT3A 9LGg== X-Forwarded-Encrypted: i=1; AJvYcCXLRnxtx4Mz8T0umuVYFb0l1m4QavA7k0uMslYBFJpLG1DRLLwlgdBjFqSX1ZN9HflY/bf3pEqX7Td5h9Q=@vger.kernel.org X-Gm-Message-State: AOJu0YyltFUQ4w4aOcom//LdLOsOeUQsqx3RFfwAk8dUzvEwHi416VSc qZXJcg+OPVoOC1EUkKqIcayDLJeAiijUtJL/J+iN4KVVhIUhzjsGq3cw8K1pOEk34rhjH1vbMhc g5lkKA5HPZFjbaEJnAA== X-Google-Smtp-Source: AGHT+IHnuUTaCAWBbZD9W2h/OSSmDtQjxvZdpq6nNLyiRYLG1dj5BdsEl+mKz8Ozip0V1tf1O9hZfCnqvscWuD4= X-Received: from wma11.prod.google.com ([2002:a05:600c:890b:b0:477:a4d4:607a]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:46cb:b0:47a:810f:1d06 with SMTP id 5b1f17b1804b1-47d84b26da4mr243374615e9.4.1768317210336; Tue, 13 Jan 2026 07:13:30 -0800 (PST) Date: Tue, 13 Jan 2026 15:12:38 +0000 In-Reply-To: <20260113-clk-send-sync-v4-0-712bc7d94a79@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260113-clk-send-sync-v4-0-712bc7d94a79@google.com> X-Developer-Key: i=aliceryhl@google.com; a=openpgp; fpr=49F6C1FAA74960F43A5B86A1EE7A392FDE96209F X-Developer-Signature: v=1; a=openpgp-sha256; l=1764; i=aliceryhl@google.com; h=from:subject:message-id; bh=vFWramkwrqwtJwgC1sH4LSgngbV/etS8iNI590sqCqw=; b=owEBbQKS/ZANAwAKAQRYvu5YxjlGAcsmYgBpZmEQEuN4uaDvBaM5TmqN9WnhJMSuME0tcTbvE YTkLG+hAaWJAjMEAAEKAB0WIQSDkqKUTWQHCvFIvbIEWL7uWMY5RgUCaWZhEAAKCRAEWL7uWMY5 Rl6hD/0auoTL/sGpImpn7/kPf/KAL2X3YoNiKIZzHThKN8uT1uxeAYone+3mo8qyaTcM9DDITr6 5cq6SQN1VE2Upbba2oSwzLdXTkToZdNh+mu4Eq7ky7DhHdURd5KFsAFZz5bKVWAmFMxPGbXUWic zpbpxMTJ6QUnuHOIvfuu39nblQdZZj/6inRVCAcTQSmG5vF+0/DftaL6fp7SaUGj5FCNfgFRCmL YfTJ/wKsnbTffuMy8sp7BuWtqb4OBFXJPp5j+I8cTSmiyuKCVi2p3nkwxAr08fVpyFR5Jd0y50w otlpyfnNzzPJXkKkBzupe6ry4LS/qg/2JcnC5qdPiY6x05rKLHCxRz3ClDVzNNLp4vntSxuZQ7w 9aVP+poXva8l8+v6nfWgIO8ciKcZUO1IAaVilhy0TPvkVEvV0b33l0ek0qo35T+BaWJ++Y+42sY fBHOMq5NlR5BNtcXrC6GJUruPQL6goEC6xqO8yv++luTB8ag+k81xfDQtXot3b+YVi7M5xPzdwd JuhPfPLk0Cs4EE/1l2ROvSfM+IWqM1pzSJLQxHJTr18UvcST4VAvFFyF8C7FGjeAdCeRgpm4/T6 FzJIbAfWa+VuJMMWr7B1nkYoHdHqGCIR4tLS5Meh4HkFP2AGWG+8teZRq3kTzVMedKRt86fLJ5+ 5OXudD+J6HDSHOw== X-Mailer: b4 0.14.2 Message-ID: <20260113-clk-send-sync-v4-3-712bc7d94a79@google.com> Subject: [PATCH v4 3/3] pwm: th1520: remove impl Send/Sync for Th1520PwmDriverData From: Alice Ryhl To: Stephen Boyd Cc: Michael Turquette , Maarten Lankhorst , Maxime Ripard , Drew Fustini , Guo Ren , Fu Wei , "=?utf-8?q?Uwe_Kleine-K=C3=B6nig?=" , Michal Wilczynski , Viresh Kumar , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?q?Bj=C3=B6rn_Roy_Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Daniel Almeida , linux-clk@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pwm@vger.kernel.org, Alice Ryhl , linux-riscv@lists.infradead.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Now that clk implements Send and Sync, we no longer need to manually implement these traits for Th1520PwmDriverData. Thus remove the implementations. Reviewed-by: Gary Guo Reviewed-by: Daniel Almeida Signed-off-by: Alice Ryhl Acked-by: Uwe Kleine-K=C3=B6nig Reviewed-by: Michal Wilczynski --- Cc: linux-riscv@lists.infradead.org --- drivers/pwm/pwm_th1520.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/pwm/pwm_th1520.rs b/drivers/pwm/pwm_th1520.rs index e3b7e77356fc2492077c519073e861beb3e44df9..043dc4dbc6232020195c7b73fad= 302bbb69652df 100644 --- a/drivers/pwm/pwm_th1520.rs +++ b/drivers/pwm/pwm_th1520.rs @@ -97,21 +97,6 @@ struct Th1520PwmDriverData { clk: Clk, } =20 -// This `unsafe` implementation is a temporary necessity because the under= lying `kernel::clk::Clk` -// type does not yet expose `Send` and `Sync` implementations. This block = should be removed -// as soon as the clock abstraction provides these guarantees directly. -// TODO: Remove those unsafe impl's when Clk will support them itself. - -// SAFETY: The `devres` framework requires the driver's private data to be= `Send` and `Sync`. -// We can guarantee this because the PWM core synchronizes all callbacks, = preventing concurrent -// access to the contained `iomem` and `clk` resources. -unsafe impl Send for Th1520PwmDriverData {} - -// SAFETY: The same reasoning applies as for `Send`. The PWM core's synchr= onization -// guarantees that it is safe for multiple threads to have shared access (= `&self`) -// to the driver data during callbacks. -unsafe impl Sync for Th1520PwmDriverData {} - impl pwm::PwmOps for Th1520PwmDriverData { type WfHw =3D Th1520WfHw; =20 --=20 2.52.0.457.g6b5491de43-goog