linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: android: Remove set but unused variable in ashmem.c
@ 2021-07-23 20:05 Fabio M. De Francesco
  2021-07-23 20:14 ` Suren Baghdasaryan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Fabio M. De Francesco @ 2021-07-23 20:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
	Martijn Coenen, Joel Fernandes, Christian Brauner,
	Hridya Valsaraju, Suren Baghdasaryan, linux-kernel,
	linux-staging
  Cc: Fabio M. De Francesco

Remove variable 'inode' tnat is set but unused. Issue detected
by building with warning option -Wunused-but-set-variable.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
 drivers/staging/android/ashmem.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index ddbde3f8430e..606e988d3f63 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -406,7 +406,6 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
 	if (!asma->file) {
 		char *name = ASHMEM_NAME_DEF;
 		struct file *vmfile;
-		struct inode *inode;
 
 		if (asma->name[ASHMEM_NAME_PREFIX_LEN] != '\0')
 			name = asma->name;
@@ -418,7 +417,6 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
 			goto out;
 		}
 		vmfile->f_mode |= FMODE_LSEEK;
-		inode = file_inode(vmfile);
 		lockdep_set_class(&inode->i_rwsem, &backing_shmem_inode_class);
 		asma->file = vmfile;
 		/*
-- 
2.32.0


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

end of thread, other threads:[~2021-07-28 12:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 20:05 [PATCH] staging: android: Remove set but unused variable in ashmem.c Fabio M. De Francesco
2021-07-23 20:14 ` Suren Baghdasaryan
2021-07-24  7:49   ` Fabio M. De Francesco
2021-07-26 13:44     ` Dan Carpenter
2021-07-28 12:00       ` Fabio M. De Francesco
2021-07-24  2:53 ` kernel test robot
2021-07-24  3:14 ` kernel test robot

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).