From: Alison Schofield <amsfield22@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: Clean-up idea: IIO Headers
Date: Fri, 24 Feb 2017 17:42:40 -0800 [thread overview]
Message-ID: <20170225014231.GA3395@d830.WORKGROUP> (raw)
Hi Outreachy Applicants,
Here is a clean-up task for staging/iio you might like to try.
Staging IIO Header file (re-)organization:
Guidelines to follow:
(Reference https://kernelnewbies.org/KernelHeaders)
Three cases you may find:
1) If it's a single source file, its header info should be in that source file.
*** Do this!
2) Interfaces between source files in a single module can have a header file
in same dir as the source files.
*** Leave this alone.
3) Interfaces shared between modules go in a header file in include/linux/iio
*** Leave this alone. We will do this when the driver is moving out of
staging
Here's an example patchset:
https://groups.google.com/forum/#!searchin/outreachy-kernel/header$20file$20ad5933%7Csort:relevance/outreachy-kernel/THYpgGyOgsI/iz8lrqwfDAAJ
Note that when you pull the header file in, there's a customary order to it
that the drivers in staging may not be following. In the example one above,
I moved the #defines to be before the chip structure definitions. So, you'll
do best if you look at similar drivers in the same directory upstream, to
see how they order their header information. Always good to look at a few,
because one may not be the perfect role model.
It is customary to alphabetize the #includes, and to separate the kernel
and IIO subsystem #includes with a blank line. So, although we wouldn't
send in a patch just to alphabetize #includes, while you are moving them
to the .c file, and while you are checking that they are actually needed,
sure - go ahead and alphabetize them. (Example patch didn't alphabetize,
you'll do better ;)
To verify the patch(set), I'd suggest applying it to a clean tree and
rebuilding.
Questions? Just ask on this thread.
alisons
next reply other threads:[~2017-02-25 1:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-25 1:42 Alison Schofield [this message]
2017-02-25 5:27 ` [Outreachy kernel] Clean-up idea: IIO Headers Katie Dunne
2017-02-25 18:23 ` Alison Schofield
2017-02-26 19:01 ` Katie Dunne
2017-02-26 21:06 ` Alison Schofield
2017-02-27 17:56 ` Alison Schofield
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=20170225014231.GA3395@d830.WORKGROUP \
--to=amsfield22@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.