From patchwork Tue Jun 28 11:21:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zheng Bin X-Patchwork-Id: 12898093 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 E69FBC43334 for ; Tue, 28 Jun 2022 11:09:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 798678E0002; Tue, 28 Jun 2022 07:09:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 71FF78E0001; Tue, 28 Jun 2022 07:09:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C1748E0002; Tue, 28 Jun 2022 07:09:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 47F998E0001 for ; Tue, 28 Jun 2022 07:09:39 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 11D913392B for ; Tue, 28 Jun 2022 11:09:39 +0000 (UTC) X-FDA: 79627374078.03.0CB82B8 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf11.hostedemail.com (Postfix) with ESMTP id 3924340027 for ; Tue, 28 Jun 2022 11:09:38 +0000 (UTC) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LXMHb1TVJzcm42; Tue, 28 Jun 2022 19:07:07 +0800 (CST) Received: from huawei.com (10.175.127.227) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 28 Jun 2022 19:08:56 +0800 From: Zheng Bin To: , , , , CC: , Subject: [PATCH -next] mm/memory-failure: fix redefinition of mf_generic_kill_procs Date: Tue, 28 Jun 2022 19:21:43 +0800 Message-ID: <20220628112143.1170473-1-zhengbin13@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656414578; a=rsa-sha256; cv=none; b=8FCEfZ/sOfnI4qmo+2K3YRL24c0One8T+hTgaKud3PDG7YAwEqg5Hfa8LhrzyL/t5wazP3 6ClKZ6JsSRPKCDOf3ivDUmSqx3fcnwPQP/mhzrCO7lsf/k6SnPBFIV9zjnMP7hNv5gNZV7 V9DjzEelutyVXgj9P8yCGnh5EOmGMPE= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf11.hostedemail.com: domain of zhengbin13@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=zhengbin13@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656414578; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=ZKSPKWFHRK4bPBPUziL16yqDIgYX92TDhmw+8pEqVvg=; b=V82GEYWlm6nLSkq4QyS7fvuBUyejwurUwZzj2TpE6Y0r5OFDlUlGWiTeVxzybcfKXDc6B/ 3kfV1RxFNRahSRf/iPI8RDPSQFc2+6IPzb2GGaZHF4mLUTFJExWRbCRbSIUxii6ofrAwNY vyYr4luRPa5NOXpVOD/xAYcedufIWSY= X-Stat-Signature: 1xis7qoxc5m66iqzr5py7dau1hhubimg X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 3924340027 Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf11.hostedemail.com: domain of zhengbin13@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=zhengbin13@huawei.com X-HE-Tag: 1656414578-508385 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: If CONFIG_HUGETLB_PAGE=n, building fails: mm/memory-failure.c:1805:19: error: redefinition of ‘mf_generic_kill_procs’ static inline int mf_generic_kill_procs(unsigned long long pfn, int flags, ^~~~~~~~~~~~~~~~~~~~~ mm/memory-failure.c:1564:12: note: previous definition of ‘mf_generic_kill_procs’ was here static int mf_generic_kill_procs(unsigned long long pfn, int flags, This patch fixes that. Fixes: 4184e8d7d056 ("mm-factor-helpers-for-memory_failure_dev_pagemap-fix") Signed-off-by: Zheng Bin Reviewed-by: Miaohe Lin --- mm/memory-failure.c | 7 ------- 1 file changed, 7 deletions(-) -- 2.31.1 diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 001fead45f30..c9931c676335 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1801,13 +1801,6 @@ static int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb } #else - -static inline int mf_generic_kill_procs(unsigned long long pfn, int flags, - struct dev_pagemap *pgmap) -{ - return 0; -} - static inline int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb) { return 0;