Skip to contentSkip to conversation

mm: shmem: remove unused info variable

PATCH Applied Corentin Labbe 2 participants 3 messages Nov 15, 2017 – Nov 16, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: shmem: remove unused info variable

This patch fix the following build warning by simply removing the unused info variable.
mm/shmem.c:3205:27: warning: variable 'info' set but not used [-Wunused-but-set-variable]

---
 mm/shmem.c | 2 --
 1 file changed, 2 deletions(-)
mm/shmem.c +0 -2
index 544c105d706a..7fbe67be86fa 100644
@@ -3202,7 +3202,6 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
 	int len;
 	struct inode *inode;
 	struct page *page;
-	struct shmem_inode_info *info;
 
 	len = strlen(symname) + 1;
 	if (len > PAGE_SIZE)
@@ -3222,7 +3221,6 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
 		error = 0;
 	}
 
-	info = SHMEM_I(inode);
 	inode->i_size = len-1;
 	if (len <= SHORT_SYMLINK_LEN) {
 		inode->i_link = kmemdup(symname, len, GFP_KERNEL);
Signature · 1 line
2.13.6
Acked-by on v1 1/1
#1 lore raw

This seems familiar. Ohh, you have posted it
http://lkml.kernel.org/r/[email protected]
already. It fall though cracks, it seems. CCing Andrew

Quoted 5 lines · Corentin Labbe

This patch fix the following build warning by simply removing the unused info variable.
mm/shmem.c:3205:27: warning: variable 'info' set but not used [-Wunused-but-set-variable]

Quoted 26 lines
---
 mm/shmem.c | 2 --
 1 file changed, 2 deletions(-)
mm/shmem.c +0 -2
index 544c105d706a..7fbe67be86fa 100644
@@ -3202,7 +3202,6 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
 	int len;
 	struct inode *inode;
 	struct page *page;
-	struct shmem_inode_info *info;
 
 	len = strlen(symname) + 1;
 	if (len > PAGE_SIZE)
@@ -3222,7 +3221,6 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
 		error = 0;
 	}
 
-	info = SHMEM_I(inode);
 	inode->i_size = len-1;
 	if (len <= SHORT_SYMLINK_LEN) {
 		inode->i_link = kmemdup(symname, len, GFP_KERNEL);
Signature · 1 line
2.13.6
Signature · 8 lines
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#2 lore raw
Quoted 3 lines · Michal Hocko

This seems familiar. Ohh, you have posted it
http://lkml.kernel.org/r/[email protected]
already. It fall though cracks, it seems. CCing Andrew

now, for real

Quoted 39 lines · Corentin Labbe
Quoted 5 lines

This patch fix the following build warning by simply removing the unused info variable.
mm/shmem.c:3205:27: warning: variable 'info' set but not used [-Wunused-but-set-variable]

Quoted 26 lines
---
 mm/shmem.c | 2 --
 1 file changed, 2 deletions(-)
mm/shmem.c +0 -2
index 544c105d706a..7fbe67be86fa 100644
@@ -3202,7 +3202,6 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
 	int len;
 	struct inode *inode;
 	struct page *page;
-	struct shmem_inode_info *info;
 
 	len = strlen(symname) + 1;
 	if (len > PAGE_SIZE)
@@ -3222,7 +3221,6 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
 		error = 0;
 	}
 
-	info = SHMEM_I(inode);
 	inode->i_size = len-1;
 	if (len <= SHORT_SYMLINK_LEN) {
 		inode->i_link = kmemdup(symname, len, GFP_KERNEL);
Signature · 1 line
2.13.6
Signature · 2 lines
Michal Hocko
SUSE Labs
Signature · 8 lines
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>