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 B7FD7C07E9D for ; Wed, 28 Sep 2022 02:55:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 222428E0118; Tue, 27 Sep 2022 22:55:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1D13A8E00C1; Tue, 27 Sep 2022 22:55:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 073B68E0118; Tue, 27 Sep 2022 22:55:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id EC25B8E00C1 for ; Tue, 27 Sep 2022 22:55:06 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B84C61610F7 for ; Wed, 28 Sep 2022 02:55:06 +0000 (UTC) X-FDA: 79959977412.29.992849E Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf01.hostedemail.com (Postfix) with ESMTP id BE26C40013 for ; Wed, 28 Sep 2022 02:55:05 +0000 (UTC) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mcgwd07V6zWgn8; Wed, 28 Sep 2022 10:50:57 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 28 Sep 2022 10:55:02 +0800 Received: from [10.67.109.54] (10.67.109.54) by kwepemm600005.china.huawei.com (7.193.23.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 28 Sep 2022 10:55:01 +0800 Subject: Re: [PATCH] mm/hwpoison: fix build error without CONFIG_MEMORY_FAILURE To: Bagas Sanjaya References: <20220927102946.98622-1-tanghui20@huawei.com> CC: , , , , From: Hui Tang Message-ID: <6960475d-3487-a328-e7e0-e1deff6df3bc@huawei.com> Date: Wed, 28 Sep 2022 10:55:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.109.54] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664333706; a=rsa-sha256; cv=none; b=JfmdG79OIHITtuUhcTrfWmijOEDn8R8MJ7eLuSRdz5K3VpGEFIX3gbNfKHMeMRn8V8c8zs UGjQfI9+SWhE3iKw7Gsm4PADvJ4rKujceE2QYwlJYahCTAZ+unCvtJL0plighkOq9DaQW/ zedohyVXgLZmfuunoHd7nRm7tzFTp68= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of tanghui20@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=tanghui20@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664333706; 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:in-reply-to:references:references; bh=1JS1BiABAT0IISZIvg89B8/TvxHIpKHDve1mRvYpiSc=; b=ewgxWQrrhHvzbtuz29YneHFsliwBiEYAicM5MgFYrraCWbkGuj5RFsngiSKRlrMSX//Nkk 2mWXn6kyAsYo/kqRXHvdyZpu/ioOngaTatPQdBkZDsWiXV4OpYTvdGKNuvijF54GkR1qoQ eiXO4ZdI+Ly/ZnWMLl74EgXYdNRcEr4= X-Rspamd-Queue-Id: BE26C40013 X-Rspam-User: Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of tanghui20@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=tanghui20@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspamd-Server: rspam06 X-Stat-Signature: rtpnzuhd6ef3ijay88iqmqrinu4g6bpg X-HE-Tag: 1664333705-951866 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 2022/9/27 20:16, Bagas Sanjaya wrote: > On Tue, Sep 27, 2022 at 06:29:46PM +0800, Hui Tang wrote: >> Building without CONFIG_MEMORY_FAILURE will fail: >> >> mm/memory-failure.o: In function `action_result': >> memory-failure.c: undefined reference to `memblk_nr_poison_inc' >> mm/memory-failure.o: In function `page_handle_poison': >> memory-failure.c: undefined reference to `memblk_nr_poison_inc' >> mm/memory-failure.o: In function `__get_huge_page_for_hwpoison': >> memory-failure.c: undefined reference to `memblk_nr_poison_inc' >> mm/memory-failure.o: In function `unpoison_memory': >> memory-failure.c: undefined reference to `memblk_nr_poison_sub' >> mm/memory-failure.o: In function `num_poisoned_pages_inc': >> memory-failure.c: undefined reference to `memblk_nr_poison_inc' >> >> Add CONFIG_MEMORY_FAILURE wrapper for invoking memblk_nr_poison_{inc|sub}. >> > > Better say "Guard memblk_nr_poison_{inc,sub} under CONFIG_MEMORY_FAILURE". Thanks.