From patchwork Mon Jul 18 19:28:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 12921663 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 2B9FDC43334 for ; Mon, 18 Jul 2022 19:28:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4E7D98E0002; Mon, 18 Jul 2022 15:28:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 44978940007; Mon, 18 Jul 2022 15:28:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C2D08E0005; Mon, 18 Jul 2022 15:28:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id EEFD08E0002 for ; Mon, 18 Jul 2022 15:28:53 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C1B833317F for ; Mon, 18 Jul 2022 19:28:53 +0000 (UTC) X-FDA: 79701208146.18.90EDE03 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by imf25.hostedemail.com (Postfix) with ESMTP id 3C4CEA0099 for ; Mon, 18 Jul 2022 19:28:53 +0000 (UTC) Received: by mail-qk1-f181.google.com with SMTP id b25so8800387qka.11 for ; Mon, 18 Jul 2022 12:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=fSIJ7a7j2AX31WFosI1tLZd0prS7r7q6CFeV8/OppVE=; b=VbkCt5PHj4oSczMa9BarPYV2CjxzDRvrtDRRMj4B07hzccBFOAfmYblYUUH9Ajgumv RKM4K28hzaiG92J/7vkuoCFu1rn9w8fhy0lWf6SIorEHqKyHwppnrzuULW+EmT6h7aZb iNnNyCpV5Al9CLDF5s+BHS+cuFK+7eXWgag89LdLI4R4kgeV2hbArCXUwMlgqtF2xWIm qfkeQzp0/+pXaxkZspiEkYN3yN4c8vfsqHzTwgjkQ3p2CVysWoVDuRXKrA2nXL5HlaIv LdBinorxw3H/YgC7eHfwweeumD20to6B5s4SYw9LVJdPLE0pFWEA8sn1G0OBVc/9tacU f7fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fSIJ7a7j2AX31WFosI1tLZd0prS7r7q6CFeV8/OppVE=; b=dehdzmu8GEgLqcQD4VfZGMO6IHMRJyjyvJU7zJNTVakXhfKRyHAFjbGxJORGn9XKNb C9//gdninqOftjpAJABRPvsKryZnrbw4T58bG+aUYNuPWHl09YK/6M9ZvHaZV3VW4zSA Ak34LmIIT0Ic3SwKE8qCApBEvFqEbRmuA3T3R2H74hOn4+Wje0/W12bZE0kpGouvEsbU HFjZKeKSWicTKio0cu/1Q0nkzrqoSLNix1eQlHAlqCiXtUKouN89a+AJOZ7mhIhVuE45 7RCW7akLpHMgA+vmRMLP8snbbmQhVlE1whTkJFbIxFP/KleFzXYoghxVwIlA7cWiep8s 48YQ== X-Gm-Message-State: AJIora9wF0Y+6OEW+9zDOm4QudpnF9qOZbBxdviJQf0yxGxcom76NbBa 3VtzUU1OcPxai/I8GZzooVQ= X-Google-Smtp-Source: AGRyM1vV0SLlM81qvktCdvHe8wlRlm35TgOxVMvgml/1hdumCxKzVqNhVheVD3VDTLe5gZR7GC4mqw== X-Received: by 2002:ae9:e402:0:b0:6a7:86a3:752e with SMTP id q2-20020ae9e402000000b006a786a3752emr18219422qkc.300.1658172532712; Mon, 18 Jul 2022 12:28:52 -0700 (PDT) Received: from localhost ([2601:4c1:c100:1230:ab01:d009:465a:5ab1]) by smtp.gmail.com with ESMTPSA id d19-20020a05620a241300b006a6d20386f6sm13557144qkn.42.2022.07.18.12.28.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 12:28:52 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, Alexander Lobakin , Alexei Starovoitov , Alexey Klimov , Andrew Morton , Andrii Nakryiko , Andy Shevchenko , Ben Segall , Christoph Lameter , Dan Williams , Daniel Borkmann , Daniel Bristot de Oliveira , Dennis Zhou , Dietmar Eggemann , Eric Dumazet , Frederic Weisbecker , Guenter Roeck , Ingo Molnar , Isabella Basso , John Fastabend , Josh Poimboeuf , Juergen Gross , Juri Lelli , KP Singh , Kees Cook , Martin KaFai Lau , Mel Gorman , Miroslav Benes , Nathan Chancellor , "Paul E . McKenney" , Peter Zijlstra , Randy Dunlap , Rasmus Villemoes , Sebastian Andrzej Siewior , Song Liu , Steven Rostedt , Tejun Heo , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Vlastimil Babka , Yonghong Song , Yury Norov , linux-mm@kvack.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH 05/16] lib/test_bitmap: disable compile-time test if DEBUG_BITMAP() is enabled Date: Mon, 18 Jul 2022 12:28:33 -0700 Message-Id: <20220718192844.1805158-6-yury.norov@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220718192844.1805158-1-yury.norov@gmail.com> References: <20220718192844.1805158-1-yury.norov@gmail.com> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658172533; a=rsa-sha256; cv=none; b=sFHJSc5d+jCsGDrFVUbXOQ7tYM9ugLgDCoTS+M7IztYUFj6h2xrlykLEIOw9P5HxtbijYs vggn5RSQyXxls62IUKJ/w1mLA942J2Y+I4YGX2y62sxckTmVMb0t1qnuHel92uPjWzTqP8 gqg3aYXu4qdJ8Sr0Qz9bM6QKOCWKgQA= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VbkCt5PH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of yury.norov@gmail.com designates 209.85.222.181 as permitted sender) smtp.mailfrom=yury.norov@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658172533; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fSIJ7a7j2AX31WFosI1tLZd0prS7r7q6CFeV8/OppVE=; b=yyioKTQRUcEaeNuZjZ3V3+2Ipj52i01BBU2rYl1op2xK5Kx6hyxBnIvW3yBix8GF0aqZOz uDu01U1fiXg3L2kgAb9pdNWcK/n/OOV1eCNCF9Im7vuLmwpvJCSEY8XAHbLpigWyCOkpG/ 9hOFZyNwrNtHJ86AdvncQCSJ+wxLhBc= X-Rspamd-Queue-Id: 3C4CEA0099 X-Rspam-User: Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VbkCt5PH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of yury.norov@gmail.com designates 209.85.222.181 as permitted sender) smtp.mailfrom=yury.norov@gmail.com X-Rspamd-Server: rspam08 X-Stat-Signature: 7s3wgfti9p74ffaokhm1cdkse56yq9ui X-HE-Tag: 1658172533-815402 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: CONFIG_DEBUG_BITMAP, when enabled, injects __bitmap_check_params() into bitmap functions. It prevents compiler from compile-time optimizations, which makes corresponding test fail. Signed-off-by: Yury Norov --- lib/test_bitmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index bc48d992d10d..8bd279a7633f 100644 --- a/lib/test_bitmap.c +++ b/lib/test_bitmap.c @@ -877,6 +877,7 @@ static void __init test_bitmap_print_buf(void) static void __init test_bitmap_const_eval(void) { +#ifndef CONFIG_DEBUG_BITMAP DECLARE_BITMAP(bitmap, BITS_PER_LONG); unsigned long initvar = BIT(2); unsigned long bitopvar = 0; @@ -934,6 +935,7 @@ static void __init test_bitmap_const_eval(void) /* ~BIT(25) */ BUILD_BUG_ON(!__builtin_constant_p(~var)); BUILD_BUG_ON(~var != ~BIT(25)); +#endif } static void __init selftest(void)