* [PATCH linux-next] soundwire: intel: Remove unused parameter ret
@ 2022-09-14 1:52 cgel.zte
2022-09-14 7:51 ` Pierre-Louis Bossart
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-09-14 1:52 UTC (permalink / raw)
To: vkoul, yung-chuan.liao, pierre-louis.bossart
Cc: sanyog.r.kale, alsa-devel, linux-kernel, Jinpeng Cui, Zeal Robot
From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
The parameter ret = 0 has not been used.
Return 0 directly instead of returning ret.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
drivers/soundwire/intel.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index b006ae6efcb0..26fdf3577454 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -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)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux-next] soundwire: intel: Remove unused parameter ret
2022-09-14 1:52 [PATCH linux-next] soundwire: intel: Remove unused parameter ret cgel.zte
@ 2022-09-14 7:51 ` Pierre-Louis Bossart
0 siblings, 0 replies; 2+ messages in thread
From: Pierre-Louis Bossart @ 2022-09-14 7:51 UTC (permalink / raw)
To: cgel.zte, vkoul, yung-chuan.liao
Cc: sanyog.r.kale, Zeal Robot, Jinpeng Cui, alsa-devel, linux-kernel
On 9/14/22 03:52, cgel.zte@gmail.com wrote:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> 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.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
> ---
> drivers/soundwire/intel.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
> index b006ae6efcb0..26fdf3577454 100644
> --- a/drivers/soundwire/intel.c
> +++ b/drivers/soundwire/intel.c
> @@ -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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-14 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-14 1:52 [PATCH linux-next] soundwire: intel: Remove unused parameter ret cgel.zte
2022-09-14 7:51 ` Pierre-Louis Bossart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox