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 708641EDA09; Tue, 15 Jul 2025 12:37:22 +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=1752583043; cv=none; b=UkuQ39j/fGA1//m7scASPuQDOaYsz8NPuXzsHRvoAYD32TXbgriQWnMGfJ0Rr5llDoyDHQOdO0h3HRrmc+M81j/4OZ0/X0x2DDL+zEexXPLY/t6LC1xafJsVi7CilBo9NfAtokVYUIr83eKSKDAS/Lh/k7Ur32sKdoJXpfU9E8w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752583043; c=relaxed/simple; bh=4H+aBzxKOxX4fKGY9phd6BfYevXHiHL6VFDuZqqNKCs=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=iy8dHi7+NvnOFjn0XfyxqC48f0iDMZ3VCG9dPyHRaMIP5tApSwwNKa74Hh7kdpShfIq+0RGdu1qhVNS1569BvHqsKwgdyiVI31eN3TX29V+f+EDFwwTI0zYlbjG+1c+Ec7EfSQh2tAu+UXidXLZcQFstKevX5WzVOo4ouCaGVaw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YoAptYmF; 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="YoAptYmF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6479DC4CEE3; Tue, 15 Jul 2025 12:37:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752583042; bh=4H+aBzxKOxX4fKGY9phd6BfYevXHiHL6VFDuZqqNKCs=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=YoAptYmFnHkB8l8z5+wd8IuAvgyVyt66ThExmXk01SrG0IKbi7aVoi/Wv37kGXaLM tdNIaqmJscgbyaCVS+GQ/WQfVLWUTn2uv0USEFIPXmarBlXNqCx8vNicuXDj2fDo4T 8oFxcsJciX64VINjE/wPExoSczVs2pCkENZwbV2K7qYr43Gxy/NQbVprltcTykbiMO 8ys18LLUlEGM5mPDFTEWX/RZJ7++R1NV8phrLhM5p/9voJURlSwz5g7+kvfjl0vbMl 4Kt0xTlVLKZAGTVS/k7omgaBGDyfanjn/rmBG7EiY7FUAHY3mRXHLwu2WIvSY502zl hXxoSDy7H+hcw== 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: Tue, 15 Jul 2025 14:37:17 +0200 Message-Id: Subject: Re: [PATCH v6 3/6] rust: irq: add support for non-threaded IRQs and handlers Cc: "Daniel Almeida" , "Benno Lossin" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Andreas Hindborg" , "Trevor Gross" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , "Thomas Gleixner" , "Bjorn Helgaas" , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , , , To: "Alice Ryhl" From: "Danilo Krummrich" References: <20250703-topics-tyr-request_irq-v6-0-74103bdc7c52@collabora.com> <20250703-topics-tyr-request_irq-v6-3-74103bdc7c52@collabora.com> In-Reply-To: On Tue Jul 15, 2025 at 2:33 PM CEST, Alice Ryhl wrote: > On Mon, Jul 14, 2025 at 5:13=E2=80=AFPM Daniel Almeida > wrote: >> >> Hi, >> >> > >> >>> >> >>> (2) It is guaranteed that the device pointer is valid because (1) g= uarantees >> >>> it's even bound and because Devres itself ha= s a >> >>> reference count. >> >> >> >> Yeah but I would find it much more natural (and also useful in other >> >> circumstances) if `Devres` would give you access to `Device` (at >> >> least the `Normal` type state). >> > >> > If we use container_of!() instead or just pass the address of Self (i.= e. >> > Registration) to request_irq() instead, >> >> >> Boqun, Benno, are you ok with passing the address of Registration as = the cookie? >> >> Recall that this was a change requested in v4, so I am checking whether = we are >> all on the same page before going back to that. >> >> See [0], i.e.: >> [0] https://lore.kernel.org/all/aFq3P_4XgP0dUrAS@Mac.home/ > > After discussing this, Daniel and I agreed that I will implement the > change adding a Device argument to the callback. I will be > sending a patch adding it separately as a follow-up to Daniel's work. That works for me, thanks!