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 <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225254
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
This commit is contained in:
anupamg
2024-10-07 21:24:30 +00:00
committed by Jon Hunter
parent 7f0ed24743
commit b5e4092538

View File

@@ -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) 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); dce_wakeup_interruptible(d, DCE_WAIT_BOOT_CMD);
return 0; 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) int dce_handle_boot_complete_requested_event(struct tegra_dce *d, void *params)
{ {
USE(params);
int ret = 0; 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; d->boot_status |= DCE_FW_EARLY_BOOT_START;
if (dce_fw_boot_complete(d)) { if (dce_fw_boot_complete(d)) {
ret = dce_fsm_post_event(d, EVENT_ID_DCE_BOOT_COMPLETE_RECEIVED, NULL); 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) 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); dce_wakeup_interruptible(d, DCE_WAIT_BOOT_COMPLETE);
return 0; 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) static void dce_boot_interface_isr(struct tegra_dce *d, void *data)
{ {
USE(data);
u32 status; u32 status;
u8 interface_id = DCE_MAILBOX_BOOT_INTERFACE; 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); status = dce_mailbox_get_interface_status(d, interface_id);
if (status == 0xffffffff) if (status == 0xffffffff)
return; return;