Re: [PATCH 1/3] zram: fix operator precedence to get offset

From: Sergey Senozhatsky
Date: Sun Apr 16 2017 - 21:54:32 EST


On (04/17/17 10:21), Sergey Senozhatsky wrote:
> > However, it should be *fixed* to prevent confusion in future

or may be something like below? can save us some cycles.

remove this calculation

- offset = sector & (SECTORS_PER_PAGE - 1) << SECTOR_SHIFT;


and pass 0 to zram_bvec_rw()

- err = zram_bvec_rw(zram, &bv, index, offset, is_write);
+ err = zram_bvec_rw(zram, &bv, index, 0, is_write);


-ss