1
0
mirror of https://github.com/sysprog21/lkmpg.git synced 2021-08-03 01:33:29 +03:00

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.
This commit is contained in:
Jim Huang
2021-07-22 11:25:32 +08:00
parent 1c93f2f5ef
commit faf3aa7c22
19 changed files with 48 additions and 17 deletions

View File

@@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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 */

View File

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

View File

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

View File

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

View File

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

View File

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