From 14f6fa6699560500e0eb04607c89ffc519e4a3ee Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 1 Mar 2018 01:25:55 +0000 Subject: [PATCH] firmware: fix a warning. --- artiq/firmware/libboard_artiq/ad9154.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/artiq/firmware/libboard_artiq/ad9154.rs b/artiq/firmware/libboard_artiq/ad9154.rs index c683ccc47..d00f2fc40 100644 --- a/artiq/firmware/libboard_artiq/ad9154.rs +++ b/artiq/firmware/libboard_artiq/ad9154.rs @@ -538,14 +538,13 @@ fn dac_prbs(dacno: u8) -> Result<(), &'static str> { 0b00*ad9154_reg::PHY_PRBS_PAT_SEL); for i in 0..8 { - let mut lane_errors: u32 = 0; /* step 9.a: select src err */ write(ad9154_reg::PHY_PRBS_TEST_CTRL, i*ad9154_reg::PHY_SRC_ERR_CNT); /* step 9.b: retrieve number of errors */ - lane_errors = (read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_LOBITS) as u32) | - ((read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_MIDBITS) as u32) << 8) | - ((read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_HIBITS) as u32) << 16); + let lane_errors = (read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_LOBITS) as u32) | + ((read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_MIDBITS) as u32) << 8) | + ((read(ad9154_reg::PHY_PRBS_TEST_ERRCNT_HIBITS) as u32) << 16); if lane_errors > 0 { warn!("AD9154-{} PRBS errors on lane{}: {:06x}", dacno, i, lane_errors); }