lkml.org 
[lkml]   [2021]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: android: Remove set but unused variable in ashmem.c
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:
> > 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.


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

\
 
 \ /
  Last update: 2021-07-26 15:46    [W:0.160 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site