On 2020/5/5 20:10, Matthew Wilcox wrote:
> On Tue, May 05, 2020 at 07:55:40PM +0800, Zhen Lei wrote:
>> +#ifndef SECTORS_PER_PAGE_SHIFT
>> +#define SECTORS_PER_PAGE_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)
>> +#endif
>> +#ifndef SECTORS_PER_PAGE
>> +#define SECTORS_PER_PAGE(1 << SECTORS_PER_PA
On Tue, May 05, 2020 at 07:55:40PM +0800, Zhen Lei wrote:
> +#ifndef SECTORS_PER_PAGE_SHIFT
> +#define SECTORS_PER_PAGE_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)
> +#endif
> +#ifndef SECTORS_PER_PAGE
> +#define SECTORS_PER_PAGE (1 << SECTORS_PER_PAGE_SHIFT)
> #endif
I find SECTORS_PER_PAGE_SHIF
This is similar to commit 233bde21a ("block: Move SECTOR_SIZE and
SECTOR_SHIFT definitions into "), prepare to clear dozens
of duplicated codes.
Signed-off-by: Zhen Lei
---
drivers/block/zram/zram_drv.h | 2 --
include/linux/blkdev.h| 10 --
2 files changed, 8 insertions(+), 4 d
3 matches
Mail list logo