On 10/25/25 3:01 AM, Danilo Krummrich wrote:
...> Why open code all of the above in the struct Gpu constructor? This could allOn Sat Oct 25, 2025 at 2:14 AM CEST, John Hubbard wrote:
happen within Spec::new().
OK, yes, that does help avoid cluttering up Gpu::new().
If we *really* don't want to store the Spec, but only the Chipset, you can also
do:
try_pin_init!(Self {
chipset: {
let spec = Spec::new(bar);
dev_info!(pdev.as_ref(), "{}\n", spec);
spec.chipset
Right. thanks, -- John Hubbard
