linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cifs: remove redundant assignment to pointer p
@ 2021-12-07 22:53 Colin Ian King
  0 siblings, 0 replies; 3+ messages in thread
From: Colin Ian King @ 2021-12-07 22:53 UTC (permalink / raw)
  To: Steve French, linux-cifs, samba-technical; +Cc: kernel-janitors, linux-kernel

The pointer p is assigned a value that is never read, it is being
re-assigned later. The assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/cifs/cifsfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index d3f3acf340f1..61091eed8c65 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -775,7 +775,7 @@ cifs_get_root(struct smb3_fs_context *ctx, struct super_block *sb)
 
 	sep = CIFS_DIR_SEP(cifs_sb);
 	dentry = dget(sb->s_root);
-	p = s = full_path;
+	s = full_path;
 
 	do {
 		struct inode *dir = d_inode(dentry);
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cifs: remove redundant assignment to pointer p
  2021-12-21  0:48 Colin Ian King
@ 2021-12-24 15:15 ` Steve French
  0 siblings, 0 replies; 3+ messages in thread
From: Steve French @ 2021-12-24 15:15 UTC (permalink / raw)
  To: Colin Ian King; +Cc: Steve French, CIFS, samba-technical, kernel-janitors, LKML

merged into cifs-2.6.git for-next

On Mon, Dec 20, 2021 at 8:01 PM Colin Ian King <colin.i.king@gmail.com> wrote:
>
> The pointer p is being assigned with a value that is never read. The
> pointer is being re-assigned a different value inside the do-while
> loop. The assignment is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  fs/cifs/cifsfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> index d3f3acf340f1..61091eed8c65 100644
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@ -775,7 +775,7 @@ cifs_get_root(struct smb3_fs_context *ctx, struct super_block *sb)
>
>         sep = CIFS_DIR_SEP(cifs_sb);
>         dentry = dget(sb->s_root);
> -       p = s = full_path;
> +       s = full_path;
>
>         do {
>                 struct inode *dir = d_inode(dentry);
> --
> 2.32.0
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] cifs: remove redundant assignment to pointer p
@ 2021-12-21  0:48 Colin Ian King
  2021-12-24 15:15 ` Steve French
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2021-12-21  0:48 UTC (permalink / raw)
  To: Steve French, linux-cifs, samba-technical; +Cc: kernel-janitors, linux-kernel

The pointer p is being assigned with a value that is never read. The
pointer is being re-assigned a different value inside the do-while
loop. The assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/cifs/cifsfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index d3f3acf340f1..61091eed8c65 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -775,7 +775,7 @@ cifs_get_root(struct smb3_fs_context *ctx, struct super_block *sb)
 
 	sep = CIFS_DIR_SEP(cifs_sb);
 	dentry = dget(sb->s_root);
-	p = s = full_path;
+	s = full_path;
 
 	do {
 		struct inode *dir = d_inode(dentry);
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-24 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 22:53 [PATCH] cifs: remove redundant assignment to pointer p Colin Ian King
2021-12-21  0:48 Colin Ian King
2021-12-24 15:15 ` 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).