Merge pull request #193 from linD026/master

procfs: Enforce Linux naming style
This commit is contained in:
Jim Huang 2023-03-24 12:23:24 +08:00 committed by GitHub
commit 6eb7bd5d23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@
static struct proc_dir_entry *our_proc_file; static struct proc_dir_entry *our_proc_file;
static ssize_t procfile_read(struct file *filePointer, char __user *buffer, static ssize_t procfile_read(struct file *file_pointer, char __user *buffer,
size_t buffer_length, loff_t *offset) size_t buffer_length, loff_t *offset)
{ {
char s[13] = "HelloWorld!\n"; char s[13] = "HelloWorld!\n";
@ -27,7 +27,7 @@ static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
pr_info("copy_to_user failed\n"); pr_info("copy_to_user failed\n");
ret = 0; ret = 0;
} else { } else {
pr_info("procfile read %s\n", filePointer->f_path.dentry->d_name.name); pr_info("procfile read %s\n", file_pointer->f_path.dentry->d_name.name);
*offset += len; *offset += len;
} }

View File

@ -25,7 +25,7 @@ static char procfs_buffer[PROCFS_MAX_SIZE];
static unsigned long procfs_buffer_size = 0; static unsigned long procfs_buffer_size = 0;
/* This function is called then the /proc file is read */ /* This function is called then the /proc file is read */
static ssize_t procfile_read(struct file *filePointer, char __user *buffer, static ssize_t procfile_read(struct file *file_pointer, char __user *buffer,
size_t buffer_length, loff_t *offset) size_t buffer_length, loff_t *offset)
{ {
char s[13] = "HelloWorld!\n"; char s[13] = "HelloWorld!\n";
@ -36,7 +36,7 @@ static ssize_t procfile_read(struct file *filePointer, char __user *buffer,
pr_info("copy_to_user failed\n"); pr_info("copy_to_user failed\n");
ret = 0; ret = 0;
} else { } else {
pr_info("procfile read %s\n", filePointer->f_path.dentry->d_name.name); pr_info("procfile read %s\n", file_pointer->f_path.dentry->d_name.name);
*offset += len; *offset += len;
} }