Thread (7 messages) 7 messages, 4 authors, 2021-07-28

Re: [PATCH] staging: android: Remove set but unused variable in ashmem.c

From: Dan Carpenter <hidden>
Date: 2021-07-26 13:45:29
Also in: lkml

On Sat, Jul 24, 2021 at 09:49:35AM +0200, Fabio M. De Francesco wrote:
On Friday, July 23, 2021 10:14:46 PM CEST Suren Baghdasaryan wrote:
quoted
How about its usage in the above lockdep_set_class(&inode->i_rwsem,
...) call? 
I'm sorry. I didn't notice that 'inode' is used soon after assignment, just in 
the line that follows it. I was also too confident that rebuilding the driver 
would have triggered an error if it is used somewhere else. I was obviously 
wrong.

Furthermore, I usually automatically search with grep or other tools for other 
occurrences of a symbol in the function and the file, but this time I must 
have forgotten to do that.
Another trick which would have helped is to try find out which patch
forgot to remove the "inode" variale, because that developer would have
seen the warning as well.

quoted
I'm guessing you are building with CONFIG_LOCKDEP=n.
Actually my .config sets CONFIG_LOCKDEP_SUPPORT=y. Did you refer to this? 
There is no CONFIG_LOCKDEP in the file.
Use make nconfig and then use f8 to search for CONFIG_LOCKDEP.

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help