소스 검색

Make each source file more consistent

It is vital to denote the file name and summary for each source,
otherwise readers could not figure out the corresponding files.
Jim Huang 3 년 전
부모
커밋
faf3aa7c22

+ 2 - 2
examples/bottomhalf.c

@@ -1,8 +1,8 @@
 /*
  * bottomhalf.c - Top and bottom half interrupt handling
  *
- *  Based upon the RPi example by Stefan Wendler (devnull@kaltpost.de)
- *  from:
+ * Based upon the RPi example by Stefan Wendler (devnull@kaltpost.de)
+ * from:
  *    https://github.com/wendlers/rpi-kmod-samples
  *
  *  Press one button to turn on a LED and another to turn it off

+ 1 - 1
examples/chardev.h

@@ -1,5 +1,5 @@
 /*
- *  chardev2.h - the header file with the ioctl definitions.
+ *  chardev.h - the header file with the ioctl definitions.
  *
  *  The declarations here have to be in a header file, because
  *  they need to be known both to the kernel module

+ 3 - 0
examples/completions.c

@@ -1,3 +1,6 @@
+/*
+ *  completions.c
+ */
 #include <linux/completion.h>
 #include <linux/init.h>
 #include <linux/kernel.h>

+ 3 - 0
examples/cryptosha256.c

@@ -1,3 +1,6 @@
+/*
+ *  cryptosha256.c
+ */
 #include <crypto/internal/hash.h>
 #include <linux/module.h>
 

+ 3 - 0
examples/cryptosk.c

@@ -1,3 +1,6 @@
+/*
+ *  cryptosk.c
+ */
 #include <crypto/internal/skcipher.h>
 #include <linux/crypto.h>
 #include <linux/module.h>

+ 3 - 0
examples/devicemodel.c

@@ -1,3 +1,6 @@
+/*
+ *  devicemodel.c
+ */
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>

+ 3 - 0
examples/example_atomic.c

@@ -1,3 +1,6 @@
+/*
+ *  example_atomic.c
+ */
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/module.h>

+ 3 - 0
examples/example_mutex.c

@@ -1,3 +1,6 @@
+/*
+ *  example_mutex.c
+ */
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>

+ 3 - 0
examples/example_rwlock.c

@@ -1,3 +1,6 @@
+/*
+ *  example_rwlock.c
+ */
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/module.h>

+ 3 - 0
examples/example_spinlock.c

@@ -1,3 +1,6 @@
+/*
+ *  example_spinlock.c
+ */
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>

+ 3 - 0
examples/example_tasklet.c

@@ -1,3 +1,6 @@
+/*
+ *  example_tasklet.c
+ */
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>

+ 1 - 2
examples/hello-sysfs.c

@@ -1,7 +1,6 @@
 /*
- * hello-sysfs.c sysfs example
+ *  hello-sysfs.c sysfs example
  */
-
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/kobject.h>

+ 3 - 0
examples/ioctl.c

@@ -1,3 +1,6 @@
+/*
+ *  ioctl.c
+ */
 #include <linux/cdev.h>
 #include <linux/fs.h>
 #include <linux/init.h>

+ 4 - 4
examples/other/cat_noblock.c

@@ -1,6 +1,7 @@
-/* cat_noblock.c - open a file and display its contents, but exit rather than
- * wait for input */
-
+/*
+ *  cat_noblock.c - open a file and display its contents, but exit rather than
+ *  wait for input.
+ */
 #include <errno.h>  /* for errno */
 #include <fcntl.h>  /* for open */
 #include <stdio.h>  /* standard I/O */
@@ -9,7 +10,6 @@
 
 #define MAX_BYTES 1024 * 4
 
-
 int main(int argc, char *argv[])
 {
     int fd;                 /* The file descriptor for the file to read */

+ 2 - 2
examples/procfs1.c

@@ -1,6 +1,6 @@
 /*
- procfs1.c
-*/
+ *  procfs1.c
+ */
 
 #include <linux/kernel.h>
 #include <linux/module.h>

+ 1 - 2
examples/procfs2.c

@@ -1,6 +1,5 @@
-/**
+/*
  *  procfs2.c -  create a "file" in /proc
- *
  */
 
 #include <linux/kernel.h>  /* We're doing kernel work */

+ 2 - 2
examples/procfs3.c

@@ -1,6 +1,6 @@
 /*
-    procfs3.c
-*/
+ *  procfs3.c
+ */
 
 #include <linux/kernel.h>
 #include <linux/module.h>

+ 2 - 2
examples/procfs4.c

@@ -1,6 +1,6 @@
-/**
+/*
  *  procfs4.c -  create a "file" in /proc
- *      This program uses the seq_file library to manage the /proc file.
+ *  This program uses the seq_file library to manage the /proc file.
  *
  */
 

+ 3 - 0
examples/sched.c

@@ -1,3 +1,6 @@
+/*
+ *  sched.c
+ */
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/workqueue.h>