From d0bafbec62037c8d26dcc1c87ca20456d89a5e01 Mon Sep 17 00:00:00 2001 From: anupamg Date: Wed, 27 Nov 2024 06:44:38 +0000 Subject: [PATCH] DCE-KMD: dce-ipc.c: Remove simple wrappers - This is a follow-up CL to address a comment in I55594d8e34c3b572129119d1f7240cde76cf37bd - This change will remove below simple static wrappers from dce-ipc.c and directly call the corresponding OS functions. - _dce_ipc_get_next_write_buff() - _dce_ipc_get_next_read_buff() JIRA TDS-16126 Change-Id: Ie8c08ace75f3c6e14e803c6aeccdf43a0c27f3fa Signed-off-by: anupamg Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257965 Reviewed-by: Arun Swain Reviewed-by: svcacv Reviewed-by: Vinod Gopalakrishnakurup --- drivers/platform/tegra/dce/dce-ipc.c | 44 ++-------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/drivers/platform/tegra/dce/dce-ipc.c b/drivers/platform/tegra/dce/dce-ipc.c index 1f9f7a4f..f0f91f0b 100644 --- a/drivers/platform/tegra/dce/dce-ipc.c +++ b/drivers/platform/tegra/dce/dce-ipc.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ #include @@ -417,25 +417,6 @@ void dce_ipc_channel_reset(struct tegra_dce *d, u32 ch_type) dce_os_mutex_unlock(&ch->lock); } -/** - * dce_ipc_get_next_write_buff - waits for the next write frame. - * - * @ch : Pointer to the pertinent channel. - * - * Return : 0 if successful - */ -static int _dce_ipc_get_next_write_buff(struct dce_ipc_channel *ch) -{ - int err = 0; - - if (ch != NULL) - err = dce_os_ivc_get_next_write_frame(&ch->d_ivc, &ch->obuff); - else - err = -EINVAL; - - return err; -} - /** * dce_ipc_send_message - Sends messages over ipc. * @@ -457,7 +438,7 @@ int dce_ipc_send_message(struct tegra_dce *d, u32 ch_type, dce_os_trace_ivc_send_req_received(d, ch); - ret = _dce_ipc_get_next_write_buff(ch); + ret = dce_os_ivc_get_next_write_frame(&ch->d_ivc, &ch->obuff); if (ret) { dce_os_err(ch->d, "Error getting next free buf to write"); goto out; @@ -479,25 +460,6 @@ out: return ret; } -/** - * dce_ipc_get_next_read_buff - waits for the next write frame. - * - * @ch : Pointer to the pertinent channel. - * - * Return : 0 if successful - */ -static int _dce_ipc_get_next_read_buff(struct dce_ipc_channel *ch) -{ - int err = 0; - - if (ch != NULL) - err = dce_os_ivc_get_next_read_frame(&ch->d_ivc, &ch->ibuff); - else - err = -EINVAL; - - return err; -} - /** * dce_ipc_read_message - Reads messages over ipc. * @@ -518,7 +480,7 @@ int dce_ipc_read_message(struct tegra_dce *d, u32 ch_type, dce_os_trace_ivc_receive_req_received(d, ch); - ret = _dce_ipc_get_next_read_buff(ch); + ret = dce_os_ivc_get_next_read_frame(&ch->d_ivc, &ch->ibuff); if (ret) { dce_os_debug(ch->d, "No Msg to read"); goto out;