lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 06 Mar 2020 11:10:32 -0800
From:   Joe Perches <joe@...ches.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Qian Cai <cai@....pw>, Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, juri.lelli@...hat.com,
        Vincent Guittot <vincent.guittot@...aro.org>,
        dietmar.eggemann@....com, Steven Rostedt <rostedt@...dmis.org>,
        Benjamin Segall <bsegall@...gle.com>, mgorman@...e.de,
        LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] sched/cputime: silence a -Wunused-function warning

On Fri, 2020-03-06 at 11:02 -0800, Nick Desaulniers wrote:
> On Fri, Mar 6, 2020 at 10:39 AM Joe Perches <joe@...ches.com> wrote:
[]
> > Turns out there are hundreds of unused static inline
> > functions in kernel .h files.
> > 
> > A trivial script to find some of them (with likely
> > false positives as some might actually be used via ##
> > token pasting mechanisms).
> > 
> > (and there's almost certainly a better way to do this
> >  too as it takes a _very_ long time to run)
> > 
> > $ grep-2.5.4 -rP --include=*.h '^[ \t]*static\s+inline\s+(?:\w+\s+){1,3}\w+[ \t]*\(' * | \
> >   grep -P -oh '\w+\s*\(' | \
> >   sort | uniq -c | sort -n | grep -P '^\s+1\b' | \
> >   sed -r -e 's/^\s+1\s+//' -e 's/\(//' | \
> >   while read line ; do \
> >     echo -n "$line: " ; git grep -w $line | wc -l ; \
> >   done | \
> >   grep ": 1$"
> 
> Please start sending patches to remove them and I'll review.  If this
> is a good amount of work, I have newbies that are looking to
> contribute and can help.

That's not a task I care to take on.

I could run the script and post the results through
if you can not.



Powered by blists - more mailing lists