Skip to contentSkip to conversation

platform/x86: intel: punit_ipc: Remove unused function

PATCH In review [email protected] 2 participants 2 messages Dec 21, 2024 – Jan 13, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: intel: punit_ipc: Remove unused function

From: "Dr. David Alan Gilbert" <[email protected]>

intel_punit_ipc_simple_command() was added in 2015 by
commit fdca4f16f57d ("platform:x86: add Intel P-Unit mailbox IPC driver") but never used.

Remove it.

---
 arch/x86/include/asm/intel_punit_ipc.h |  7 ------
 drivers/platform/x86/intel/punit_ipc.c | 33 --------------------------
 2 files changed, 40 deletions(-)
arch/x86/include/asm/intel_punit_ipc.h +0 -7
index ce16da719596..1f9b5d225912 100644
@@ -80,17 +80,10 @@ typedef enum {
 
 #if IS_ENABLED(CONFIG_INTEL_PUNIT_IPC)
 
-int intel_punit_ipc_simple_command(int cmd, int para1, int para2);
 int intel_punit_ipc_command(u32 cmd, u32 para1, u32 para2, u32 *in, u32 *out);
 
 #else
 
-static inline int intel_punit_ipc_simple_command(int cmd,
-						  int para1, int para2)
-{
-	return -ENODEV;
-}
-
 static inline int intel_punit_ipc_command(u32 cmd, u32 para1, u32 para2,
 					  u32 *in, u32 *out)
 {
drivers/platform/x86/intel/punit_ipc.c +0 -33
index cd0ba84cc8e4..bafac8aa2baf 100644
@@ -130,39 +130,6 @@ static int intel_punit_ipc_check_status(IPC_DEV *ipcdev, IPC_TYPE type)
 	return 0;
 }
 
-/**
- * intel_punit_ipc_simple_command() - Simple IPC command
- * @cmd:	IPC command code.
- * @para1:	First 8bit parameter, set 0 if not used.
- * @para2:	Second 8bit parameter, set 0 if not used.
- *
- * Send a IPC command to P-Unit when there is no data transaction
- *
- * Return:	IPC error code or 0 on success.
- */
-int intel_punit_ipc_simple_command(int cmd, int para1, int para2)
-{
-	IPC_DEV *ipcdev = punit_ipcdev;
-	IPC_TYPE type;
-	u32 val;
-	int ret;
-
-	mutex_lock(&ipcdev->lock);
-
-	reinit_completion(&ipcdev->cmd_complete);
-	type = (cmd & IPC_PUNIT_CMD_TYPE_MASK) >> IPC_TYPE_OFFSET;
-
-	val = cmd & ~IPC_PUNIT_CMD_TYPE_MASK;
-	val |= CMD_RUN | para2 << CMD_PARA2_SHIFT | para1 << CMD_PARA1_SHIFT;
-	ipc_write_cmd(ipcdev, type, val);
-	ret = intel_punit_ipc_check_status(ipcdev, type);
-
-	mutex_unlock(&ipcdev->lock);
-
-	return ret;
-}
-EXPORT_SYMBOL(intel_punit_ipc_simple_command);
-
 /**
  * intel_punit_ipc_command() - IPC command with data and pointers
  * @cmd:	IPC command code.
Signature · 1 line
2.47.1
maintainer
#1 lore raw
Quoted 8 lines · On Sat, 21 Dec 2024 23:48:07 +0000, [email protected] wrote:

intel_punit_ipc_simple_command() was added in 2015 by
commit fdca4f16f57d ("platform:x86: add Intel P-Unit mailbox IPC driver") but never used.

Remove it.

[...]

Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: intel: punit_ipc: Remove unused function

      commit: ad0e06361a56428ffb971e8c902514cbce0d7ebb

--
i.