Skip to contentSkip to conversation

soundwire: intel: Remove unused parameter ret

PATCH In review [email protected] 2 participants 2 messages Sep 14, 2022 SoundWire

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soundwire: intel: Remove unused parameter ret

From: Jinpeng Cui <[email protected]>

The parameter ret = 0 has not been used.
Return 0 directly instead of returning ret.

---
 drivers/soundwire/intel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/soundwire/intel.c +1 -2
index b006ae6efcb0..26fdf3577454 100644
@@ -395,7 +395,6 @@ static int intel_shim_init(struct sdw_intel *sdw, bool clock_stop)
 {
 	void __iomem *shim = sdw->link_res->shim;
 	unsigned int link_id = sdw->instance;
-	int ret = 0;
 	u16 ioctl = 0, act = 0;
 
 	mutex_lock(sdw->link_res->shim_lock);
@@ -427,7 +426,7 @@ static int intel_shim_init(struct sdw_intel *sdw, bool clock_stop)
 
 	mutex_unlock(sdw->link_res->shim_lock);
 
-	return ret;
+	return 0;
 }
 
 static void intel_shim_wake(struct sdw_intel *sdw, bool wake_enable)
Signature · 1 line
2.25.1
#1 lore raw
Quoted 4 lines · On 9/14/22 03:52, [email protected] wrote:

From: Jinpeng Cui <[email protected]>

The parameter ret = 0 has not been used.
Return 0 directly instead of returning ret.

That code will be modified by a cleanup series that is going to land upstream shortly, see https://github.com/thesofproject/linux/pull/3835

It's not an incorrect change but it will introduce unnecessary churn IMHO.

Quoted 28 lines
---
 drivers/soundwire/intel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/soundwire/intel.c +1 -2
index b006ae6efcb0..26fdf3577454 100644
@@ -395,7 +395,6 @@ static int intel_shim_init(struct sdw_intel *sdw, bool clock_stop)
 {
 	void __iomem *shim = sdw->link_res->shim;
 	unsigned int link_id = sdw->instance;
-	int ret = 0;
 	u16 ioctl = 0, act = 0;
 
 	mutex_lock(sdw->link_res->shim_lock);
@@ -427,7 +426,7 @@ static int intel_shim_init(struct sdw_intel *sdw, bool clock_stop)
 
 	mutex_unlock(sdw->link_res->shim_lock);
 
-	return ret;
+	return 0;
 }
 
 static void intel_shim_wake(struct sdw_intel *sdw, bool wake_enable)