[Xen-devel] [PATCH v3] block: refactor duplicated macros

2020-03-10 Thread Matteo Croce
The macros PAGE_SECTORS, PAGE_SECTORS_SHIFT and SECTOR_MASK are defined several times in different flavours across the whole tree. Define them just once in a common header. While at it, replace replace "PAGE_SHIFT - 9" with "PAGE_SECTORS_SHIFT" too and rename SECTOR_MASK to PAGE_SECTORS_MASK. Sig

Re: [Xen-devel] [PATCH v3] block: refactor duplicated macros

2020-03-10 Thread Martin K. Petersen
Matteo, > The macros PAGE_SECTORS, PAGE_SECTORS_SHIFT and SECTOR_MASK are > defined several times in different flavours across the whole tree. > Define them just once in a common header. > > While at it, replace replace "PAGE_SHIFT - 9" with > "PAGE_SECTORS_SHIFT" too and rename SECTOR_MASK to PA

Re: [Xen-devel] [PATCH v3] block: refactor duplicated macros

2020-03-11 Thread Coly Li
On 2020/3/11 8:22 上午, Matteo Croce wrote: > The macros PAGE_SECTORS, PAGE_SECTORS_SHIFT and SECTOR_MASK are defined > several times in different flavours across the whole tree. > Define them just once in a common header. > > While at it, replace replace "PAGE_SHIFT - 9" with "PAGE_SECTORS_SHIFT" t

Re: [Xen-devel] [PATCH v3] block: refactor duplicated macros

2020-03-11 Thread Jens Axboe
On 3/10/20 6:22 PM, Matteo Croce wrote: > The macros PAGE_SECTORS, PAGE_SECTORS_SHIFT and SECTOR_MASK are defined > several times in different flavours across the whole tree. > Define them just once in a common header. > > While at it, replace replace "PAGE_SHIFT - 9" with "PAGE_SECTORS_SHIFT" too