* [PATCH] blk-pm: Remove unnecessary ‘0’ values from ret
@ 2024-03-18 3:07 Li zeming
2024-03-19 3:06 ` Chaitanya Kulkarni
0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2024-03-18 3:07 UTC (permalink / raw)
To: axboe; +Cc: linux-block, linux-kernel, Li zeming
ret is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
block/blk-pm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-pm.c b/block/blk-pm.c
index 42e8420747153..c76d5a3169417 100644
--- a/block/blk-pm.c
+++ b/block/blk-pm.c
@@ -58,10 +58,10 @@ EXPORT_SYMBOL(blk_pm_runtime_init);
*/
int blk_pre_runtime_suspend(struct request_queue *q)
{
- int ret = 0;
+ int ret;
if (!q->dev)
- return ret;
+ return 0;
WARN_ON_ONCE(q->rpm_status != RPM_ACTIVE);
--
2.18.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] blk-pm: Remove unnecessary ‘0’ values from ret
2024-03-18 3:07 [PATCH] blk-pm: Remove unnecessary ‘0’ values from ret Li zeming
@ 2024-03-19 3:06 ` Chaitanya Kulkarni
0 siblings, 0 replies; 2+ messages in thread
From: Chaitanya Kulkarni @ 2024-03-19 3:06 UTC (permalink / raw)
To: Li zeming, axboe; +Cc: linux-block, linux-kernel
On 3/17/24 20:07, Li zeming wrote:
> ret is assigned first, so it does not need to initialize the assignment.
>
> Signed-off-by: Li zeming <zeming@nfschina.com>
> ---
> block/blk-pm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/blk-pm.c b/block/blk-pm.c
> index 42e8420747153..c76d5a3169417 100644
> --- a/block/blk-pm.c
> +++ b/block/blk-pm.c
> @@ -58,10 +58,10 @@ EXPORT_SYMBOL(blk_pm_runtime_init);
> */
> int blk_pre_runtime_suspend(struct request_queue *q)
> {
> - int ret = 0;
> + int ret;
>
> if (!q->dev)
> - return ret;
> + return 0;
>
> WARN_ON_ONCE(q->rpm_status != RPM_ACTIVE);
>
I don't see why we need this patch, existing code is fine ...
-ck
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-19 3:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18 3:07 [PATCH] blk-pm: Remove unnecessary ‘0’ values from ret Li zeming
2024-03-19 3:06 ` Chaitanya Kulkarni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®