From: SeongJae Park <sj@kernel.org>
To: akpm@linux-foundation.org
Cc: hch@lst.de, hughd@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, SeongJae Park <sj@kernel.org>
Subject: [PATCH] mm/shmem: Fix a build error due to shmem_unuse() under !CONFIG_SHMEM
Date: Thu, 30 Dec 2021 10:38:44 +0000 [thread overview]
Message-ID: <20211230103844.15302-1-sj@kernel.org> (raw)
A patch[1] in -mm tree that titled mm-simplify-try_to_unuse.patch[2]
didn't properly change the type of 'shmem_unuse()' definition under
!CONFIG_SHMEM, and therefore causing below build error when CONFIG_SHMEM
is not set.
linux/mm/shmem.c:3992:5: error: conflicting types for 'shmem_unuse'
3992 | int shmem_unuse(unsigned int type, unsigned long *fs_pages_to_unuse)
| ^~~~~~~~~~~
In file included from linux/include/linux/khugepaged.h:6,
from linux/mm/shmem.c:37:
linux/include/linux/shmem_fs.h:86:5: note: previous declaration of 'shmem_unuse' was here
86 | int shmem_unuse(unsigned int type);
| ^~~~~~~~~~~
linux/scripts/Makefile.build:289: recipe for target 'mm/shmem.o' failed
This commit fixes the issue by fixing the type of the definition under
the config.
[1] https://lore.kernel.org/linux-mm/20211224062246.1258487-9-hch@lst.de/
[2] https://www.ozlabs.org/~akpm/mmotm/broken-out/mm-simplify-try_to_unuse.patch
Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/shmem.c | 2 +-
scripts/rust-version.sh | 0
2 files changed, 1 insertion(+), 1 deletion(-)
mode change 100644 => 100755 scripts/rust-version.sh
diff --git a/mm/shmem.c b/mm/shmem.c
index 421b2459929a..a83c91282c1f 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -3989,7 +3989,7 @@ int __init shmem_init(void)
return 0;
}
-int shmem_unuse(unsigned int type, unsigned long *fs_pages_to_unuse)
+int shmem_unuse(unsigned int type)
{
return 0;
}
diff --git a/scripts/rust-version.sh b/scripts/rust-version.sh
old mode 100644
new mode 100755
--
2.17.1
next reply other threads:[~2021-12-30 10:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-30 10:38 SeongJae Park [this message]
2021-12-30 17:32 ` [PATCH] mm/shmem: Fix a build error due to shmem_unuse() under !CONFIG_SHMEM Randy Dunlap
2022-01-03 7:47 ` Christoph Hellwig
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=20211230103844.15302-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.