Skip to content

nova-core Improve pin initializer code

Danilo Krummrich dri-devel lkml nouveau rust-for-linux 1 version Applied

Status from this message: Applied to drm-rust-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4gpu: nova-core: fw: get rid of redundant Result in GspFirmware::new()drivers/gpu/nova-core/firmware/gsp.rs drivers/gpu/nova-core/gsp/boot.rs+68 -690 replies
2/4gpu: nova-core: fw: move appropriate code into pin initializerdrivers/gpu/nova-core/firmware/gsp.rs+18 -160 replies
3/4gpu: nova-core: gsp: get rid of redundant Result in Gsp::new()drivers/gpu/nova-core/gpu.rs drivers/gpu/nova-core/gsp.rs+41 -390 replies
4/4gpu: nova-core: gsp: move appropriate code into pin initializerdrivers/gpu/nova-core/gsp.rs+28 -330 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJoel Fernandes
SeriesR-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] nova-core Improve pin initializer code

This is a minor series to improve some of the pin initializer code to:

1. Reduce redundancy caused by Result<impl PinInit<T, Error>> return values with pin_init_scope().

2. Relocate code that technically fits in the pin initializer into the initializer itself.

While, thanks to pin_init_scope(), it is also possible to keep it as is, moving appropriate code into the initializer has the advantage that it structures the dependencies of fields naturally.

For instance, intermediate data that is only needed for a single field goes into the initializer block of this field, making it obvious that it is not needed by anything else.

On the other hand, intermediate data that is needed for multiple fields to initialize remains above the initializer, naturally indicating that it is needed my multiple fields.

Danilo Krummrich (4):
gpu: nova-core: fw: get rid of redundant Result in GspFirmware::new()
gpu: nova-core: fw: move appropriate code into pin initializer
gpu: nova-core: gsp: get rid of redundant Result in Gsp::new()
gpu: nova-core: gsp: move appropriate code into pin initializer

 drivers/gpu/nova-core/firmware/gsp.rs | 134 +++++++++++++-------------
 drivers/gpu/nova-core/gpu.rs          |   2 +-
 drivers/gpu/nova-core/gsp.rs          |  73 +++++++-------
 drivers/gpu/nova-core/gsp/boot.rs     |   5 +-
 4 files changed, 106 insertions(+), 108 deletions(-)

base-commit: 97cf6bc0abd381fd84e5d8e978322a62a58fb00e

Signature · 1 line
2.52.0