Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp443261rwb; Wed, 10 Aug 2022 10:42:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR6EqzcGzWDfAgUd2QJaDsmASNivmXI4Lkz3QBCLB3RSzdIOt+Qj3kC8Fa3rM8eR4XOaEK+G X-Received: by 2002:a05:6402:51ce:b0:43e:74bc:dce with SMTP id r14-20020a05640251ce00b0043e74bc0dcemr27648020edd.225.1660153320906; Wed, 10 Aug 2022 10:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660153320; cv=none; d=google.com; s=arc-20160816; b=c4ARFGup0Z1sm6lr+3huwJBzvSSIXJ5qcFpTaNNXbYTMp/gOCdZvjuvbWrxrRfWz+C Fg48qbNNsPDcZpk6Rs6ivaTszhEHV32rbOSzMmqpL2e+fWvs6OqOKrUngStwpqTVemJZ twDXrjW3TgaJfm2Jbhm0smguQnlgwVjfxXaXuqASiXpSHKtwEUeEJRuBic8SyiWre/L4 D8jQ1LJ3V6JZ5s5EQMDeBDqAgDUjb5oY7MtRQQowkL/GxVJWQGqKaohjABjX2X09lq2v DJlk45KeC2G1okO6L8zBka/BneQo4YDkwEbseVzmF704UseISHoTXnM8Lw3O54h7FcTw Gvkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=iXUHheSzUfdxocFNJ+xyTMnGHmXWV9gO99MJy2MdGuQ=; b=dGb1KgihZU2qqNfhaC9ZzYJMfEzk0ih8rk6JDuRjmONXsgmARazqGjKKBGdTACRdOB B/KqsTn4P1d7fLIP97W8qFXwwqEXM0Dmqn2WJRyrcMs2Hsd3GssI+DdLNPBHrfprOHqT QzgmrmE33b+5fZ+Oh7HjKPqFKau1Oe5LxZt4ejGi3DTvk13HUIIzbny7WeNJ8ow40v5C XNPwAIvHE3CUDSTrKk3b9hmwOt1Zw6Ofw2TdOC19kjyVZ2/IiYw2nWvaRPTssK7iKX0M 8fecJBwHCvXkT/YwZWeaKJgS3ghOpEXZE+WGCvb4ew9tJ9dc26O/jGiyJrFwB1XtTaVc L/Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=d7n9wTyw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht11-20020a170907608b00b0072ae61935afsi4957403ejc.304.2022.08.10.10.41.34; Wed, 10 Aug 2022 10:42:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=d7n9wTyw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233507AbiHJRTW (ORCPT + 99 others); Wed, 10 Aug 2022 13:19:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233662AbiHJRSk (ORCPT ); Wed, 10 Aug 2022 13:18:40 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B8E667AC2F; Wed, 10 Aug 2022 10:18:34 -0700 (PDT) Received: from pwmachine.numericable.fr (85-170-37-153.rev.numericable.fr [85.170.37.153]) by linux.microsoft.com (Postfix) with ESMTPSA id 01E4B210C8B3; Wed, 10 Aug 2022 10:18:30 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 01E4B210C8B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1660151914; bh=iXUHheSzUfdxocFNJ+xyTMnGHmXWV9gO99MJy2MdGuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d7n9wTywcZMRua59gPPfvfaU+rNEyuTkLy9kZxk8JvF9l4VCCjFSamaYmPoAoWag/ T58jQEeFatPyOT4gK7UIY5FIZDy+pZTvlmusITw3QwLPhAwxcMyVpgKFs+dPEtjAbW OJHkxTEVtYNkjJecX09BL7M2tEIK9s4RWh8gtI8I= From: Francis Laniel To: bpf@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Francis Laniel , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Joanne Koong , Dave Marchevsky , Lorenzo Bianconi , Geliang Tang , Hengqi Chen Subject: [RFC PATCH v1 2/3] do not merge: Temporary fix for is_power_of_2. Date: Wed, 10 Aug 2022 19:16:53 +0200 Message-Id: <20220810171702.74932-3-flaniel@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220810171702.74932-1-flaniel@linux.microsoft.com> References: <20220810171702.74932-1-flaniel@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Francis Laniel --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index e89cc9c885b3..5d0e997c85ea 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -4945,7 +4945,7 @@ static void bpf_map__destroy(struct bpf_map *map); static bool is_pow_of_2(size_t x) { - return x && (x & (x - 1)); + return x && (x & (x - 1)) == 0; } static size_t adjust_ringbuf_sz(size_t sz) -- 2.25.1