lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z2Q2nYIJs2hqU_mo@pollux.localdomain>
Date: Thu, 19 Dec 2024 16:07:09 +0100
From: Danilo Krummrich <dakr@...nel.org>
To: Andreas Hindborg <a.hindborg@...nel.org>
Cc: gregkh@...uxfoundation.org, rafael@...nel.org, bhelgaas@...gle.com,
	ojeda@...nel.org, alex.gaynor@...il.com, boqun.feng@...il.com,
	gary@...yguo.net, bjorn3_gh@...tonmail.com, benno.lossin@...ton.me,
	tmgross@...ch.edu, a.hindborg@...sung.com, aliceryhl@...gle.com,
	airlied@...il.com, fujita.tomonori@...il.com, lina@...hilina.net,
	pstanner@...hat.com, ajanulgu@...hat.com, lyude@...hat.com,
	robh@...nel.org, daniel.almeida@...labora.com, saravanak@...gle.com,
	dirk.behme@...bosch.com, j@...nau.net, fabien.parent@...aro.org,
	chrisi.schrefl@...il.com, paulmck@...nel.org,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
	rcu@...r.kernel.org
Subject: Re: [PATCH v6 13/16] rust: driver: implement `Adapter`

On Thu, Dec 19, 2024 at 11:53:06AM +0100, Andreas Hindborg wrote:
> 
> Hi Danilo,
> 
> Danilo Krummrich <dakr@...nel.org> writes:
> 
> > In order to not duplicate code in bus specific implementations (e.g.
> > platform), implement a generic `driver::Adapter` to represent the
> > connection of matched drivers and devices.
> >
> > Bus specific `Adapter` implementations can simply implement this trait
> > to inherit generic functionality, such as matching OF or ACPI device IDs
> > and ID table entries.
> >
> > Suggested-by: Rob Herring (Arm) <robh@...nel.org>
> > Signed-off-by: Danilo Krummrich <dakr@...nel.org>
> > ---
> 
> I get some warnings when applying this patch:

Ah, that's because your're probably having CONFIG_OF=n and some imports are only
used within `of_id_info`.

Gonna fix it for CONFIG_OF=n.

> 
> >   RUSTC L rust/kernel.o
> > warning: unused import: `device_id`
> >   --> /home/aeh/src/linux-rust/rnvme-v6.13-rc3/rust/kernel/driver.rs:10:13
> >    |
> > 10 |     device, device_id, init::PinInit, of, str::CStr, try_pin_init, types::Opaque, ThisModule,
> >    |             ^^^^^^^^^
> >    |
> >    = note: `#[warn(unused_imports)]` on by default
> > 
> > warning: missing documentation for an associated function
> >    --> /home/aeh/src/linux-rust/rnvme-v6.13-rc3/rust/kernel/driver.rs:158:5
> >     |
> > 158 |     fn of_id_info(_dev: &device::Device) -> Option<&'static Self::IdInfo> {
> >     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >     |
> >     = note: requested on the command line with `-W missing-docs`
> > 
> > warning: 2 warnings emitted
> 
> 
> Looks like the latter one is from patch 13.
> 
> 
> Best regards,
> Andreas Hindborg
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ