From: Greg KH <gregkh@linuxfoundation.org>
To: cgel.zte@gmail.com
Cc: ogabbay@kernel.org, arnd@arndb.de, ynudelman@habana.ai,
obitton@habana.ai, osharabi@habana.ai, chi.minghao@zte.com.cn,
fkassabri@habana.ai, linux-kernel@vger.kernel.org,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH misc-next] drivers/misc: remove redundant rc variable
Date: Tue, 4 Jan 2022 12:45:20 +0100 [thread overview]
Message-ID: <YdQzUPW5FI0yIi0P@kroah.com> (raw)
In-Reply-To: <20220104113411.602094-1-chi.minghao@zte.com.cn>
On Tue, Jan 04, 2022 at 11:34:11AM +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return value from ocxl_context_attach() directly instead
> of taking this in another redundant variable.
Why? Does this change the compiler output?
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
> ---
> drivers/misc/ocxl/file.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c
> index e70525eedaae..d881f5e40ad9 100644
> --- a/drivers/misc/ocxl/file.c
> +++ b/drivers/misc/ocxl/file.c
> @@ -74,7 +74,6 @@ static long afu_ioctl_attach(struct ocxl_context *ctx,
> {
> struct ocxl_ioctl_attach arg;
> u64 amr = 0;
> - int rc;
>
> pr_debug("%s for context %d\n", __func__, ctx->pasid);
>
> @@ -86,8 +85,7 @@ static long afu_ioctl_attach(struct ocxl_context *ctx,
> return -EINVAL;
>
> amr = arg.amr & mfspr(SPRN_UAMOR);
> - rc = ocxl_context_attach(ctx, amr, current->mm);
> - return rc;
> + return ocxl_context_attach(ctx, amr, current->mm);
> }
>
> static long afu_ioctl_get_metadata(struct ocxl_context *ctx,
> --
> 2.25.1
>
How did you test this change?
thanks,
greg k-h
next prev parent reply other threads:[~2022-01-04 11:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 11:34 [PATCH misc-next] drivers/misc: remove redundant rc variable cgel.zte
2022-01-04 11:45 ` Greg KH [this message]
2022-01-05 9:22 ` cgel.zte
2022-01-05 10:08 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2021-12-15 6:04 cgel.zte
2021-12-15 6:04 ` cgel.zte
2021-12-15 8:52 ` Andrew Donnellan
2021-12-15 8:52 ` Andrew Donnellan
2021-12-26 21:52 ` Michael Ellerman
2021-12-26 21:52 ` Michael Ellerman
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=YdQzUPW5FI0yIi0P@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=fkassabri@habana.ai \
--cc=linux-kernel@vger.kernel.org \
--cc=obitton@habana.ai \
--cc=ogabbay@kernel.org \
--cc=osharabi@habana.ai \
--cc=ynudelman@habana.ai \
--cc=zealci@zte.com.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.