aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorChaitanya Kulkarni <kch@nvidia.com>2023-06-01 23:47:42 -0700
committerKeith Busch <kbusch@kernel.org>2023-06-12 10:37:00 -0700
commit959ffef13bac792e4e2e3321d6e2bd2b00c0f5f9 (patch)
tree2b203e0032359ed85724c902fcb831f362c064f1 /samples
parent900095bfbbf6623fbfa9e5ceb3982f293b6f3275 (diff)
nvme-fabrics: open code __nvmf_host_find()
There is no point in maintaining a separate funciton __nvmf_host_find() that has only one caller nvmf_host_add() especially when caller and callee both are small enough to merge. Due to this we are actually repeating the error handling code in both callee and caller for no reason that can be avoided, but instead we have to read both function to establish the correctness along with additional lockdep warning check due to involved locking. Just open code __nvmf_host_find() in nvme_host_alloc() with appropriate comment that removes repeated error checks in the callee/caller and lockdep check that is needed for the nvmf_hosts_mutex involvement, diffstats :- drivers/nvme/host/fabrics.c | 75 +++++++++++++------------------------ 1 file changed, 27 insertions(+), 48 deletions(-) Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions