Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27413715rwd; Tue, 4 Jul 2023 02:35:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6E/xNMqzJTBD+xl79KaSx60bj667eAf/IhqgCwREgT4p9KvHHmuW9YNQJl8BoyyQkLDGgZ X-Received: by 2002:a17:902:ee46:b0:1b6:a37a:65b7 with SMTP id 6-20020a170902ee4600b001b6a37a65b7mr22104305plo.23.1688463344303; Tue, 04 Jul 2023 02:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688463344; cv=none; d=google.com; s=arc-20160816; b=eysFSnLUTMNJs1LGyNurf3bFolcfGnATY1DMZiXvz7XR94jYzoKQDzauDfGFcPd2DH QrSatz1CRrfx+s5oCSRnjxpIJn39h2b5I5Cjn8PONIV+L+cnBm/k3IaJvk+6G5Hld6IL svCh2/2htzMqNLK1OHum4F5UUekjxfn3qF8LyAoErD8DnpuYDNDpQDxlze+JJ3N6UCyd HIzStRKRwN8gez/htn+hPAu2AsVUqu69mqSMWAUqtqmjdD1gQ3FRN1VyNw5sr967FQXt HzMAhVoP8tL5K+JkL+opZVhFh2qT8mL93G3WG4631axXafajYCvy/XPgnPfwN05B9uk7 XbnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=dqtmIxbNifx0ASyE7vPUiMcgbpvNHFd86ifBe6b/c3Q=; fh=v5dAiwD2sQaTyNbWPrGHqPubg757kWusgFf53nEMkAc=; b=eOvUmR0G2G4FdnhlcUG16tYITy3Z2x46B3LKAZ8mcepj2MlTSBgGBfvNpbeY+cO16w PrYa2/27lQsyEptwvS7RdEkCZjHWbvJ/18q3FhneSCujusK7FABQr9XTP8Q4U8dOLjJQ Z55403gE+XDGrJQY8x76UEXBrbUewpA1ZKruy38/s+HFFP4P/eKDyi4B58n7uKRAVFn0 PI0iPi91aFfV0f4NA9W/+pPUwdFQ3xVx41QAsdcjhj0zSMwJxYxAl+fHQSQUYi319DHq Px65aoL3GHXVe3evZvJhP4SH1fka82hF1shHd9B7qy88Z8/eCtfgmNtzvjT6WWYcphp5 pD2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@iogearbox.net header.s=default2302 header.b=hp1h9O13; 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=REJECT sp=NONE dis=NONE) header.from=iogearbox.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lx16-20020a17090b4b1000b00262f937bf93si17692438pjb.77.2023.07.04.02.35.28; Tue, 04 Jul 2023 02:35:44 -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=@iogearbox.net header.s=default2302 header.b=hp1h9O13; 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=REJECT sp=NONE dis=NONE) header.from=iogearbox.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231518AbjGDJ0P (ORCPT + 99 others); Tue, 4 Jul 2023 05:26:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229938AbjGDJ0O (ORCPT ); Tue, 4 Jul 2023 05:26:14 -0400 Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB8E8B6; Tue, 4 Jul 2023 02:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=iogearbox.net; s=default2302; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=dqtmIxbNifx0ASyE7vPUiMcgbpvNHFd86ifBe6b/c3Q=; b=hp1h9O13K4M0nCG4aQvgTxGVdh 1IVvh0paFFGpu981/toaLnD4cIJMUq5HB32i+SU9bkrLKATtV8/nzHDnY2DDy2YgAPNYzxlZzYbXc tKxUzN9X7MO8IkpkPFIDF7ELFzsl43Nbk+ZNs9XXL4Uu6/yEL9RQbyNsleh1l9UwLp3s7qgug32Ab 6xwIXwplxQ5uu3tgjscvYRD4qY9q8sIV4EkqLQFRtlzLLCl0vjW3dtgdWeQgRydxF0HxJKxXFP0z7 2e7Kr2luv/ciR+8GUQC0jS+hPDUGMJLJ0LhLUgy/RoH6UPbDNyVScPuzjoRC+VVdy+/2hQxCc95eb X9SVRTkA==; Received: from sslproxy03.your-server.de ([88.198.220.132]) by www62.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qGcIP-00036E-II; Tue, 04 Jul 2023 11:26:05 +0200 Received: from [81.6.34.132] (helo=localhost.localdomain) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qGcIP-000G0v-25; Tue, 04 Jul 2023 11:26:05 +0200 Subject: Re: [PATCH] libbpf: fix some typo of hashmap init To: John Sanpe , 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 References: <20230704085429.3110340-1-sanpeqf@gmail.com> From: Daniel Borkmann Message-ID: <2af93aa0-a81d-d783-b946-dc7ffc875f4c@iogearbox.net> Date: Tue, 4 Jul 2023 11:26:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20230704085429.3110340-1-sanpeqf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.8/26959/Tue Jul 4 09:29:23 2023) X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 7/4/23 10:54 AM, John Sanpe wrote: > rename macro parameters to prevent replacing struct members of hashmap > > Signed-off-by: John Sanpe > --- > tools/lib/bpf/hashmap.h | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h > index 0a5bf1937a7c..bae3feaf29d0 100644 > --- a/tools/lib/bpf/hashmap.h > +++ b/tools/lib/bpf/hashmap.h > @@ -80,14 +80,14 @@ 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, \ > +#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, > Please send a v2 and just remove the whole HASHMAP_INIT. It's not used anywhere in libbpf.