* [PATCH] mmc: via-sdmmc: remove unneeded variable 'ret'
@ 2021-03-09 6:47 Yang Li
2021-03-09 9:02 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-03-09 6:47 UTC (permalink / raw)
To: brucechang; +Cc: HaraldWelte, ulf.hansson, linux-mmc, linux-kernel, Yang Li
Fix the following coccicheck warning:
./drivers/mmc/host/via-sdmmc.c:1274:5-8: Unneeded variable: "ret".
Return "0" on line 1295
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/mmc/host/via-sdmmc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mmc/host/via-sdmmc.c b/drivers/mmc/host/via-sdmmc.c
index 4f4c081..a1d0985 100644
--- a/drivers/mmc/host/via-sdmmc.c
+++ b/drivers/mmc/host/via-sdmmc.c
@@ -1271,7 +1271,6 @@ static int __maybe_unused via_sd_suspend(struct device *dev)
static int __maybe_unused via_sd_resume(struct device *dev)
{
struct via_crdr_mmc_host *sdhost;
- int ret = 0;
u8 gatt;
sdhost = dev_get_drvdata(dev);
@@ -1292,7 +1291,7 @@ static int __maybe_unused via_sd_resume(struct device *dev)
via_restore_pcictrlreg(sdhost);
via_init_sdc_pm(sdhost);
- return ret;
+ return 0;
}
static SIMPLE_DEV_PM_OPS(via_sd_pm_ops, via_sd_suspend, via_sd_resume);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: via-sdmmc: remove unneeded variable 'ret'
2021-03-09 6:47 [PATCH] mmc: via-sdmmc: remove unneeded variable 'ret' Yang Li
@ 2021-03-09 9:02 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2021-03-09 9:02 UTC (permalink / raw)
To: Yang Li
Cc: Bruce Chang, Harald Welte, linux-mmc@vger.kernel.org,
Linux Kernel Mailing List
On Tue, 9 Mar 2021 at 07:48, Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warning:
> ./drivers/mmc/host/via-sdmmc.c:1274:5-8: Unneeded variable: "ret".
> Return "0" on line 1295
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/via-sdmmc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/via-sdmmc.c b/drivers/mmc/host/via-sdmmc.c
> index 4f4c081..a1d0985 100644
> --- a/drivers/mmc/host/via-sdmmc.c
> +++ b/drivers/mmc/host/via-sdmmc.c
> @@ -1271,7 +1271,6 @@ static int __maybe_unused via_sd_suspend(struct device *dev)
> static int __maybe_unused via_sd_resume(struct device *dev)
> {
> struct via_crdr_mmc_host *sdhost;
> - int ret = 0;
> u8 gatt;
>
> sdhost = dev_get_drvdata(dev);
> @@ -1292,7 +1291,7 @@ static int __maybe_unused via_sd_resume(struct device *dev)
> via_restore_pcictrlreg(sdhost);
> via_init_sdc_pm(sdhost);
>
> - return ret;
> + return 0;
> }
>
> static SIMPLE_DEV_PM_OPS(via_sd_pm_ops, via_sd_suspend, via_sd_resume);
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-09 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-09 6:47 [PATCH] mmc: via-sdmmc: remove unneeded variable 'ret' Yang Li
2021-03-09 9:02 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox