From mboxrd@z Thu Jan 1 00:00:00 1970 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 6D7BBC433F5 for ; Thu, 30 Dec 2021 17:54:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 98D936B0071; Thu, 30 Dec 2021 12:54:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 93CC76B0072; Thu, 30 Dec 2021 12:54:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 804956B0074; Thu, 30 Dec 2021 12:54:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0243.hostedemail.com [216.40.44.243]) by kanga.kvack.org (Postfix) with ESMTP id 6F3956B0071 for ; Thu, 30 Dec 2021 12:54:43 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2C27E8B32E for ; Thu, 30 Dec 2021 17:54:43 +0000 (UTC) X-FDA: 78975210846.24.93D0818 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf14.hostedemail.com (Postfix) with ESMTP id B9D0E10000B for ; Thu, 30 Dec 2021 17:54:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description; bh=FVxCiAm7knnCFp4Ex/JwHbySRDGua05m3qd2w6v9KHM=; b=r0/YctsTek+t+H2KmXn4sSX2/T QHq0YrO8fuQwBEeikf+D+aMNgvARCeM5Pa9DteuxULqUaJjfWf+PvsjfaXKMQzQaeHsmdjbYfPQ4z +Jh8peL8ebAD7pbQZ8YEetQ+ha0y3zOCbHPiPDGmmos3lae2yFIP07Ft1Zos0WPEWF8LHqJZ5f/WV ULIh2KpJb2zHczirJUoJ7rAWR5dfMUPPeJK6Esge6ssLhyVWNoV3vlWaBUSsrp8s8M/NbWXfue70U BEJZAB5P8XQexQeFSN80YIJT7fbcLf/MvS91W1cS03FOoSNpfbGH1FuoQP+zGdImmvC3JUeJpGVvQ ijBub2JA==; Received: from [2601:1c0:6280:3f0::aa0b] by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1n2zHY-009x2C-RT; Thu, 30 Dec 2021 17:32:05 +0000 Message-ID: Date: Thu, 30 Dec 2021 09:32:01 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH] mm/shmem: Fix a build error due to shmem_unuse() under !CONFIG_SHMEM Content-Language: en-US To: SeongJae Park , akpm@linux-foundation.org Cc: hch@lst.de, hughd@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20211230103844.15302-1-sj@kernel.org> From: Randy Dunlap In-Reply-To: <20211230103844.15302-1-sj@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: B9D0E10000B X-Stat-Signature: o9huc3sarnxfeq83qaf5c5pfpdduzxi9 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="r0/YctsT"; spf=none (imf14.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=rdunlap@infradead.org; dmarc=none X-HE-Tag: 1640886880-884481 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: On 12/30/21 02:38, SeongJae Park wrote: > 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 Thanks. > --- > 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 -- ~Randy