Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6166a76f authored by Fabian Frederick's avatar Fabian Frederick Committed by Brian Norris
Browse files

mtd: ftl: use swap() in copy_erase_unit()



Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent fdd9d27c
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -571,12 +571,8 @@ static int copy_erase_unit(partition_t *part, uint16_t srcunit,


    /* Update the maps and usage stats*/
    i = xfer->EraseCount;
    xfer->EraseCount = eun->EraseCount;
    eun->EraseCount = i;
    i = xfer->Offset;
    xfer->Offset = eun->Offset;
    eun->Offset = i;
    swap(xfer->EraseCount, eun->EraseCount);
    swap(xfer->Offset, eun->Offset);
    part->FreeTotal -= eun->Free;
    part->FreeTotal += free;
    eun->Free = free;