[FE training-materials-updates] kernel-module-simple: don't tell to use indent
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Mon Dec 1 16:49:41 CET 2014
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=56ee4c7412e10cd74152ba51b40287e47440f655
>---------------------------------------------------------------
commit 56ee4c7412e10cd74152ba51b40287e47440f655
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date: Mon Dec 1 16:45:17 2014 +0100
kernel-module-simple: don't tell to use indent
Last week, at the training session, they tried to use "indent -linux",
and it actually generated some code that is not compliant according to
checkpatch.
And anyway, having to use "indent -linux" is really a sign that the
source code editor is either badly chosen or improperly configured. I
did a quick poll at the Toulouse office, and none of us have 'indent'
installed on our machine, even though we have sent many many kernel
patches.
Therefore, simply get rid of the instructions telling to use indent,
as it is not recommending a good practice. Recommend instead to
configure properly its text editor.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
>---------------------------------------------------------------
56ee4c7412e10cd74152ba51b40287e47440f655
labs/kernel-module-simple/kernel-module-simple.tex | 27 ++++------------------
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/labs/kernel-module-simple/kernel-module-simple.tex b/labs/kernel-module-simple/kernel-module-simple.tex
index 0ac1848..319d044 100644
--- a/labs/kernel-module-simple/kernel-module-simple.tex
+++ b/labs/kernel-module-simple/kernel-module-simple.tex
@@ -90,28 +90,11 @@ to find which options are available. Now, run:
~/linux-kernel-labs/src/linux/scripts/checkpatch.pl --file --no-tree hello_version.c
\end{verbatim}
-See how many violations are reported on your code. If there are
-indenting errors, you can first run your code through the \code{indent}
-command:
-
-\begin{verbatim}
-sudo apt-get install indent
-indent -linux hello_version.c
-\end{verbatim}
-
-Caution: don't run \code{indent} when you modify source files created
-by other people. Otherwise, people won't be able to distinguish your own
-changes from the ones made by \code{indent}.
-
-You can now compare the indented file with the original:
-
-\begin{verbatim}
-sudo apt-get install meld
-meld hello_version.c~ hello_version.c
-\end{verbatim}
-
-Now, get back to \code{checkpatch.pl} and fix your code until there are
-no errors left.
+See how many violations are reported on your code, and fix your code
+until there are no errors left. If there are many indentation related
+errors, make sure you use a properly configured source code editor,
+according to the kernel coding style rules in
+\code{Documentation/CodingStyle}.
\section{Adding the hello\_version module to the kernel sources}
More information about the training-materials-updates
mailing list