* [PATCH] rpc: remove redundant initialization of variable status
@ 2021-06-13 14:06 Colin King
2021-06-14 14:56 ` J . Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-06-13 14:06 UTC (permalink / raw)
To: J . Bruce Fields, Chuck Lever, Trond Myklebust, Anna Schumaker,
David S . Miller, Jakub Kicinski, linux-nfs, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable status is being initialized with a value that is never
read, the assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/sunrpc/auth_gss/svcauth_gss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 6dff64374bfe..a81be45f40d9 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -1275,7 +1275,7 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
long long ctxh;
struct gss_api_mech *gm = NULL;
time64_t expiry;
- int status = -EINVAL;
+ int status;
memset(&rsci, 0, sizeof(rsci));
/* context handle */
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rpc: remove redundant initialization of variable status
2021-06-13 14:06 [PATCH] rpc: remove redundant initialization of variable status Colin King
@ 2021-06-14 14:56 ` J . Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J . Bruce Fields @ 2021-06-14 14:56 UTC (permalink / raw)
To: Colin King
Cc: Chuck Lever, Trond Myklebust, Anna Schumaker, David S . Miller,
Jakub Kicinski, linux-nfs, netdev, kernel-janitors, linux-kernel
Thanks, applied.--b.
On Sun, Jun 13, 2021 at 03:06:52PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable status is being initialized with a value that is never
> read, the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> net/sunrpc/auth_gss/svcauth_gss.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
> index 6dff64374bfe..a81be45f40d9 100644
> --- a/net/sunrpc/auth_gss/svcauth_gss.c
> +++ b/net/sunrpc/auth_gss/svcauth_gss.c
> @@ -1275,7 +1275,7 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
> long long ctxh;
> struct gss_api_mech *gm = NULL;
> time64_t expiry;
> - int status = -EINVAL;
> + int status;
>
> memset(&rsci, 0, sizeof(rsci));
> /* context handle */
> --
> 2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-14 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-13 14:06 [PATCH] rpc: remove redundant initialization of variable status Colin King
2021-06-14 14:56 ` J . Bruce Fields
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).