From: Arjan van de Ven <arjan@infradead.org>
To: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: some numbers on macros
Date: Sat, 24 May 2008 09:33:50 -0700 [thread overview]
Message-ID: <20080524093350.60e6dc8d@infradead.org> (raw)
In-Reply-To: <200805241748.19607.m.kozlowski@tuxland.pl>
On Sat, 24 May 2008 17:48:19 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Hello,
>
> I wrote a rather dumb script to see some numbers on macros I
> was interested in. The script basically parses *.c file, finds macro
> definitions and counts how many times each macro was used in this
> source file. The script doesn't see any context so it can produce
> false positives - that is one of the reasons it doesn't look into
> header files - it's simply too dumb.
>
> The macros I was interested in were these which are:
> - defined and unused
> - defined and used only once
> - defined more than once
>
> I dont want to start another cleanup-patches-storm so first I'd like
> to know if this excersise is worth it as unused macros do not do much
> harm.
>
> Would such patches be accepted?
An unused define/macro that was declared in a .c file isn't very
interesting to be honest; that tends to be helper macros for the
developer and removing those is just counter productive.
unused macros in common header files are an indication of stale APIs
otoh.. and might be of some interest. (Same for static inline in
headers)
next prev parent reply other threads:[~2008-05-24 16:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-24 15:48 some numbers on macros Mariusz Kozlowski
2008-05-24 16:33 ` Arjan van de Ven [this message]
2008-05-24 18:52 ` Matthew Wilcox
2008-05-24 23:41 ` Mariusz Kozlowski
2008-05-24 23:46 ` Arjan van de Ven
2008-05-25 9:11 ` Mariusz Kozlowski
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=20080524093350.60e6dc8d@infradead.org \
--to=arjan@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.kozlowski@tuxland.pl \
/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