+ mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes
has been added to the -mm tree.  Its filename is
     mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes

WARNING: 'lenght' may be misspelled - perhaps 'length'?
#7: 
things.  It was discussed in lenght here,

WARNING: line over 80 characters
#252: FILE: drivers/md/dm-crypt.c:2161:
+	unsigned long pages = (totalram_pages() - totalhigh_pages()) * DM_CRYPT_MEMORY_PERCENT / 100;

WARNING: line over 80 characters
#263: FILE: drivers/md/dm-integrity.c:2846:
+	if (journal_pages >= totalram_pages() - totalhigh_pages() || journal_desc_size > ULONG_MAX) {

WARNING: line over 80 characters
#307: FILE: drivers/parisc/ccio-dma.c:1254:
+	iova_space_size = (u32) (totalram_pages() / count_parisc_driver(&ccio_driver));

WARNING: please, no spaces at the start of a line
#472: FILE: include/linux/highmem.h:47:
+       atomic_long_inc(&_totalhigh_pages);$

WARNING: please, no spaces at the start of a line
#477: FILE: include/linux/highmem.h:52:
+       atomic_long_dec(&_totalhigh_pages);$

WARNING: please, no spaces at the start of a line
#482: FILE: include/linux/highmem.h:57:
+       atomic_long_add(count, &_totalhigh_pages);$

WARNING: please, no spaces at the start of a line
#487: FILE: include/linux/highmem.h:62:
+       atomic_long_set(&_totalhigh_pages, val);$

WARNING: please, no spaces at the start of a line
#511: FILE: include/linux/mm.h:54:
+       return (unsigned long)atomic_long_read(&_totalram_pages);$

WARNING: please, no spaces at the start of a line
#516: FILE: include/linux/mm.h:59:
+       atomic_long_inc(&_totalram_pages);$

WARNING: please, no spaces at the start of a line
#521: FILE: include/linux/mm.h:64:
+       atomic_long_dec(&_totalram_pages);$

WARNING: please, no spaces at the start of a line
#526: FILE: include/linux/mm.h:69:
+       atomic_long_add(count, &_totalram_pages);$

WARNING: please, no spaces at the start of a line
#531: FILE: include/linux/mm.h:74:
+       atomic_long_set(&_totalram_pages, val);$

WARNING: line over 80 characters
#722: FILE: mm/page_alloc.c:7288:
+		(physpages - totalram_pages() - totalcma_pages) << (PAGE_SHIFT - 10),

WARNING: Missing a blank line after declarations
#745: FILE: mm/shmem.c:118:
+	unsigned long nr_pages = totalram_pages();
+	return min(nr_pages - totalhigh_pages(), nr_pages / 2);

total: 0 errors, 15 warnings, 656 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic.patch has style problems, please review.

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

Please run checkpatch prior to sending patches

Cc: Arun KS <arunks@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/highmem.h |    8 ++++----
 include/linux/mm.h      |   10 +++++-----
 mm/shmem.c              |    1 +
 3 files changed, 10 insertions(+), 9 deletions(-)

--- a/include/linux/highmem.h~mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes
+++ a/include/linux/highmem.h
@@ -44,22 +44,22 @@ static inline unsigned long totalhigh_pa
 
 static inline void totalhigh_pages_inc(void)
 {
-       atomic_long_inc(&_totalhigh_pages);
+	atomic_long_inc(&_totalhigh_pages);
 }
 
 static inline void totalhigh_pages_dec(void)
 {
-       atomic_long_dec(&_totalhigh_pages);
+	atomic_long_dec(&_totalhigh_pages);
 }
 
 static inline void totalhigh_pages_add(long count)
 {
-       atomic_long_add(count, &_totalhigh_pages);
+	atomic_long_add(count, &_totalhigh_pages);
 }
 
 static inline void totalhigh_pages_set(long val)
 {
-       atomic_long_set(&_totalhigh_pages, val);
+	atomic_long_set(&_totalhigh_pages, val);
 }
 
 void kmap_flush_unused(void);
--- a/include/linux/mm.h~mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes
+++ a/include/linux/mm.h
@@ -51,27 +51,27 @@ static inline void set_max_mapnr(unsigne
 extern atomic_long_t _totalram_pages;
 static inline unsigned long totalram_pages(void)
 {
-       return (unsigned long)atomic_long_read(&_totalram_pages);
+	return (unsigned long)atomic_long_read(&_totalram_pages);
 }
 
 static inline void totalram_pages_inc(void)
 {
-       atomic_long_inc(&_totalram_pages);
+	atomic_long_inc(&_totalram_pages);
 }
 
 static inline void totalram_pages_dec(void)
 {
-       atomic_long_dec(&_totalram_pages);
+	atomic_long_dec(&_totalram_pages);
 }
 
 static inline void totalram_pages_add(long count)
 {
-       atomic_long_add(count, &_totalram_pages);
+	atomic_long_add(count, &_totalram_pages);
 }
 
 static inline void totalram_pages_set(long val)
 {
-       atomic_long_set(&_totalram_pages, val);
+	atomic_long_set(&_totalram_pages, val);
 }
 
 extern void * high_memory;
--- a/mm/shmem.c~mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes
+++ a/mm/shmem.c
@@ -115,6 +115,7 @@ static unsigned long shmem_default_max_b
 static unsigned long shmem_default_max_inodes(void)
 {
 	unsigned long nr_pages = totalram_pages();
+
 	return min(nr_pages - totalhigh_pages(), nr_pages / 2);
 }
 #endif
_

Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are

arm-arch-arm-include-asm-pageh-needs-personalityh.patch
mm.patch
mm-slab-remove-unnecessary-unlikely-fix.patch
mm-slub-record-final-state-of-slub-action-in-deactivate_slab-fix.patch
mm-page_owner-clamp-read-count-to-page_size-fix.patch
mm-hotplug-optimize-clear_hwpoisoned_pages-fix.patch
mm-ksm-do-not-block-on-page-lock-when-searching-stable-tree-fix.patch
mm-memory_hotplug-print-reason-for-the-offlining-failure-fix.patch
mm-convert-totalram_pages-and-totalhigh_pages-variables-to-atomic-checkpatch-fixes.patch
memory_hotplug-free-pages-as-higher-order-fix.patch
exec-separate-mm_anonpages-and-rlimit_stack-accounting-checkpatch-fixes.patch
ipc-allow-boot-time-extension-of-ipcmni-from-32k-to-8m-checkpatch-fixes.patch
kernel-forkc-export-kernel_thread-to-modules.patch
slab-leaks3-default-y.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux