linux-stable/drivers/nvdimm
Bart Van Assche 9f086cac51 block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h>
commit 233bde21aa upstream.

It happens often while I'm preparing a patch for a block driver that
I'm wondering: is a definition of SECTOR_SIZE and/or SECTOR_SHIFT
available for this driver? Do I have to introduce definitions of these
constants before I can use these constants? To avoid this confusion,
move the existing definitions of SECTOR_SIZE and SECTOR_SHIFT into the
<linux/blkdev.h> header file such that these become available for all
block drivers. Make the SECTOR_SIZE definition in the uapi msdos_fs.h
header file conditional to avoid that including that header file after
<linux/blkdev.h> causes the compiler to complain about a SECTOR_SIZE
redefinition.

Note: the SECTOR_SIZE / SECTOR_SHIFT / SECTOR_BITS definitions have
not been removed from uapi header files nor from NAND drivers in
which these constants are used for another purpose than converting
block layer offsets and sizes into a number of sectors.

Cc: David S. Miller <davem@davemloft.net>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-09 19:03:12 +02:00
..
blk.c
btt.c libnvdimm: Fix endian conversion issues 2020-06-11 09:22:55 +02:00
btt.h libnvdimm/btt: Fix LBA masking during 'free list' population 2020-05-27 16:43:09 +02:00
btt_devs.c libnvdimm/btt: Fix LBA masking during 'free list' population 2020-05-27 16:43:09 +02:00
bus.c libnvdimm: Out of bounds read in __nd_ioctl() 2020-04-24 08:01:22 +02:00
claim.c
core.c
dax_devs.c libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields 2019-07-31 07:28:41 +02:00
dimm.c
dimm_devs.c
e820.c
Kconfig
label.c libnvdimm: Fix compilation warnings with W=1 2019-06-19 08:20:57 +02:00
label.h libnvdimm: Fix compilation warnings with W=1 2019-06-19 08:20:57 +02:00
Makefile
namespace_devs.c libnvdimm: Fix endian conversion issues 2020-06-11 09:22:55 +02:00
nd-core.h libnvdimm, pfn: Pad pfn namespaces relative to other regions 2018-12-13 09:18:54 +01:00
nd.h block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> 2020-09-09 19:03:12 +02:00
pfn.h libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields 2019-07-31 07:28:41 +02:00
pfn_devs.c libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields 2019-07-31 07:28:41 +02:00
pmem.c libnvdimm/pmem: Bypass CONFIG_HARDENED_USERCOPY overhead 2019-05-31 06:47:11 -07:00
pmem.h
region.c
region_devs.c libnvdimm, pfn: Pad pfn namespaces relative to other regions 2018-12-13 09:18:54 +01:00