From patchwork Mon Nov 13 19:13:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 13454361 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 7109AC4167B for ; Mon, 13 Nov 2023 19:14:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A39156B026E; Mon, 13 Nov 2023 14:14:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C4CE6B026A; Mon, 13 Nov 2023 14:14:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6287C6B0273; Mon, 13 Nov 2023 14:14:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2C8EB6B026E for ; Mon, 13 Nov 2023 14:14:15 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 06BF41CAC6E for ; Mon, 13 Nov 2023 19:14:15 +0000 (UTC) X-FDA: 81453881670.25.011F33F Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf11.hostedemail.com (Postfix) with ESMTP id 0EF624000C for ; Mon, 13 Nov 2023 19:14:12 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=0Zk71Af4; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=vAhtZGcq; dmarc=none; spf=pass (imf11.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699902853; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lpvt5s4LImzllAEMKC9yyjTODPwLX4+6Y45s6lDAdck=; b=DPb+bd4j+jRD035rOnpzB1wu0vesVlyIqp1E/fJQRqXhzRwFfl6T91e1kpqww7qz6R/g8y u6w6RPDZcUqF79ICauAO8YqxFRu+ylRhgPylAhPDgDAuzwfiQGR/6ny5xcYWJo06HSwb/a nL1MTJykdsdij6Ph3S7EZIfN9w2ZqVM= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=0Zk71Af4; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=vAhtZGcq; dmarc=none; spf=pass (imf11.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699902853; a=rsa-sha256; cv=none; b=6PmJaOIJTpkNf5WjS7LTcPd/vWVpsAtNSun0l64qfQk/c8A/23HFEIq8angbQPqkA+tjzs nQZ1sJXt6aTGWHJkRMBJl5EipCUD6PBiWkyuAaqp/ks417RjoiKaHvnpOUdy46EVJrMoqH yBp6OiVz3oIPoe6JKep0f+x78Dks6a0= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AE5771F86B; Mon, 13 Nov 2023 19:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1699902851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lpvt5s4LImzllAEMKC9yyjTODPwLX4+6Y45s6lDAdck=; b=0Zk71Af4/ksZViufYFLz4W466HBY9hZ6yjSoaHX3v3J6SOrEeTFMUha4Tk6TWp6ktjmlTY tyWmx5ZTjAXIQL0It+uib+nO4jvjmUvBVn98fw84px5FDHOZc3q/N2qZVErz8XjjyZ8Rv3 nya3pgfa+YY7tev+CjDyBZ95Zxr+uDc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1699902851; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lpvt5s4LImzllAEMKC9yyjTODPwLX4+6Y45s6lDAdck=; b=vAhtZGcql9qIWxRJqKiLelqePVQm52ugRXQ7AXX20vnAKjBALODitlzRltKZ2qlT1HLVp2 tD2r1WHZoMl+fJAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6270F13907; Mon, 13 Nov 2023 19:14:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +BNfF4N1UmVFOgAAMHmgww (envelope-from ); Mon, 13 Nov 2023 19:14:11 +0000 From: Vlastimil Babka To: David Rientjes , Christoph Lameter , Pekka Enberg , Joonsoo Kim Cc: Andrew Morton , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Marco Elver , Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , Kees Cook , kasan-dev@googlegroups.com, cgroups@vger.kernel.org, Vlastimil Babka Subject: [PATCH 07/20] mm/mempool/dmapool: remove CONFIG_DEBUG_SLAB ifdefs Date: Mon, 13 Nov 2023 20:13:48 +0100 Message-ID: <20231113191340.17482-29-vbabka@suse.cz> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231113191340.17482-22-vbabka@suse.cz> References: <20231113191340.17482-22-vbabka@suse.cz> MIME-Version: 1.0 X-Rspamd-Queue-Id: 0EF624000C X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: gtwz5ngc5hng9yu3kauy8hc9gwywx7sa X-HE-Tag: 1699902852-377958 X-HE-Meta: U2FsdGVkX1+iy9MK2xDeisI4fpPcpfKUWTP+GmIxPcJm6yDvt4uEVP7gfbayI6pJ35z2oIOfRKzQ4phaV/4ZoH5NTgdWBuqqIQMknXPTnrk99dh3ydiLbPEySU2VCqr8cR+41yBsX3x0vLl00Qmxerrin7UFJ1DoZwoV3z53O5QKVM+kWtmKnSmH0IvLvdkQK6RFKB71PAW9F5ac3ODHrydCaRflHmYUkHOvKHcMq17P7YF79O8kxTQJUybzIMLDk/MJkutSSIDk1Qm/9KeQc8RqsTH7GIENYbkkZ00sdX/q+P2fey8NQy1FOZ4jKXTjbVDlypKNQsJcSOIB4sj9Zmp3RKV2yaX1e/sqIAJu3tRRIT9y2iry4rQXztcCIeL3HxSldWHgoA+XC/SH+kPqXFrPfpiFFQYF021ROtCRtRbIhyo4Vzc3e1I27H3Iu2yWJp0jbiXhoNKNd+a55FlmGD4X1+8lz0jmK832mwjMfxURDRU67D7ZvpdQeYEMqULYaKJLh8lTlBEPyF8Jcq81ZJNkR/QCyx5Xcp0SxC8SYw3bLbo3jdqMuQnmqW+mc2lNs3psO1oGqGdoOuWLBS3emENrcT9rsn5wrgpJmB1cHCt4aPLtsCpCs1hgpYRxkwqQoUsFa5t5+j4e3fl3tmVuENgEY4KyoMidgFgjKrNcNTg3CVPGnrJkTqVP+0+t6azm1JQR+GBPgCP9a3BnUY8ETdEPDGt2Vkv93K6DwOl9gXAQlkKlsVBSgVNYrD5aAT2CGLxiul8885Ybvf9OrWffbegXRrz2DSZPJ9MxLpifneHRKw/OJ8YkixrRjeA7bGg15Ys0dRstfsou4Vw05zr53ZGRjZXGXUQqmuWrGwirizAD+30bKC4dhfn4DBsvUcMd0StKRA8WiZzXbMrtwwZa3u2Lvy/0FdM/MNcoWvu6oakv6nGbaneup3kZepN8ACJoQ6dfja70D6r9hTHPgQl Tjq7CFBr gURaOF1HjLNxe5qIyj+QUGNpdjIdWWPwxE9rpILkWEbA5aXD3bRu1/jDBIFQTijSdu1U0cCoyoYZW037d068bUZBAB+7MJalK3sRU1qljgTfHtjaAGxlAVIInJ4c3bVr0rbDx4DBPITfP8zLQaqaGVHa0W3iECoRHEYZVMUyxO9MvN1PO7dyrRbCGtw3Jhz1AHVE8pRvVoIdE86oc9vmX3llv3OPwWO2eESbLBnc0nTffb/toQWErEwyHzvxzl6wVFySrYreCWjtW7EpYfv0vzSgshx7isqo7XccQZEE3F2lO9jOIoI988BW2zw== 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: List-Subscribe: List-Unsubscribe: CONFIG_DEBUG_SLAB is going away with CONFIG_SLAB, so remove dead ifdefs in mempool and dmapool code. Signed-off-by: Vlastimil Babka Reviewed-by: Kees Cook --- mm/dmapool.c | 2 +- mm/mempool.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/dmapool.c b/mm/dmapool.c index a151a21e571b..f0bfc6c490f4 100644 --- a/mm/dmapool.c +++ b/mm/dmapool.c @@ -36,7 +36,7 @@ #include #include -#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB_DEBUG_ON) +#ifdef CONFIG_SLUB_DEBUG_ON #define DMAPOOL_DEBUG 1 #endif diff --git a/mm/mempool.c b/mm/mempool.c index 734bcf5afbb7..62dcbeb4c2a9 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -20,7 +20,7 @@ #include #include "slab.h" -#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB_DEBUG_ON) +#ifdef CONFIG_SLUB_DEBUG_ON static void poison_error(mempool_t *pool, void *element, size_t size, size_t byte) { @@ -95,14 +95,14 @@ static void poison_element(mempool_t *pool, void *element) kunmap_atomic(addr); } } -#else /* CONFIG_DEBUG_SLAB || CONFIG_SLUB_DEBUG_ON */ +#else /* CONFIG_SLUB_DEBUG_ON */ static inline void check_element(mempool_t *pool, void *element) { } static inline void poison_element(mempool_t *pool, void *element) { } -#endif /* CONFIG_DEBUG_SLAB || CONFIG_SLUB_DEBUG_ON */ +#endif /*CONFIG_SLUB_DEBUG_ON */ static __always_inline void kasan_poison_element(mempool_t *pool, void *element) {