mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Qian Cai <cai@lca.pw>, Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	juri.lelli@redhat.com,
	Vincent Guittot <vincent.guittot@linaro.org>,
	dietmar.eggemann@arm.com, Steven Rostedt <rostedt@goodmis.org>,
	Benjamin Segall <bsegall@google.com>,
	mgorman@suse.de, LKML <linux-kernel@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH] sched/cputime: silence a -Wunused-function warning
Date: Fri, 06 Mar 2020 11:10:32 -0800	[thread overview]
Message-ID: <4ec4c6915c23545a9d45f37df9ab4eb6a422b234.camel@perches.com> (raw)
In-Reply-To: <CAKwvOdmdaDL4bhJc+7Xms=f4YXDw-Rr+WQAknd0Jv6UWOBUcEA@mail.gmail.com>

On Fri, 2020-03-06 at 11:02 -0800, Nick Desaulniers wrote:
> On Fri, Mar 6, 2020 at 10:39 AM Joe Perches <joe@perches.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.




  reply	other threads:[~2020-03-06 19:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 15:41 Qian Cai
2020-03-06 17:13 ` Nick Desaulniers
2020-03-06 17:25   ` Joe Perches
2020-03-06 18:38     ` Joe Perches
2020-03-06 19:02       ` Nick Desaulniers
2020-03-06 19:10         ` Joe Perches [this message]
2020-03-07  0:07         ` linux-kernel: Unused static inline functions Joe Perches
2020-04-23 18:57           ` Nick Desaulniers
2020-04-23 21:22             ` Joe Perches
2020-04-24 16:07               ` Julia Lawall
2020-11-29 23:56           ` Joe Perches
2020-05-09 13:12   ` [PATCH] sched/cputime: silence a -Wunused-function warning Qian Cai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ec4c6915c23545a9d45f37df9ab4eb6a422b234.camel@perches.com \
    --to=joe@perches.com \
    --cc=bsegall@google.com \
    --cc=cai@lca.pw \
    --cc=clang-built-linux@googlegroups.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®