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

Sergey Senozhatsky
2017-04-17T01:54:29Z

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