From: "Tobin C. Harding" <me@tobin.cc>
To: kernel-janitors@vger.kernel.org
Subject: TODO list errata
Date: Wed, 22 Feb 2017 00:55:27 +0000 [thread overview]
Message-ID: <20170222005527.GA4702@eros> (raw)
The last task on the TODO list seems to be mixing up definition and declaration
https://kernelnewbies.org/KernelJanitors/Todo
---- from above link
Some function prototypes (in both .h and .c files) specify attributes like __init and __exit in the prototype. gcc (at least at 3.3.3) uses the last such attribute that is actually specified, without issuing a warning. So we can have:
* Prototype declarations that use one attribute and a function body that uses another attribute.
* Functions that from the .c code appear to be normal text but the .h file is silently setting a special attribute.
Both are potential sources of programmer confusion or bugs.
Identify: * all places where attributes in prototype and function definition don't match (choose the correct one, move it to declaration), * all places where prototype contains attribute but definition doesn't (move it to declaration).
The same task should not be done for extern data declarations because of FRV.
Once that is done, remove #include <linux/init.h> from all .h files. Only .[cS] files should specify which section the data and text are stored in, .h files should only define the C language information.
----
Should this be
(choose the correct one, move it to definition)
and
(move it to definition)
As an aside note, is this list of TODO's still current
last edited 2009-04-20 14:59:47 by HenrikKretzschmar
thanks,
Tobin.
reply other threads:[~2017-02-22 0:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170222005527.GA4702@eros \
--to=me@tobin.cc \
--cc=kernel-janitors@vger.kernel.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