aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk-init.c
diff options
context:
space:
mode:
authorMatias Bjørling <mb@lightnvm.io>2018-07-13 04:48:37 -0400
committerJens Axboe <axboe@kernel.dk>2018-07-13 10:14:31 -0400
commit880eda544097a525b669df84533f439fb031684b (patch)
treec1be3b9907274db6006ca0d27bfe9ec66ac5596e /drivers/lightnvm/pblk-init.c
parentffc03fb7a52a88f87910d2b2418fd4e3069698e1 (diff)
lightnvm: move NVM_DEBUG to pblk
There is no users of CONFIG_NVM_DEBUG in the LightNVM subsystem. All users are in pblk. Rename NVM_DEBUG to NVM_PBLK_DEBUG and enable only for pblk. Also fix up the CONFIG_NVM_PBLK entry to follow the code style for Kconfig files. Signed-off-by: Matias Bjørling <mb@lightnvm.io> Reviewed-by: Javier González <javier@cnexlabs.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-init.c')
-rw-r--r--drivers/lightnvm/pblk-init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index ef8d8dea7b6b..9ea30102f61c 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -91,7 +91,7 @@ static size_t pblk_trans_map_size(struct pblk *pblk)
91 return entry_size * pblk->rl.nr_secs; 91 return entry_size * pblk->rl.nr_secs;
92} 92}
93 93
94#ifdef CONFIG_NVM_DEBUG 94#ifdef CONFIG_NVM_PBLK_DEBUG
95static u32 pblk_l2p_crc(struct pblk *pblk) 95static u32 pblk_l2p_crc(struct pblk *pblk)
96{ 96{
97 size_t map_size; 97 size_t map_size;
@@ -122,7 +122,7 @@ static int pblk_l2p_recover(struct pblk *pblk, bool factory_init)
122 } 122 }
123 } 123 }
124 124
125#ifdef CONFIG_NVM_DEBUG 125#ifdef CONFIG_NVM_PBLK_DEBUG
126 pr_info("pblk init: L2P CRC: %x\n", pblk_l2p_crc(pblk)); 126 pr_info("pblk init: L2P CRC: %x\n", pblk_l2p_crc(pblk));
127#endif 127#endif
128 128
@@ -1166,7 +1166,7 @@ static void pblk_exit(void *private, bool graceful)
1166 pblk_gc_exit(pblk, graceful); 1166 pblk_gc_exit(pblk, graceful);
1167 pblk_tear_down(pblk, graceful); 1167 pblk_tear_down(pblk, graceful);
1168 1168
1169#ifdef CONFIG_NVM_DEBUG 1169#ifdef CONFIG_NVM_PBLK_DEBUG
1170 pr_info("pblk exit: L2P CRC: %x\n", pblk_l2p_crc(pblk)); 1170 pr_info("pblk exit: L2P CRC: %x\n", pblk_l2p_crc(pblk));
1171#endif 1171#endif
1172 1172
@@ -1217,7 +1217,7 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk,
1217 spin_lock_init(&pblk->trans_lock); 1217 spin_lock_init(&pblk->trans_lock);
1218 spin_lock_init(&pblk->lock); 1218 spin_lock_init(&pblk->lock);
1219 1219
1220#ifdef CONFIG_NVM_DEBUG 1220#ifdef CONFIG_NVM_PBLK_DEBUG
1221 atomic_long_set(&pblk->inflight_writes, 0); 1221 atomic_long_set(&pblk->inflight_writes, 0);
1222 atomic_long_set(&pblk->padded_writes, 0); 1222 atomic_long_set(&pblk->padded_writes, 0);
1223 atomic_long_set(&pblk->padded_wb, 0); 1223 atomic_long_set(&pblk->padded_wb, 0);