release-7: fix kasli-soc demo compilation warning #277

Merged
sb10q merged 1 commits from morgan/artiq-zynq:demo_warning_fix_release into release-7 2023-11-07 13:41:12 +08:00
Owner

Summary

  • backport of #274
  • gate all io_expander compilations behind has_drtio to fix compilation warning related to use crate::pl::csr; and virtual_led_mapping
  • functional check
    • master: SFP LEDs work
    • satellite: SFP LEDs work
    • standalone: compiled without warning
  • compilation check
    • run nix build <variant> -L for kasli_soc master, satellite, standalone and all built successfully

Compilation Warning before patch

$ nix build .#kasli_soc-demo-firmware -L  
...
firmware>    Compiling io v0.0.0 (/build/src/libio)
firmware> warning: unused import: `crate::pl::csr`
firmware>  --> libboard_artiq/src/io_expander.rs:4:5
firmware>   |
firmware> 4 | use crate::pl::csr;
firmware>   |     ^^^^^^^^^^^^^^
firmware>   |
firmware>   = note: `#[warn(unused_imports)]` on by default
firmware> warning: field is never read: `virtual_led_mapping`
firmware>   --> libboard_artiq/src/io_expander.rs:36:5
firmware>    |
firmware> 36 |     virtual_led_mapping: &'static [(u8, u8, u8)],
firmware>    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
firmware>    |
firmware>    = note: `#[warn(dead_code)]` on by default
firmware> warning: 2 warnings emitted

## Summary - backport of #274 - gate all io_expander compilations behind `has_drtio` to fix compilation warning related to `use crate::pl::csr;` and `virtual_led_mapping` - functional check - master: SFP LEDs work - satellite: SFP LEDs work - standalone: compiled without warning - compilation check - run `nix build <variant> -L` for kasli_soc master, satellite, standalone and all built successfully ## Compilation Warning before patch ```bash $ nix build .#kasli_soc-demo-firmware -L ... firmware> Compiling io v0.0.0 (/build/src/libio) firmware> warning: unused import: `crate::pl::csr` firmware> --> libboard_artiq/src/io_expander.rs:4:5 firmware> | firmware> 4 | use crate::pl::csr; firmware> | ^^^^^^^^^^^^^^ firmware> | firmware> = note: `#[warn(unused_imports)]` on by default firmware> warning: field is never read: `virtual_led_mapping` firmware> --> libboard_artiq/src/io_expander.rs:36:5 firmware> | firmware> 36 | virtual_led_mapping: &'static [(u8, u8, u8)], firmware> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ firmware> | firmware> = note: `#[warn(dead_code)]` on by default firmware> warning: 2 warnings emitted ```
morgan added 1 commit 2023-11-02 13:22:11 +08:00
sb10q merged commit b8ff602d93 into release-7 2023-11-07 13:41:12 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#277
No description provided.