nvme-pci: move the HMPRE check into nvme_setup_host_mem
authorChristoph Hellwig <hch@lst.de>
Sun, 13 Nov 2022 11:05:58 +0000 (12:05 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 16 Nov 2022 07:36:31 +0000 (08:36 +0100)
commitacb71e53bb47a08731aa77497cd3f1871cba59c3
treef78b5fba5bd6f8dd899303e4ae7617eb2a671fe1
parent65a54646420e1409760c2b9f0e1a5e5feca1364e
nvme-pci: move the HMPRE check into nvme_setup_host_mem

Check that a HMB is wanted into the allocation helper instead of the
caller.  This makes life simpler for an upcoming second caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
drivers/nvme/host/pci.c