]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: use type-name map for address treq
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Mon, 4 May 2020 08:56:46 +0000 (01:56 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 9 May 2020 22:18:36 +0000 (16:18 -0600)
commit62794a789930268bf5eb84b8c003c1eaa6ed5961
treef12e113ffdfb6398bcdeac04bdb6afc6aa708a4a
parent15ad5148bd275fd03282ac8d3b16d75fc0fb3d43
nvmet: use type-name map for address treq

Currently nvmet_addr_treq_[store|show]() uses switch and if else
ladder for address transport requirements to string and reverse
mapping. With addtion of the generic nvmet_type_name_map structure
we can get rid of the switch and if else ladder with string
duplication.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/configfs.c