diff options
author | Christoph Hellwig <hch@lst.de> | 2024-03-06 07:27:37 -0700 |
---|---|---|
committer | Ira Weiny <ira.weiny@intel.com> | 2024-04-25 12:37:12 -0700 |
commit | 9566b89295196996bce57bf307bc634cb0713cec (patch) | |
tree | 7d76ee996c652e8cc48347508a9874e82ed172a3 /drivers/nvdimm/core.c | |
parent | 2c720b492c59b070930aa1be8bef6e256d3bf4b2 (diff) |
nvdimm: remove nd_integrity_init
nd_integrity_init is only called from a single place. Open code it
there, and use IS_ENABLED to remove the need for an extra stub.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240306142739.237234-2-hch@lst.de
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Diffstat (limited to 'drivers/nvdimm/core.c')
-rw-r--r-- | drivers/nvdimm/core.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/nvdimm/core.c b/drivers/nvdimm/core.c index d91799b71d23..2023a661bbb0 100644 --- a/drivers/nvdimm/core.c +++ b/drivers/nvdimm/core.c @@ -7,7 +7,6 @@ #include <linux/export.h> #include <linux/module.h> #include <linux/blkdev.h> -#include <linux/blk-integrity.h> #include <linux/device.h> #include <linux/ctype.h> #include <linux/ndctl.h> @@ -508,35 +507,6 @@ int nvdimm_bus_add_badrange(struct nvdimm_bus *nvdimm_bus, u64 addr, u64 length) } EXPORT_SYMBOL_GPL(nvdimm_bus_add_badrange); -#ifdef CONFIG_BLK_DEV_INTEGRITY -int nd_integrity_init(struct gendisk *disk, unsigned long meta_size) -{ - struct blk_integrity bi; - - if (meta_size == 0) - return 0; - - memset(&bi, 0, sizeof(bi)); - - bi.tuple_size = meta_size; - bi.tag_size = meta_size; - - blk_integrity_register(disk, &bi); - blk_queue_max_integrity_segments(disk->queue, 1); - - return 0; -} -EXPORT_SYMBOL(nd_integrity_init); - -#else /* CONFIG_BLK_DEV_INTEGRITY */ -int nd_integrity_init(struct gendisk *disk, unsigned long meta_size) -{ - return 0; -} -EXPORT_SYMBOL(nd_integrity_init); - -#endif - static __init int libnvdimm_init(void) { int rc; |