]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: code cleanup nvme_identify_ns_desc()
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Wed, 19 Feb 2020 16:14:31 +0000 (08:14 -0800)
committerKeith Busch <kbusch@kernel.org>
Wed, 25 Mar 2020 19:45:25 +0000 (04:45 +0900)
commitc2d6c40a472952223a61c7918ef92e7c2e81e2f9
tree83116b8e924ac7cabc00c5b50158b23eacbdb3e4
parent63bec1534efca490548103b452c0a84b3f267190
nvme: code cleanup nvme_identify_ns_desc()

The function nvme_identify_ns_desc() has 3 levels of nesting which make
error message to exceeded > 80 char per line which is not aligned with
the kernel code standards and rest of the NVMe subsystem code.

Add a helper function to move the processing of the log when the
command is successful by reducing the nesting and keeping the
code < 80 char per line.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c