From patchwork Thu Dec 30 10:38:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12701384 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 721EEC433EF for ; Thu, 30 Dec 2021 10:38:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B99A96B00AA; Thu, 30 Dec 2021 05:38:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B48F26B00A9; Thu, 30 Dec 2021 05:38:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A38026B00AA; Thu, 30 Dec 2021 05:38:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id 914DF6B00A8 for ; Thu, 30 Dec 2021 05:38:53 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4CBF282499B9 for ; Thu, 30 Dec 2021 10:38:53 +0000 (UTC) X-FDA: 78974112546.22.5E5109F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf02.hostedemail.com (Postfix) with ESMTP id 6B5B280004 for ; Thu, 30 Dec 2021 10:38:47 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 097D26164C; Thu, 30 Dec 2021 10:38:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBB41C36AEA; Thu, 30 Dec 2021 10:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640860731; bh=i6KLNpWXSLKaOd8kbSKvJwabKRIE5pVG8KgBs39rQrU=; h=From:To:Cc:Subject:Date:From; b=kpmryc4pEat+HSI2LA1Hf+Nc5QyU7bl0/OBXWzfZc4v1oAKm4V8b7BjTc7O4MmKYD OuLmQDvWIbuhW3lQT6IQ80nxyNYAYGTxWGwGdbYv+s8pWn6uu1agR7yFUH2EQ+ZiFd 2u+C9Ap9CH621ss0+5qAB5Jxn4R6MnBAQa9Ubym+49JHnoZgUWEfD0BrOiwiXq8fJM 0S+ruMHG9WjqWpnR8ATz2fFNkIj/zsNfuJUezzPYJVE+Vfkj75HlQ+GLcF9jvNC2Gr hjtQ2l3cKD6m5UDCakGA31AAQdfX79L/E2U4V/06mG5oYAb3sYidD5UgT4mxWi7f+M evbsCOafSCU9g== From: SeongJae Park To: akpm@linux-foundation.org Cc: hch@lst.de, hughd@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH] mm/shmem: Fix a build error due to shmem_unuse() under !CONFIG_SHMEM Date: Thu, 30 Dec 2021 10:38:44 +0000 Message-Id: <20211230103844.15302-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 X-Rspamd-Queue-Id: 6B5B280004 X-Stat-Signature: 6ay7qkm441egmo118qokb6hz8yzohy6s Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=kpmryc4p; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf02.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org X-Rspamd-Server: rspam02 X-HE-Tag: 1640860727-849054 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Acked-by: Randy Dunlap # build-tested Reviewed-by: Christoph Hellwig --- 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