Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next] net: microchip: Remove set but not used variable
@ 2020-09-19 2:39 Zheng Yongjun
2020-09-19 3:08 ` 答复: " zhengyongjun
2020-09-19 21:09 ` David Miller
0 siblings, 2 replies; 7+ messages in thread
From: Zheng Yongjun @ 2020-09-19 2:39 UTC (permalink / raw)
To: bryan.whitehead, UNGLinuxDriver, davem, kuba, netdev, linux-kernel
Cc: Zheng Yongjun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/microchip/lan743x_main.c: In function lan743x_pm_suspend:
drivers/net/ethernet/microchip/lan743x_main.c:3041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
`ret` is set but not used, so check it's value.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index de93cc6ebc1a..56a1b5928f9a 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -3053,7 +3053,7 @@ static int lan743x_pm_suspend(struct device *dev)
/* Host sets PME_En, put D3hot */
ret = pci_prepare_to_sleep(pdev);
- return 0;
+ return ret;
}
static int lan743x_pm_resume(struct device *dev)
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* 答复: [PATCH net-next] net: microchip: Remove set but not used variable
2020-09-19 2:39 [PATCH net-next] net: microchip: Remove set but not used variable Zheng Yongjun
@ 2020-09-19 3:08 ` zhengyongjun
2020-09-19 21:09 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: zhengyongjun @ 2020-09-19 3:08 UTC (permalink / raw)
To: bryan.whitehead, UNGLinuxDriver, davem, kuba, netdev, linux-kernel
This is the bad patch, my fault, I forget to check patch title, please ignore it, thank you very much.
-----邮件原件-----
发件人: zhengyongjun
发送时间: 2020年9月19日 10:39
收件人: bryan.whitehead@microchip.com; UNGLinuxDriver@microchip.com; davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
抄送: zhengyongjun <zhengyongjun3@huawei.com>
主题: [PATCH net-next] net: microchip: Remove set but not used variable
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/microchip/lan743x_main.c: In function lan743x_pm_suspend:
drivers/net/ethernet/microchip/lan743x_main.c:3041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
`ret` is set but not used, so check it's value.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index de93cc6ebc1a..56a1b5928f9a 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -3053,7 +3053,7 @@ static int lan743x_pm_suspend(struct device *dev)
/* Host sets PME_En, put D3hot */
ret = pci_prepare_to_sleep(pdev);
- return 0;
+ return ret;
}
static int lan743x_pm_resume(struct device *dev)
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: microchip: Remove set but not used variable
2020-09-19 2:39 [PATCH net-next] net: microchip: Remove set but not used variable Zheng Yongjun
2020-09-19 3:08 ` 答复: " zhengyongjun
@ 2020-09-19 21:09 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2020-09-19 21:09 UTC (permalink / raw)
To: zhengyongjun3; +Cc: bryan.whitehead, UNGLinuxDriver, kuba, netdev, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Sat, 19 Sep 2020 10:39:09 +0800
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/microchip/lan743x_main.c: In function lan743x_pm_suspend:
> drivers/net/ethernet/microchip/lan743x_main.c:3041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> `ret` is set but not used, so check it's value.
Subject is still wrong, please fix this and take your time doing
so.
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 答复: [PATCH net-next] net: microchip: Remove set but not used variable
2020-09-19 3:02 ` 答复: " zhengyongjun
@ 2020-09-19 21:12 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2020-09-19 21:12 UTC (permalink / raw)
To: zhengyongjun3; +Cc: bryan.whitehead, UNGLinuxDriver, kuba, netdev, linux-kernel
From: zhengyongjun <zhengyongjun3@huawei.com>
Date: Sat, 19 Sep 2020 03:02:39 +0000
> This is the bad patch, please ignore it, thank you very much.
Please do not quote your entire patch when you reply like this.
It makes the reply look like a brand new patch to our patchwork
tracking system, which makes more work for us.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: microchip: Remove set but not used variable
2020-09-19 2:37 Zheng Yongjun
2020-09-19 3:02 ` 答复: " zhengyongjun
@ 2020-09-19 21:09 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2020-09-19 21:09 UTC (permalink / raw)
To: zhengyongjun3; +Cc: bryan.whitehead, UNGLinuxDriver, kuba, netdev, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Sat, 19 Sep 2020 10:37:32 +0800
> `ret` is never used, so remove it.
You are not removing it:
> @@ -3053,7 +3053,7 @@ static int lan743x_pm_suspend(struct device *dev)
> /* Host sets PME_En, put D3hot */
> ret = pci_prepare_to_sleep(pdev);
>
> - return 0;
> + return ret;
> }
In fact, you are making it get used properly.
Please fix your commit message.
^ permalink raw reply [flat|nested] 7+ messages in thread
* 答复: [PATCH net-next] net: microchip: Remove set but not used variable
2020-09-19 2:37 Zheng Yongjun
@ 2020-09-19 3:02 ` zhengyongjun
2020-09-19 21:12 ` David Miller
2020-09-19 21:09 ` David Miller
1 sibling, 1 reply; 7+ messages in thread
From: zhengyongjun @ 2020-09-19 3:02 UTC (permalink / raw)
To: bryan.whitehead, UNGLinuxDriver, davem, kuba, netdev, linux-kernel
This is the bad patch, please ignore it, thank you very much.
-----邮件原件-----
发件人: zhengyongjun
发送时间: 2020年9月19日 10:38
收件人: bryan.whitehead@microchip.com; UNGLinuxDriver@microchip.com; davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
抄送: zhengyongjun <zhengyongjun3@huawei.com>
主题: [PATCH net-next] net: microchip: Remove set but not used variable
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/microchip/lan743x_main.c: In function lan743x_pm_suspend:
drivers/net/ethernet/microchip/lan743x_main.c:3041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
`ret` is never used, so remove it.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index de93cc6ebc1a..56a1b5928f9a 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -3053,7 +3053,7 @@ static int lan743x_pm_suspend(struct device *dev)
/* Host sets PME_En, put D3hot */
ret = pci_prepare_to_sleep(pdev);
- return 0;
+ return ret;
}
static int lan743x_pm_resume(struct device *dev)
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next] net: microchip: Remove set but not used variable
@ 2020-09-19 2:37 Zheng Yongjun
2020-09-19 3:02 ` 答复: " zhengyongjun
2020-09-19 21:09 ` David Miller
0 siblings, 2 replies; 7+ messages in thread
From: Zheng Yongjun @ 2020-09-19 2:37 UTC (permalink / raw)
To: bryan.whitehead, UNGLinuxDriver, davem, kuba, netdev, linux-kernel
Cc: Zheng Yongjun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/microchip/lan743x_main.c: In function lan743x_pm_suspend:
drivers/net/ethernet/microchip/lan743x_main.c:3041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
`ret` is never used, so remove it.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index de93cc6ebc1a..56a1b5928f9a 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -3053,7 +3053,7 @@ static int lan743x_pm_suspend(struct device *dev)
/* Host sets PME_En, put D3hot */
ret = pci_prepare_to_sleep(pdev);
- return 0;
+ return ret;
}
static int lan743x_pm_resume(struct device *dev)
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-09-19 21:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 2:39 [PATCH net-next] net: microchip: Remove set but not used variable Zheng Yongjun
2020-09-19 3:08 ` 答复: " zhengyongjun
2020-09-19 21:09 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2020-09-19 2:37 Zheng Yongjun
2020-09-19 3:02 ` 答复: " zhengyongjun
2020-09-19 21:12 ` David Miller
2020-09-19 21:09 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).