Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36436727rwd; Tue, 11 Jul 2023 00:34:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlFdMuaOoFRbGOYHAAYeL269gAQoLk8+w2jaZANZMnkSA0jkDDHG7DBYe5VTTe97h2R3EKIL X-Received: by 2002:a05:6a20:d9:b0:131:a3b1:5674 with SMTP id 25-20020a056a2000d900b00131a3b15674mr4207310pzh.22.1689060898921; Tue, 11 Jul 2023 00:34:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689060898; cv=none; d=google.com; s=arc-20160816; b=vaB0cjyHKBgSommlV/DNHrAxMghcHxpqvPGoyyPsYLEVljs6840L/v9mJCeemiVFKY qbTut7gsGtv5im3HRnGzeHB0GUcpcLs7NqxzHZ4lqP56b+DIdjWS8mmlXyoxWzYKa0kz 588TEGxc+aY8z0M6C8yUsHCGSm6WseZaFoRtyfu474qeM4nIXtjTqoRLoLEwou8K9bIG rdU/sUhf/yZbUIhUfIWwcAT2bPDDGJwFcYsVdiRR6o9UXq8Cy8q7wx6rO6f/cATm1XH+ 6BWly8wbzVYWqF8/TDh7uu7Nsq0YNwE8SI5mHYhP/Xi2MafaKfK3L8yXeWPlcoGI/HCp qdoQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Lr4EEb8lSN9rAL80ANZydUG7gs/Koz0Z+OrxyJ5aSvw=; fh=b/TiYmsMRUdajjra+KwGT3Ht0PpmPzq24fJ4mozTOLk=; b=UQ5e8FKY9/4+z6oYbSpdyIdF1MK3Mv/mhwUF7oR1/u4mgX3cngcNtGUPrn0fYwKpPf tIwjPqYkzj3AMHtktnvd0XDFq+CTOfbJTeZ99MNjbBHoNrgSYxXolANsiZZBGwSA0Y9H zEKqQlJbonlC8QgwF1WK32d/sSv6BGpPWyb6IOh1fYKnavUOu8/vBf2PVbeFEvGgec0J 6DR8Wcx0hM1xLVo7OHv1SSQPMBXFFejN5b+As4ZOA8jtUHcGfnp5wInfv7CKma8QK5fj bq8jteo+ffS3A6ifRnFLUhDVZIceEh67APTHnEq9P6nZXMsADG0XPjrEIfj1t8top7Hh t8ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=hf4FYqhB; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a63e74b000000b00557531eafaesi948366pgk.761.2023.07.11.00.34.46; Tue, 11 Jul 2023 00:34:58 -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=@gmail.com header.s=20221208 header.b=hf4FYqhB; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230289AbjGKHHb (ORCPT + 99 others); Tue, 11 Jul 2023 03:07:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbjGKHHa (ORCPT ); Tue, 11 Jul 2023 03:07:30 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B15DA18D; Tue, 11 Jul 2023 00:07:20 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id d2e1a72fcca58-6689430d803so2752581b3a.0; Tue, 11 Jul 2023 00:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689059240; x=1691651240; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Lr4EEb8lSN9rAL80ANZydUG7gs/Koz0Z+OrxyJ5aSvw=; b=hf4FYqhBmre3m/JYcxT1W5OJhsdYVIELbmLg4wdeO67Ow1M7v8XJSB8LMo4knmsQY3 XSgTRiSVyJSUMonjEfU4Wd4XuWjMCzH680If8+RPFVqN/gnBPT33rIRbJCQF6Dp6pEHw VjglaDdbDPH8G9H25ieY+iXdEuPsKjx+0gx3h2Kb2ngutQclWQsXdr9EK9Kb/QGsu0hg Mz95r28+Xdx3BXk3BgZ8KjwLpzNqGIdyW5uFjDfKRl7OCBiVARy+ZOYETUEwTKc16MV1 CXlorm/jxS+vLgVUAtha/eA4XPS7QpDR0JwBbU/FTGgi0/xxFjaoHbKiPhIOSIMyvlEH EG6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689059240; x=1691651240; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Lr4EEb8lSN9rAL80ANZydUG7gs/Koz0Z+OrxyJ5aSvw=; b=XqzzCjqergO8pIb0QwRkUNIqjdbtlgyrkJ/hnSduNBiUZixJxuTQ+GQm8mTAJbab7T kUMRBGFy4twHby7ls98f9v6kuUvEld4mN/uUWdb6mbjeZoYgWASK0RrLPr3N0h7b8xy6 +gIWRaUO3GqR8Ueu2DmDu3nUXj8xFRkBe6FdEYjsBOY9nXOZBsj/7+MACWMDYZ5/uGxt WgE40QdfkN8UfMHZogHSHKHxHKhY/0RVVgCmj+zyz13wROAJ4+9iXoOyuBHFx5vEvtqz ZrQl8xZFHHvUs7OKi85xe4ah6UWBKqetMTetKhJXlAl+ggnB1pmWgKtylqVF9odJqNAG x8Cw== X-Gm-Message-State: ABy/qLYpNbCTyMsFuJSjy24RmHHl2ZN2MjS6YZ5jvQ/aImyWZLFR9szB AS2M3ApBOqEyyWoJ40g6gso= X-Received: by 2002:a05:6a21:78a8:b0:12b:93d4:4964 with SMTP id bf40-20020a056a2178a800b0012b93d44964mr14970823pzc.30.1689059240145; Tue, 11 Jul 2023 00:07:20 -0700 (PDT) Received: from localhost ([2409:8a3c:3609:db21:fbac:2cf0:59be:e1b8]) by smtp.gmail.com with ESMTPSA id j25-20020aa783d9000000b00678cb336f3csm986154pfn.142.2023.07.11.00.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 00:07:19 -0700 (PDT) From: John Sanpe To: daniel@iogearbox.net, ast@kernel.org, andrii@kernel.org Cc: martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, John Sanpe Subject: [PATCH v3] libbpf: remove HASHMAP_INIT static initialization helper Date: Tue, 11 Jul 2023 15:07:12 +0800 Message-Id: <20230711070712.2064144-1-sanpeqf@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Remove the wrong HASHMAP_INIT. It's not used anywhere in libbpf. Signed-off-by: John Sanpe --- tools/lib/bpf/hashmap.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h index 0a5bf1937a7c..c12f8320e668 100644 --- a/tools/lib/bpf/hashmap.h +++ b/tools/lib/bpf/hashmap.h @@ -80,16 +80,6 @@ struct hashmap { size_t sz; }; -#define HASHMAP_INIT(hash_fn, equal_fn, ctx) { \ - .hash_fn = (hash_fn), \ - .equal_fn = (equal_fn), \ - .ctx = (ctx), \ - .buckets = NULL, \ - .cap = 0, \ - .cap_bits = 0, \ - .sz = 0, \ -} - void hashmap__init(struct hashmap *map, hashmap_hash_fn hash_fn, hashmap_equal_fn equal_fn, void *ctx); struct hashmap *hashmap__new(hashmap_hash_fn hash_fn, -- 2.40.1