All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] fs/9p: remove redundant pointer v9ses
@ 2024-02-29 22:22 Colin Ian King
  2024-03-04 12:59 ` Dominique Martinet
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2024-02-29 22:22 UTC (permalink / raw)
  To: Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
	Christian Schoenebeck, v9fs
  Cc: kernel-janitors, linux-kernel

Pointer v9ses is being assigned the value from the return of inlined
function v9fs_inode2v9ses (which just returns inode->i_sb->s_fs_info).
The pointer is not used after the assignment, so the variable is
redundant and can be removed.

Cleans up clang scan warnings such as:
fs/9p/vfs_inode_dotl.c:300:28: warning: variable 'v9ses' set but not
used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/9p/vfs_inode_dotl.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index ef9db3e03506..7af27ba1c25d 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -297,7 +297,6 @@ static int v9fs_vfs_mkdir_dotl(struct mnt_idmap *idmap,
 			       umode_t omode)
 {
 	int err;
-	struct v9fs_session_info *v9ses;
 	struct p9_fid *fid = NULL, *dfid = NULL;
 	kgid_t gid;
 	const unsigned char *name;
@@ -307,7 +306,6 @@ static int v9fs_vfs_mkdir_dotl(struct mnt_idmap *idmap,
 	struct posix_acl *dacl = NULL, *pacl = NULL;
 
 	p9_debug(P9_DEBUG_VFS, "name %pd\n", dentry);
-	v9ses = v9fs_inode2v9ses(dir);
 
 	omode |= S_IFDIR;
 	if (dir->i_mode & S_ISGID)
@@ -739,7 +737,6 @@ v9fs_vfs_mknod_dotl(struct mnt_idmap *idmap, struct inode *dir,
 	kgid_t gid;
 	const unsigned char *name;
 	umode_t mode;
-	struct v9fs_session_info *v9ses;
 	struct p9_fid *fid = NULL, *dfid = NULL;
 	struct inode *inode;
 	struct p9_qid qid;
@@ -749,7 +746,6 @@ v9fs_vfs_mknod_dotl(struct mnt_idmap *idmap, struct inode *dir,
 		 dir->i_ino, dentry, omode,
 		 MAJOR(rdev), MINOR(rdev));
 
-	v9ses = v9fs_inode2v9ses(dir);
 	dfid = v9fs_parent_fid(dentry);
 	if (IS_ERR(dfid)) {
 		err = PTR_ERR(dfid);
-- 
2.39.2


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

* Re: [PATCH][next] fs/9p: remove redundant pointer v9ses
  2024-02-29 22:22 [PATCH][next] fs/9p: remove redundant pointer v9ses Colin Ian King
@ 2024-03-04 12:59 ` Dominique Martinet
  2024-03-15 15:34   ` Eric Van Hensbergen
  0 siblings, 1 reply; 3+ messages in thread
From: Dominique Martinet @ 2024-03-04 12:59 UTC (permalink / raw)
  To: Eric Van Hensbergen
  Cc: Colin Ian King, Latchesar Ionkov, Christian Schoenebeck, v9fs,
	kernel-janitors, linux-kernel

Colin Ian King wrote on Thu, Feb 29, 2024 at 10:22:50PM +0000:
> Pointer v9ses is being assigned the value from the return of inlined
> function v9fs_inode2v9ses (which just returns inode->i_sb->s_fs_info).
> The pointer is not used after the assignment, so the variable is
> redundant and can be removed.
> 
> Cleans up clang scan warnings such as:
> fs/9p/vfs_inode_dotl.c:300:28: warning: variable 'v9ses' set but not
> used [-Wunused-but-set-variable]

Thanks for the patch!

Eric, this appears to be for your -next tree as it doesn't build on
master -- didn't notice the [next] in the subject line until I tried...
(I've just build-checked on your tree and it appears correct there)

> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Reviewed-by: Dominique Martinet <asmadeus@codewreck.org>

-- 
Dominique

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

* Re: [PATCH][next] fs/9p: remove redundant pointer v9ses
  2024-03-04 12:59 ` Dominique Martinet
@ 2024-03-15 15:34   ` Eric Van Hensbergen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Van Hensbergen @ 2024-03-15 15:34 UTC (permalink / raw)
  To: Dominique Martinet
  Cc: Colin Ian King, Latchesar Ionkov, Christian Schoenebeck, v9fs,
	kernel-janitors, linux-kernel

On Mon, Mar 04, 2024 at 09:59:22PM +0900, Dominique Martinet wrote:
> Colin Ian King wrote on Thu, Feb 29, 2024 at 10:22:50PM +0000:
> > Pointer v9ses is being assigned the value from the return of inlined
> > function v9fs_inode2v9ses (which just returns inode->i_sb->s_fs_info).
> > The pointer is not used after the assignment, so the variable is
> > redundant and can be removed.
> > 
> > Cleans up clang scan warnings such as:
> > fs/9p/vfs_inode_dotl.c:300:28: warning: variable 'v9ses' set but not
> > used [-Wunused-but-set-variable]
> 
> Thanks for the patch!
> 
> Eric, this appears to be for your -next tree as it doesn't build on
> master -- didn't notice the [next] in the subject line until I tried...
> (I've just build-checked on your tree and it appears correct there)
> 
> > 
> > Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> 
> Reviewed-by: Dominique Martinet <asmadeus@codewreck.org>
> 
> -- 
> Dominique

Pulled into my for-next tree, will try to get into a part-2 pull
request.  Thanks.

   -eric

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

end of thread, other threads:[~2024-03-15 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29 22:22 [PATCH][next] fs/9p: remove redundant pointer v9ses Colin Ian King
2024-03-04 12:59 ` Dominique Martinet
2024-03-15 15:34   ` Eric Van Hensbergen

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.