drivers: misc: fix implicit conversion

The following error is observed when PCIE EP is enabled:

drivers/misc/nvscic2c-pcie/pci-client.c:766:24: error: implicit
conversion from ‘enum peer_cpu_t’ to ‘enum drv_mode_t’
[-Werror=enum-conversion]

Cast the return value to avoid the error.

Bug 4456727
Bug 4451567

Change-Id: Ie11b8231ed65771aaf1f91ff12f9c7bf104f8b2c
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128564
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Brad Griffis
2024-04-30 00:38:19 +00:00
committed by mobile promotions
parent 222eebeb31
commit a84ded5d3e

View File

@@ -763,7 +763,7 @@ pci_client_get_drv_mode(void *pci_client_h)
return DRV_MODE_INVALID; return DRV_MODE_INVALID;
drv_ctx = pci_client_ctx->drv_ctx; drv_ctx = pci_client_ctx->drv_ctx;
if (WARN_ON(!drv_ctx)) if (WARN_ON(!drv_ctx))
return NVCPU_MAXIMUM; return DRV_MODE_INVALID;
return drv_ctx->drv_mode; return drv_ctx->drv_mode;
} }