nvme: use assert for INTEL_VID check on log pages
We can only get to this code path if the controller has vid==INTEL, so make that more clear by changing the check to an assert. Remove unit test that calls nvme_ctrlr_construct_intel_support_log_page_list() for a controller that is not VID==INTEL - this is no longer valid. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I3b58451bc95992bf641e7452f0ac4c2bac9fe31c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13523 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
parent
4a24f581d6
commit
988ce2ecaa
@ -629,9 +629,7 @@ nvme_ctrlr_construct_intel_support_log_page_list(struct spdk_nvme_ctrlr *ctrlr,
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctrlr->cdata.vid != SPDK_PCI_VID_INTEL) {
|
||||
return;
|
||||
}
|
||||
assert(ctrlr->cdata.vid == SPDK_PCI_VID_INTEL);
|
||||
|
||||
ctrlr->log_page_supported[SPDK_NVME_INTEL_LOG_PAGE_DIRECTORY] = true;
|
||||
|
||||
|
@ -1830,10 +1830,6 @@ test_nvme_ctrlr_construct_intel_support_log_page_list(void)
|
||||
ctrlr.quirks = nvme_get_quirks(&pci_id);
|
||||
CU_ASSERT(ctrlr.quirks == 0);
|
||||
|
||||
nvme_ctrlr_construct_intel_support_log_page_list(&ctrlr, &payload);
|
||||
res = spdk_nvme_ctrlr_is_log_page_supported(&ctrlr, SPDK_NVME_INTEL_LOG_TEMPERATURE);
|
||||
CU_ASSERT(res == false);
|
||||
|
||||
/* Set the vendor to Intel, but provide no device id */
|
||||
pci_id.class_id = SPDK_PCI_CLASS_NVME;
|
||||
ctrlr.cdata.vid = pci_id.vendor_id = SPDK_PCI_VID_INTEL;
|
||||
|
Loading…
Reference in New Issue
Block a user