Re: [PATCH v4 6/7] sample: rust: pci: use `register!` macro

From: Alexandre Courbot

Date: Wed Jan 28 2026 - 08:31:56 EST


On Wed Jan 28, 2026 at 9:35 PM JST, Zhi Wang wrote:
> On Wed, 28 Jan 2026 11:37:32 +0900
> Alexandre Courbot <acourbot@xxxxxxxxxx> wrote:
>
>> Convert the direct IO accesses to properly defined registers.
>>
>
> Tested-by: Zhi Wang <zhiw@xxxxxxxxxx>
>
> I can see the correct value of the registers read by the sample driver
> from the demesg.

Thanks!

>
> Additionally, Clippy was complaining about unnecssary unsafe blocks and
> can be fixed by: (I haven't fully gone through the code, just applied this
> for getting rid of the warnnings.)

This is because `Bounded::__new` has become unsafe in `rust-next` ; this
is not reflected in `driver-core-next` yet, but won't appear in -rc1.