From a84ded5d3e0e6a486603a64ae2bcd72a8fa4e639 Mon Sep 17 00:00:00 2001 From: Brad Griffis Date: Tue, 30 Apr 2024 00:38:19 +0000 Subject: [PATCH] drivers: misc: fix implicit conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128564 Reviewed-by: Jon Hunter GVS: Gerrit_Virtual_Submit --- drivers/misc/nvscic2c-pcie/pci-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/nvscic2c-pcie/pci-client.c b/drivers/misc/nvscic2c-pcie/pci-client.c index 15cfe6d8..eb677394 100644 --- a/drivers/misc/nvscic2c-pcie/pci-client.c +++ b/drivers/misc/nvscic2c-pcie/pci-client.c @@ -763,7 +763,7 @@ pci_client_get_drv_mode(void *pci_client_h) return DRV_MODE_INVALID; drv_ctx = pci_client_ctx->drv_ctx; if (WARN_ON(!drv_ctx)) - return NVCPU_MAXIMUM; + return DRV_MODE_INVALID; return drv_ctx->drv_mode; }