Skip to content

Commit

Permalink
refactor: Remove unused variable n in read_cache_cancel_cells
Browse files Browse the repository at this point in the history
Signed-off-by: Akira Hayakawa <[email protected]>
  • Loading branch information
akiradeveloper committed Jan 11, 2025
1 parent 56a3615 commit 7f61410
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/dm-writeboost-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,10 @@ static struct read_cache_cell *lookup_read_cache_cell(struct wb_device *wb, sect
return NULL;
}

static void read_cache_cancel_cells(struct read_cache_cells *cells, u32 n)
/*
* Cancel all cells in [cursor, cursor + seqcount).
*/
static void read_cache_cancel_seq_cells(struct read_cache_cells *cells)
{
u32 i;
u32 last = cells->cursor + cells->seqcount;
Expand Down Expand Up @@ -783,7 +786,7 @@ static void read_cache_cancel_foreground(struct read_cache_cells *cells,
atomic_set(&new_cell->cancelled, 1);
else {
cells->over_threshold = true;
read_cache_cancel_cells(cells, cells->seqcount);
read_cache_cancel_seq_cells(cells);
}
}
cells->last_sector = new_cell->sector;
Expand Down

0 comments on commit 7f61410

Please sign in to comment.