Skip to content

Commit 44662e6

Browse files
committed
nvme: mi: dev: Fix pdlu typo for NvmSubsystemHealthStatusPoll
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
1 parent 12f0d96 commit 44662e6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/nvme/mi/dev.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl RequestHandler for NvmeMiCommandRequestHeader {
198198
debug_assert!(ctemp <= u8::MAX.into());
199199

200200
// Derive PLDU from write age and expected lifespan
201-
let pldu = core::cmp::min(255, 100 * ctlr.write_age / ctlr.write_lifespan);
201+
let pdlu = core::cmp::min(255, 100 * ctlr.write_age / ctlr.write_lifespan);
202202

203203
let nvmshds = NvmSubsystemHealthDataStructureResponse {
204204
nss: (subsys.health.nss.atf as u8) << 7
@@ -215,7 +215,7 @@ impl RequestHandler for NvmeMiCommandRequestHeader {
215215
| (!(ctlr.temp_range.lower <= ctlr.temp && ctlr.temp <= ctlr.temp_range.upper) as u8) << 1 // TTC
216216
| (!((100 * ctlr.spare / ctlr.capacity) < ctlr.spare_range.lower) as u8),
217217
ctemp: ctemp as u8,
218-
pldu: pldu as u8,
218+
pldu: pdlu as u8,
219219
}
220220
.encode()?;
221221

0 commit comments

Comments
 (0)