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 224D020469F; Tue, 4 Mar 2025 13:44:06 +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=1741095847; cv=none; b=hDKuqvEl1GE9fh9kcPjB+Wy4AwLUAvegq+Wvl88+QBPmVIYOTTAnqF+UCGpHTa6RaCaXepdICTkucLRoDh3rI0jvA0yOqCAJXESRF4Q+w9ZkU1X7Hs+JDkVdLzMpqMNqh3XaPwtoZCXKtSqVd1fu231Jl80+5hawis1XfQK+kcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741095847; c=relaxed/simple; bh=B/OYmvy9zr76agLhnG0ycC+hDadBQqyUMPzhZTGcanM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=NgSpEy0jLvaJmI95UGPoSp3speQ1YkVAcBBx+e0cdcu2gy2XB/CKABsHrdc7MzhEUzRaA01VDOmEZO24bntyIGYlgf7CRRxQsohIJymxc8neLnu883Y9xK/JfFKMzE6gntiXlOXEqJLcF5XyQm6SjtfAvjreNEO915lpT9Vn10E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GHaYIPdZ; 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="GHaYIPdZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BFDDC4CEE5; Tue, 4 Mar 2025 13:44:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741095846; bh=B/OYmvy9zr76agLhnG0ycC+hDadBQqyUMPzhZTGcanM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=GHaYIPdZB+3UljcK2WXyQXDq+T9ZSbm/1EV7+xgFEyBmpEG7aNwiAmIEvav0i57n5 R+x8B7q/vCA+kQSUXQBO6Hcw6kua+dMeNcktLTC35whgzDglHoGtM7GL1oFrLqINF2 RpYHZHPsE/H+qjUNtp+CKm8iDiBzFNIdACL+SPF4mYIOoqmAVg2qU9Vgxc82hwyYP/ c9DEKunX7RPzayF26nR3NjICU+kN9QofOR412fFlQ+4g7J0qD36PXz95ncl1Qu4Yy2 v/q/GgqqnrHiANFJAovw31SjDC3DDKjml987HDer3c86Mhpy31HU5VNPLpZpKD0sLb IY0wW22zban+Q== From: Andreas Hindborg To: "Daniel Almeida" Cc: , , , , , , , , , "Alice Ryhl" Subject: Re: [PATCH v2] rust: irq: add support for request_irq() In-Reply-To: (Daniel Almeida's message of "Mon, 10 Feb 2025 05:41:17 -0300") References: <20250122163932.46697-1-daniel.almeida@collabora.com> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Tue, 04 Mar 2025 14:11:00 +0100 Message-ID: <87ikopgcuz.fsf@kernel.org> 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=utf-8 Content-Transfer-Encoding: quoted-printable "Daniel Almeida" writes: >> On 22 Jan 2025, at 13:39, Daniel Almeida = wrote: >> >> Add support for registering IRQ handlers in Rust. [...] >> +/// use kernel::prelude::*; >> +/// use kernel::irq::request::flags; >> +/// use kernel::irq::request::Registration; > > By the way, I wonder if a re-export would be beneficial? I find it a bit = tedious to specify this path. > > It also clashes with kernel::driver::Registration and kernel::driver::drm= ::Registration, so I find myself > continuously writing an alias for it, i.e.: > > ``` > Use kernel::irq::request::Registration as IrqRegistration; > Use kernel::irq::request::Handler as IrqHandler; > ``` > > Looking at mq.rs , I see Andreas did something similar: > > ``` > pub use operations::Operations; > pub use request::Request; > pub use tag_set::TagSet; > ``` > > Asking for opinions here since this is a bit cosmetic in nature. IMHO, at= least the =E2=80=98request=E2=80=99 part of the path has to go. For block I usually import `mq` if there can be clashes, then I can use `mq::Request`, which is not so bad. I think a reexport to make `irq::request::Request` available as `irq::Request` would be nice. In `mq`, most sub modules are not pub, so the only way to reach the types is through the reexport. Best regards, Andreas Hindborg