* [PATCH] cifs: remove redundant initialization of variable rc
@ 2021-06-13 14:01 Colin King
2021-06-13 23:33 ` Steve French
0 siblings, 1 reply; 4+ messages in thread
From: Colin King @ 2021-06-13 14:01 UTC (permalink / raw)
To: Steve French, linux-cifs, samba-technical; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable rc 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>
---
fs/cifs/cifssmb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 037c44bf48f1..277cb1044cbe 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1238,7 +1238,7 @@ SMBLegacyOpen(const unsigned int xid, struct cifs_tcon *tcon,
int *pOplock, FILE_ALL_INFO *pfile_info,
const struct nls_table *nls_codepage, int remap)
{
- int rc = -EACCES;
+ int rc;
OPENX_REQ *pSMB = NULL;
OPENX_RSP *pSMBr = NULL;
int bytes_returned;
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cifs: remove redundant initialization of variable rc
2021-06-13 14:01 [PATCH] cifs: remove redundant initialization of variable rc Colin King
@ 2021-06-13 23:33 ` Steve French
0 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2021-06-13 23:33 UTC (permalink / raw)
To: Colin King; +Cc: Steve French, CIFS, samba-technical, kernel-janitors, LKML
merged into cifs-2.6.git for-next
On Sun, Jun 13, 2021 at 9:02 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable rc 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>
> ---
> fs/cifs/cifssmb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 037c44bf48f1..277cb1044cbe 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -1238,7 +1238,7 @@ SMBLegacyOpen(const unsigned int xid, struct cifs_tcon *tcon,
> int *pOplock, FILE_ALL_INFO *pfile_info,
> const struct nls_table *nls_codepage, int remap)
> {
> - int rc = -EACCES;
> + int rc;
> OPENX_REQ *pSMB = NULL;
> OPENX_RSP *pSMBr = NULL;
> int bytes_returned;
> --
> 2.31.1
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cifs: remove redundant initialization of variable rc
2020-05-27 12:50 Colin King
@ 2020-05-30 21:08 ` Steve French
0 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2020-05-30 21:08 UTC (permalink / raw)
To: Colin King; +Cc: Steve French, CIFS, samba-technical, kernel-janitors, LKML
merged into cifs-2.6.git for-next
On Wed, May 27, 2020 at 7:52 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable rc is being initialized with a value that is never read
> and it is being updated later with a new value. The initialization is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> fs/cifs/cifssmb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 5014a82391ff..d62f9175c546 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -2375,7 +2375,7 @@ int
> CIFSSMBWrite2(const unsigned int xid, struct cifs_io_parms *io_parms,
> unsigned int *nbytes, struct kvec *iov, int n_vec)
> {
> - int rc = -EACCES;
> + int rc;
> WRITE_REQ *pSMB = NULL;
> int wct;
> int smb_hdr_len;
> --
> 2.25.1
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] cifs: remove redundant initialization of variable rc
@ 2020-05-27 12:50 Colin King
2020-05-30 21:08 ` Steve French
0 siblings, 1 reply; 4+ messages in thread
From: Colin King @ 2020-05-27 12:50 UTC (permalink / raw)
To: Steve French, linux-cifs, samba-technical; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable rc is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/cifs/cifssmb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 5014a82391ff..d62f9175c546 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -2375,7 +2375,7 @@ int
CIFSSMBWrite2(const unsigned int xid, struct cifs_io_parms *io_parms,
unsigned int *nbytes, struct kvec *iov, int n_vec)
{
- int rc = -EACCES;
+ int rc;
WRITE_REQ *pSMB = NULL;
int wct;
int smb_hdr_len;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-13 23:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-13 14:01 [PATCH] cifs: remove redundant initialization of variable rc Colin King
2021-06-13 23:33 ` Steve French
-- strict thread matches above, loose matches on Subject: below --
2020-05-27 12:50 Colin King
2020-05-30 21:08 ` Steve French
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).