]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
procfs-introduce-the-proc-pid-map_files-directory-checkpatch-fixes
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 30 Nov 2011 04:12:01 +0000 (15:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Nov 2011 04:14:06 +0000 (15:14 +1100)
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
WARNING: line over 80 characters
#286: FILE: fs/proc/base.c:2433:
+static int proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)

WARNING: line over 80 characters
#351: FILE: fs/proc/base.c:2498:
+ fa = flex_array_alloc(sizeof(info), nr_files, GFP_KERNEL);

WARNING: line over 80 characters
#352: FILE: fs/proc/base.c:2499:
+ if (!fa || flex_array_prealloc(fa, 0, nr_files, GFP_KERNEL)) {

WARNING: line over 80 characters
#360: FILE: fs/proc/base.c:2507:
+ for (i = 0, vma = mm->mmap, pos = 2; vma; vma = vma->vm_next) {

WARNING: line over 80 characters
#368: FILE: fs/proc/base.c:2515:
+ info.len = snprintf(info.name, sizeof(info.name),

WARNING: line over 80 characters
#424: FILE: fs/proc/base.c:3179:
+ DIR("map_files",  S_IRUSR|S_IXUSR, proc_map_files_inode_operations, proc_map_files_operations),

WARNING: line over 80 characters
#437: FILE: include/linux/mm.h:1497:
+find_exact_vma(struct mm_struct *mm, unsigned long vm_start, unsigned long vm_end)

total: 0 errors, 7 warnings, 387 lines checked

./patches/procfs-introduce-the-proc-pid-map_files-directory.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/base.c
include/linux/mm.h

index 51b0322e2842bf347dc6d7182163fd60d4f12f8e..f200c72bd74dcb81a2ad72c53bb3b90b0c003bc9 100644 (file)
@@ -2371,7 +2371,8 @@ static const struct inode_operations proc_map_files_inode_operations = {
        .setattr        = proc_setattr,
 };
 
-static int proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
+static int
+proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
 {
        struct dentry *dentry = filp->f_path.dentry;
        struct inode *inode = dentry->d_inode;
@@ -2436,8 +2437,10 @@ static int proc_map_files_readdir(struct file *filp, void *dirent, filldir_t fil
                }
 
                if (nr_files) {
-                       fa = flex_array_alloc(sizeof(info), nr_files, GFP_KERNEL);
-                       if (!fa || flex_array_prealloc(fa, 0, nr_files, GFP_KERNEL)) {
+                       fa = flex_array_alloc(sizeof(info), nr_files,
+                                               GFP_KERNEL);
+                       if (!fa || flex_array_prealloc(fa, 0, nr_files,
+                                                       GFP_KERNEL)) {
                                ret = -ENOMEM;
                                if (fa)
                                        flex_array_free(fa);
@@ -2445,7 +2448,8 @@ static int proc_map_files_readdir(struct file *filp, void *dirent, filldir_t fil
                                mmput(mm);
                                goto out_unlock;
                        }
-                       for (i = 0, vma = mm->mmap, pos = 2; vma; vma = vma->vm_next) {
+                       for (i = 0, vma = mm->mmap, pos = 2; vma;
+                                       vma = vma->vm_next) {
                                if (!vma->vm_file)
                                        continue;
                                if (++pos <= filp->f_pos)
@@ -2453,9 +2457,9 @@ static int proc_map_files_readdir(struct file *filp, void *dirent, filldir_t fil
 
                                get_file(vma->vm_file);
                                info.file = vma->vm_file;
-                               info.len = snprintf(info.name, sizeof(info.name),
-                                                   "%lx-%lx", vma->vm_start,
-                                                   vma->vm_end);
+                               info.len = snprintf(info.name,
+                                               sizeof(info.name), "%lx-%lx",
+                                               vma->vm_start, vma->vm_end);
                                if (flex_array_put(fa, i++, &info, GFP_KERNEL))
                                        BUG();
                        }
index fc110b63f1aac857380a2ebc44d4c4d38de53640..0b6e7443d3e93a0f9b80eabb443a55867fe21049 100644 (file)
@@ -1493,8 +1493,8 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma)
 }
 
 /* Look up the first VMA which exactly match the interval vm_start ... vm_end */
-static inline struct vm_area_struct *
-find_exact_vma(struct mm_struct *mm, unsigned long vm_start, unsigned long vm_end)
+static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
+                               unsigned long vm_start, unsigned long vm_end)
 {
        struct vm_area_struct *vma = find_vma(mm, vm_start);