mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
DCE-KMD: pm.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: I4bad1b8fff8ebabc9eb3bd6edfe7cf1f1549e7ef Signed-off-by: anupamg <anupamg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225292 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:
@@ -60,10 +60,12 @@ void dce_resume_work_fn(struct tegra_dce *d)
|
||||
*/
|
||||
int dce_pm_handle_sc7_enter_requested_event(struct tegra_dce *d, void *params)
|
||||
{
|
||||
USE(params);
|
||||
int ret = 0;
|
||||
struct dce_ipc_message *msg = NULL;
|
||||
|
||||
if (params != NULL)
|
||||
dce_warn(d, "Params aren't expected in this function\n");
|
||||
|
||||
msg = dce_get_admin_msg_buffer(d);
|
||||
if (!msg) {
|
||||
dce_err(d, "IPC msg allocation failed");
|
||||
@@ -94,7 +96,9 @@ out:
|
||||
*/
|
||||
int dce_pm_handle_sc7_enter_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_SC7_ENTER);
|
||||
return 0;
|
||||
}
|
||||
@@ -110,7 +114,9 @@ int dce_pm_handle_sc7_enter_received_event(struct tegra_dce *d, void *params)
|
||||
*/
|
||||
int dce_pm_handle_sc7_exit_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_schedule_work(&d->dce_resume_work);
|
||||
return 0;
|
||||
}
|
||||
@@ -187,6 +193,8 @@ done:
|
||||
|
||||
void dce_pm_deinit(struct tegra_dce *d)
|
||||
{
|
||||
USE(d);
|
||||
// Nothing to do.
|
||||
if (d == NULL)
|
||||
dce_warn(NULL, "DCE struct is expected to be valid.\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user