Skip to content

Commit 23c0a73

Browse files
committed
procfs: Enforce Linux naming style
1 parent 45ac408 commit 23c0a73

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/procfs1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
static struct proc_dir_entry *our_proc_file;
1818

19-
static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
19+
static ssize_t procfile_read(struct file *file_pointer, char __user *buffer,
2020
size_t buffer_length, loff_t *offset)
2121
{
2222
char s[13] = "HelloWorld!\n";
@@ -27,7 +27,7 @@ static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
2727
pr_info("copy_to_user failed\n");
2828
ret = 0;
2929
} else {
30-
pr_info("procfile read %s\n", filePointer->f_path.dentry->d_name.name);
30+
pr_info("procfile read %s\n", file_pointer->f_path.dentry->d_name.name);
3131
*offset += len;
3232
}
3333

examples/procfs2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static char procfs_buffer[PROCFS_MAX_SIZE];
2525
static unsigned long procfs_buffer_size = 0;
2626

2727
/* This function is called then the /proc file is read */
28-
static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
28+
static ssize_t procfile_read(struct file *file_pointer, char __user *buffer,
2929
size_t buffer_length, loff_t *offset)
3030
{
3131
char s[13] = "HelloWorld!\n";
@@ -36,7 +36,7 @@ static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
3636
pr_info("copy_to_user failed\n");
3737
ret = 0;
3838
} else {
39-
pr_info("procfile read %s\n", filePointer->f_path.dentry->d_name.name);
39+
pr_info("procfile read %s\n", file_pointer->f_path.dentry->d_name.name);
4040
*offset += len;
4141
}
4242

0 commit comments

Comments
 (0)