From b5e4092538a1f713ebde129ca423c0d5897176c7 Mon Sep 17 00:00:00 2001 From: anupamg Date: Mon, 7 Oct 2024 21:24:30 +0000 Subject: [PATCH] DCE-KMD: bootstrap.c: Remove USE() usage - We're using USE() to forcefully use a parameter to avoid compilation errors in HVRTOS. - Add a validity check instead to such parameters. This will resolve unused varaiable errors as well as add meaningful checks, instead of forcefully using params. JIRA TDS-16126 Change-Id: I885348a09eaac6e4362c89b59880fbd32d77d3b5 Signed-off-by: anupamg Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225254 Reviewed-by: svcacv Reviewed-by: Arun Swain GVS: buildbot_gerritrpt Reviewed-by: Mahesh Kumar --- drivers/platform/tegra/dce/dce-bootstrap.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/platform/tegra/dce/dce-bootstrap.c b/drivers/platform/tegra/dce/dce-bootstrap.c index 16522053..61ea1ddb 100644 --- a/drivers/platform/tegra/dce/dce-bootstrap.c +++ b/drivers/platform/tegra/dce/dce-bootstrap.c @@ -69,7 +69,9 @@ int dce_handle_boot_cmd_requested_event(struct tegra_dce *d, void *params) */ int dce_handle_boot_cmd_received_event(struct tegra_dce *d, void *params) { - USE(params); + if (params != NULL) + dce_warn(d, "Params aren't expected in this function\n"); + dce_wakeup_interruptible(d, DCE_WAIT_BOOT_CMD); return 0; } @@ -87,9 +89,11 @@ int dce_handle_boot_cmd_received_event(struct tegra_dce *d, void *params) */ int dce_handle_boot_complete_requested_event(struct tegra_dce *d, void *params) { - USE(params); int ret = 0; + if (params != NULL) + dce_warn(d, "Params aren't expected in this function\n"); + d->boot_status |= DCE_FW_EARLY_BOOT_START; if (dce_fw_boot_complete(d)) { ret = dce_fsm_post_event(d, EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED, NULL); @@ -135,7 +139,9 @@ boot_done: */ int dce_handle_boot_complete_received_event(struct tegra_dce *d, void *params) { - USE(params); + if (params != NULL) + dce_warn(d, "Params aren't expected in this function\n"); + dce_wakeup_interruptible(d, DCE_WAIT_BOOT_COMPLETE); return 0; } @@ -292,10 +298,12 @@ static void dce_bootstrap_handle_boot_status(struct tegra_dce *d, u32 status) */ static void dce_boot_interface_isr(struct tegra_dce *d, void *data) { - USE(data); u32 status; u8 interface_id = DCE_MAILBOX_BOOT_INTERFACE; + if (data != NULL) + dce_warn(d, "Data param isn't expected in this function\n"); + status = dce_mailbox_get_interface_status(d, interface_id); if (status == 0xffffffff) return;