From: Arnd Bergmann <arnd@arndb.de>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>, Jan Kara <jack@suse.cz>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Lorenzo Stoakes <lstoakes@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm: mark mm_pgtables_bytes() argument as const
Date: Wed, 18 Oct 2017 10:31:17 +0200 [thread overview]
Message-ID: <20171018083226.3124972-1-arnd@arndb.de> (raw)
The newly introduced mm_pgtables_bytes() function has two
definitions with slightly different prototypes. The one
used for CONFIG_MMU=n causes a compile-time warning:
In file included from include/linux/kernel.h:13:0,
from mm/debug.c:8:
mm/debug.c: In function 'dump_mm':
mm/debug.c:137:21: error: passing argument 1 of 'mm_pgtables_bytes' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
This changes it to be the same as the other one and avoid the
warning.
Fixes: 7444e6ee9cce ("mm: consolidate page table accounting")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/mm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f7db128d2c59..2067dc7d03e7 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1677,7 +1677,7 @@ static inline void mm_dec_nr_ptes(struct mm_struct *mm)
#else
static inline void mm_pgtables_bytes_init(struct mm_struct *mm) {}
-static inline unsigned long mm_pgtables_bytes(struct mm_struct *mm)
+static inline unsigned long mm_pgtables_bytes(const struct mm_struct *mm)
{
return 0;
}
--
2.9.0
next reply other threads:[~2017-10-18 8:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 8:31 Arnd Bergmann [this message]
2017-10-18 8:40 ` Kirill A. Shutemov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171018083226.3124972-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=mhocko@suse.com \
--cc=ross.zwisler@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®