From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Li zeming <zeming@nfschina.com>, "axboe@kernel.dk" <axboe@kernel.dk>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] blk-pm: Remove unnecessary ‘0’ values from ret
Date: Tue, 19 Mar 2024 03:06:36 +0000 [thread overview]
Message-ID: <4b460a34-1956-4b24-b044-bc663d4244aa@nvidia.com> (raw)
In-Reply-To: <20240318030707.18198-1-zeming@nfschina.com>
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
prev parent reply other threads:[~2024-03-19 3:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 3:07 Li zeming
2024-03-19 3:06 ` Chaitanya Kulkarni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b460a34-1956-4b24-b044-bc663d4244aa@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zeming@nfschina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®